fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs/148: sort attribute list output
@ 2019-12-04  2:36 Darrick J. Wong
  2019-12-06  6:51 ` Xiaoli Feng
  0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2019-12-04  2:36 UTC (permalink / raw)
  To: Eryu Guan; +Cc: Yang Xu, fstests, xfs

From: Darrick J. Wong <darrick.wong@oracle.com>

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 <xuyang2018.ky@cn.fujitsu.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/148     |    2 +-
 tests/xfs/148.out |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/xfs/148 b/tests/xfs/148
index 42cfdab0..ec1d0ece 100755
--- a/tests/xfs/148
+++ b/tests/xfs/148
@@ -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"
diff --git a/tests/xfs/148.out b/tests/xfs/148.out
index c301ecb6..f95b55b7 100644
--- a/tests/xfs/148.out
+++ b/tests/xfs/148.out
@@ -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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs/148: sort attribute list output
  2019-12-04  2:36 [PATCH] xfs/148: sort attribute list output Darrick J. Wong
@ 2019-12-06  6:51 ` Xiaoli Feng
  2019-12-06  7:08   ` Yang Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Xiaoli Feng @ 2019-12-06  6:51 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Eryu Guan, Yang Xu, fstests, xfs

Hi,

----- Original Message -----
> From: "Darrick J. Wong" <darrick.wong@oracle.com>
> To: "Eryu Guan" <guaneryu@gmail.com>
> Cc: "Yang Xu" <xuyang2018.ky@cn.fujitsu.com>, "fstests" <fstests@vger.kernel.org>, "xfs" <linux-xfs@vger.kernel.org>
> Sent: Wednesday, December 4, 2019 10:36:42 AM
> Subject: [PATCH] xfs/148: sort attribute list output
> 
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> 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 <xuyang2018.ky@cn.fujitsu.com>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  tests/xfs/148     |    2 +-
>  tests/xfs/148.out |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/xfs/148 b/tests/xfs/148
> index 42cfdab0..ec1d0ece 100755
> --- a/tests/xfs/148
> +++ b/tests/xfs/148
> @@ -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"
> diff --git a/tests/xfs/148.out b/tests/xfs/148.out
> index c301ecb6..f95b55b7 100644
> --- a/tests/xfs/148.out
> +++ b/tests/xfs/148.out
> @@ -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.

> 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
> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs/148: sort attribute list output
  2019-12-06  6:51 ` Xiaoli Feng
@ 2019-12-06  7:08   ` Yang Xu
  0 siblings, 0 replies; 3+ messages in thread
From: Yang Xu @ 2019-12-06  7:08 UTC (permalink / raw)
  To: Xiaoli Feng; +Cc: Darrick J. Wong, Eryu Guan, Yang Xu, fstests, xfs



on 2019/12/06 14:51, Xiaoli Feng wrote:
> Hi,
> 
> ----- Original Message -----
>> From: "Darrick J. Wong" <darrick.wong@oracle.com>
>> To: "Eryu Guan" <guaneryu@gmail.com>
>> Cc: "Yang Xu" <xuyang2018.ky@cn.fujitsu.com>, "fstests" <fstests@vger.kernel.org>, "xfs" <linux-xfs@vger.kernel.org>
>> Sent: Wednesday, December 4, 2019 10:36:42 AM
>> Subject: [PATCH] xfs/148: sort attribute list output
>>
>> From: Darrick J. Wong <darrick.wong@oracle.com>
>>
>> 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 <xuyang2018.ky@cn.fujitsu.com>
>> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>> ---
>>   tests/xfs/148     |    2 +-
>>   tests/xfs/148.out |    4 ++--
>>   2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/tests/xfs/148 b/tests/xfs/148
>> index 42cfdab0..ec1d0ece 100755
>> --- a/tests/xfs/148
>> +++ b/tests/xfs/148
>> @@ -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"
>> diff --git a/tests/xfs/148.out b/tests/xfs/148.out
>> index c301ecb6..f95b55b7 100644
>> --- a/tests/xfs/148.out
>> +++ b/tests/xfs/148.out
>> @@ -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?
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
> 
> Thanks.
> 
>> 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
>>
>>
> 
> 
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-06  7:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-04  2:36 [PATCH] xfs/148: sort attribute list output Darrick J. Wong
2019-12-06  6:51 ` Xiaoli Feng
2019-12-06  7:08   ` Yang Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).