FSTests Archive on lore.kernel.org
 help / color / Atom feed
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>
Subject: [PATCH] xfs/148: sort attribute list output
Date: Tue, 3 Dec 2019 18:36:42 -0800
Message-ID: <20191204023642.GD7328@magnolia> (raw)

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

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04  2:36 Darrick J. Wong [this message]
2019-12-06  6:51 ` Xiaoli Feng
2019-12-06  7:08   ` Yang Xu

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191204023642.GD7328@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=xuyang2018.ky@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git