summaryrefslogtreecommitdiff
path: root/tests/cp/sparse-fiemap.sh
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2013-12-11 04:42:59 +0000
committerPádraig Brady <P@draigBrady.com>2013-12-11 04:42:59 +0000
commitb95aac31803e64c766f4f0a097938366c7e3cee1 (patch)
tree4d2487554eb380324886c3bb14e2af2fbe58932f /tests/cp/sparse-fiemap.sh
parentb9bb1b58fe4efbe95f44755af7d5f71eccbbe1d2 (diff)
downloadcoreutils-b95aac31803e64c766f4f0a097938366c7e3cee1.tar.xz
tests: avoid warnings due to new filefrag -v format
* tests/cp/sparse-fiemap.sh: Newer versions of filefrag output more fields, in different orders, so handle that to avoid warnings.
Diffstat (limited to 'tests/cp/sparse-fiemap.sh')
-rwxr-xr-xtests/cp/sparse-fiemap.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/cp/sparse-fiemap.sh b/tests/cp/sparse-fiemap.sh
index 47ddf2943..59b7db38d 100755
--- a/tests/cp/sparse-fiemap.sh
+++ b/tests/cp/sparse-fiemap.sh
@@ -64,7 +64,8 @@ fi
f()
{
sed 's/ [a-z,][a-z,]*$//' $@ \
- | $AWK '/^ *[0-9]/ {printf "%d %d ", $2, (NF<5 ? $NF : $5) } END {print ""}'
+ | $AWK '/^ *[0-9]/ {printf "%d %d ", $2, (NF>=6 ? $6 : (NF<5 ? $NF : $5)) }
+ END {print ""}'
}
for i in $(seq 1 2 21); do