aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2022-04-13 18:44:22 +0200
committerEryu Guan <guaneryu@gmail.com>2022-04-17 20:08:39 +0800
commit9c6b2ebe2b6b475a53f3f324fb4ddcef4550404b (patch)
tree40e4b237e810b695749ad3b0d5e086fda99cf56b
parenta59e1f79f4e553b244957527e7a66f5cb2a618e7 (diff)
downloadxfstests-dev-9c6b2ebe2b6b475a53f3f324fb4ddcef4550404b.tar.gz
generic/020: fix max_attrval_size output filter
The current attr -g "$max_attrval_name" output filter is broken if $max_attrval_size isn't 16-byte aligned, due to od's duplicate suppression behaviour. Fix it by having od only dump one byte per line. Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rwxr-xr-xtests/generic/0202
-rw-r--r--tests/generic/020.out2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/generic/020 b/tests/generic/020
index f50a4f8758..d8648e9628 100755
--- a/tests/generic/020
+++ b/tests/generic/020
@@ -230,7 +230,7 @@ dd if=/dev/zero bs=1 count=$max_attrval_size 2>/dev/null \
| _attr -s "$max_attrval_name" $testfile >/dev/null
OCTAL_SIZE=`echo "obase=8; $max_attrval_size" | bc`
-_attr -q -g "$max_attrval_name" $testfile | od -t x1 \
+_attr -q -g "$max_attrval_name" $testfile | od -w1 -t x1 \
| sed -e "s/^0*$OCTAL_SIZE$/ATTRSIZE/"
_attr -r "$max_attrval_name" $testfile >/dev/null
diff --git a/tests/generic/020.out b/tests/generic/020.out
index 7e3e65bd42..0dc5e09f90 100644
--- a/tests/generic/020.out
+++ b/tests/generic/020.out
@@ -47,7 +47,7 @@ user.snrub="fish2\012"
user.snrub="fish2\012"
*** really long value
-0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+0000000 00
*
ATTRSIZE
*** set/get/remove really long names (expect failure)