summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-04-21 18:08:20 +0200
committerJim Meyering <meyering@redhat.com>2011-04-21 18:39:02 +0200
commit223e3832eb5a9b1aadf0a69d076f40116389565c (patch)
tree1547538a72bd77a306b28ead52c82b57873f436a
parent18a474d755aa10d881243d9457d2c420c5e4ea77 (diff)
downloadcoreutils-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.
-rwxr-xr-xtests/cp/sparse-fiemap10
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