From b95aac31803e64c766f4f0a097938366c7e3cee1 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Wed, 11 Dec 2013 04:42:59 +0000 Subject: 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. --- tests/cp/sparse-fiemap.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/cp') 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 -- cgit v1.2.3-70-g09d2