xfs/148: sort attribute list output
PATCH 1/1 xfs/148: sort attribute list output
From: Darrick J. Wong <[email protected]>
Yang Xu reported a test failure in xfs/148 that I think comes from extended attributes being returned in a different order than they were set. Since order isn't important in this test, sort the output to make it consistent.
--- tests/xfs/148 | 2 +- tests/xfs/148.out | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
tests/xfs/148 +1 -1
@@ -76,7 +76,7 @@ test_names+=("too_many" "are_bad/for_you") access_stuff() { ls $testdir - $ATTR_PROG -l $testfile + $ATTR_PROG -l $testfile | grep 'a_' | sort for name in "${test_names[@]}"; do ls "$testdir/f_$name"
tests/xfs/148.out +2 -2
@@ -4,10 +4,10 @@ f_another f_are_bad_for_you f_something f_too_many_beans +Attribute "a_another" has a 3 byte value for TEST_DIR/mount-148/testfile +Attribute "a_are_bad_for_you" has a 3 byte value for TEST_DIR/mount-148/testfile Attribute "a_something" has a 3 byte value for TEST_DIR/mount-148/testfile Attribute "a_too_many_beans" has a 3 byte value for TEST_DIR/mount-148/testfile -Attribute "a_are_bad_for_you" has a 3 byte value for TEST_DIR/mount-148/testfile -Attribute "a_another" has a 3 byte value for TEST_DIR/mount-148/testfile TEST_DIR/mount-148/testdir/f_something Attribute "a_something" had a 3 byte value for TEST_DIR/mount-148/testfile: heh
Hi,
----- Original Message -----
Quoted 38 lines
From: "Darrick J. Wong" <[email protected]>
To: "Eryu Guan" <[email protected]>
Cc: "Yang Xu" <[email protected]>, "fstests" <[email protected]>, "xfs" <[email protected]>
Sent: Wednesday, December 4, 2019 10:36:42 AM
Subject: [PATCH] xfs/148: sort attribute list outputFrom: Darrick J. Wong <[email protected]>
Yang Xu reported a test failure in xfs/148 that I think comes from extended attributes being returned in a different order than they were set. Since order isn't important in this test, sort the output to make it consistent.
Reported-by Yang Xu <[email protected]>Signed-off-by Darrick J. Wong <[email protected]>--- tests/xfs/148 | 2 +- tests/xfs/148.out | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)tests/xfs/148 +1
-1@@ -76,7 +76,7 @@ test_names+=("too_many" "are_bad/for_you") access_stuff() { ls $testdir - $ATTR_PROG -l $testfile + $ATTR_PROG -l $testfile | grep 'a_' | sort for name in "${test_names[@]}"; do ls "$testdir/f_$name"tests/xfs/148.out +0
-0
tests/xfs/148.out f_another · line 8
Quoted 5 lines
tests/xfs/148.out +2
-0@@ -4,10 +4,10 @@ f_another f_are_bad_for_you f_something f_too_many_beans +Attribute "a_another" has a 3 byte value for TEST_DIR/mount-148/testfile +Attribute "a_are_bad_for_you" has a 3 byte value for
From my test on RHEL8&RHEL7, when touch a file, there is a default attribute:
Attribute "selinux" has a 37 byte value for TEST_DIR/mount-148/testfile Could you share the OS you test?
Thanks.
Quoted 12 lines
TEST_DIR/mount-148/testfile
Attribute "a_something" has a 3 byte value for TEST_DIR/mount-148/testfile Attribute "a_too_many_beans" has a 3 byte value for TEST_DIR/mount-148/testfile
-Attribute "a_are_bad_for_you" has a 3 byte value for TEST_DIR/mount-148/testfile
-Attribute "a_another" has a 3 byte value for TEST_DIR/mount-148/testfile
TEST_DIR/mount-148/testdir/f_something
Attribute "a_something" had a 3 byte value for TEST_DIR/mount-148/testfile:
heh
Quoted 34 lines · Xiaoli Feng
Hi,
----- Original Message -----
Quoted 31 lines
From: "Darrick J. Wong" <[email protected]>
To: "Eryu Guan" <[email protected]>
Cc: "Yang Xu" <[email protected]>, "fstests" <[email protected]>, "xfs" <[email protected]>
Sent: Wednesday, December 4, 2019 10:36:42 AM
Subject: [PATCH] xfs/148: sort attribute list outputFrom: Darrick J. Wong <[email protected]>
Yang Xu reported a test failure in xfs/148 that I think comes from extended attributes being returned in a different order than they were set. Since order isn't important in this test, sort the output to make it consistent.
Reported-by Yang Xu <[email protected]>Signed-off-by Darrick J. Wong <[email protected]>--- tests/xfs/148 | 2 +- tests/xfs/148.out | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)tests/xfs/148 +1
-1@@ -76,7 +76,7 @@ test_names+=("too_many" "are_bad/for_you") access_stuff() { ls $testdir - $ATTR_PROG -l $testfile + $ATTR_PROG -l $testfile | grep 'a_' | sort
Quoted 16 lines
tests/xfs/148.out f_another · line 8
Quoted 12 lines
tests/xfs/148 +0
-0for name in "${test_names[@]}"; do ls "$testdir/f_$name"tests/xfs/148.out +2
-0@@ -4,10 +4,10 @@ f_another f_are_bad_for_you f_something f_too_many_beans +Attribute "a_another" has a 3 byte value for TEST_DIR/mount-148/testfile +Attribute "a_are_bad_for_you" has a 3 byte value forFrom my test on RHEL8&RHEL7, when touch a file, there is a default attribute:
Attribute "selinux" has a 37 byte value for TEST_DIR/mount-148/testfile Could you share the OS you test?
Hi Xiao
IMHO, the aim of this test is to check kernel whether catch corrupt
directory name or attr names. selinux is not check target. Also, if you disable selinux, it doesn't generate selinux in 148.out. So Darrick filters selinux.
Thanks
Yang Xu
Quoted 18 lines
Thanks.
Quoted 12 lines
TEST_DIR/mount-148/testfile
Attribute "a_something" has a 3 byte value for TEST_DIR/mount-148/testfile Attribute "a_too_many_beans" has a 3 byte value for TEST_DIR/mount-148/testfile
-Attribute "a_are_bad_for_you" has a 3 byte value for TEST_DIR/mount-148/testfile
-Attribute "a_another" has a 3 byte value for TEST_DIR/mount-148/testfile
TEST_DIR/mount-148/testdir/f_something
Attribute "a_something" had a 3 byte value for TEST_DIR/mount-148/testfile:
heh