diff options
author | Jim Meyering <meyering@redhat.com> | 2011-04-21 18:08:20 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-04-21 18:39:02 +0200 |
commit | 223e3832eb5a9b1aadf0a69d076f40116389565c (patch) | |
tree | 1547538a72bd77a306b28ead52c82b57873f436a /tests | |
parent | 18a474d755aa10d881243d9457d2c420c5e4ea77 (diff) | |
download | coreutils-223e3832eb5a9b1aadf0a69d076f40116389565c.tar.xz |
tests: sparse-fiemap: report more detail upon failure; ignore an FP
* tests/cp/sparse-fiemap: Fail right away with details, when cmp fails.
When extent maps are found to differ, display them and merely warn.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/cp/sparse-fiemap | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap index 2c6a2506e..2e8c95bcb 100755 --- a/tests/cp/sparse-fiemap +++ b/tests/cp/sparse-fiemap @@ -75,7 +75,7 @@ for i in $(seq 1 2 21); do # for the same reasons. cp --sparse=always j1 j2 || fail=1 - cmp j1 j2 || fail=1 + cmp j1 j2 || fail_ "data loss i=$i j=$j" if ! filefrag -vs j1 | grep -F extent >/dev/null; then test $skip != 1 && warn_ 'skipping part; you lack filefrag' skip=1 @@ -98,8 +98,12 @@ for i in $(seq 1 2 21); do # exclude the physical block numbers; they always differ filefrag -v j1 > ff1 || framework_failure filefrag -vs j2 > ff2 || framework_failure - { f ff1; f ff2; } | $PERL $abs_top_srcdir/tests/filefrag-extent-compare || - fail=1 + { f ff1; f ff2; } | $PERL $abs_top_srcdir/tests/filefrag-extent-compare \ + || { + warn_ ignoring filefrag-reported extent map differences + # Show the differing extent maps. + head -99 ff1 ff2 + } fi test $fail = 1 && break 2 done |