From: Jim Meyering Date: Thu, 21 Apr 2011 16:08:20 +0000 (+0200) Subject: tests: sparse-fiemap: report more detail upon failure; ignore an FP X-Git-Tag: v8.12~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=223e3832eb5a9b1aadf0a69d076f40116389565c;p=platform%2Fupstream%2Fcoreutils.git 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. --- diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap index 2c6a250..2e8c95b 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