FSTests Archive on lore.kernel.org
 help / color / Atom feed
From: XiaoLi Feng <xifeng@redhat.com>
To: fstests@vger.kernel.org
Cc: darrick.wong@oracle.com, Xiaoli Feng <xifeng@redhat.com>
Subject: [PATCH v1] xfs/148: fix some errors for output
Date: Wed,  4 Dec 2019 16:04:23 +0800
Message-ID: <20191204080423.27295-1-xifeng@redhat.com> (raw)

From: Xiaoli Feng <xifeng@redhat.com>

When disable crc, the extended attributes display is different for
"attr -l". And there is no quotes when ls no-exist file in RHEL7. eg.
RHEL7:
ls: cannot access file: No such file or directory
RHEL8:
ls: cannot access 'file': No such file or directory

Signed-off-by: Xiaoli Feng <xifeng@redhat.com>
---
 tests/xfs/148     |  2 +-
 tests/xfs/148.out | 17 +++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/tests/xfs/148 b/tests/xfs/148
index 42cfdab0..1203edd9 100755
--- a/tests/xfs/148
+++ b/tests/xfs/148
@@ -79,7 +79,7 @@ access_stuff() {
 	$ATTR_PROG -l $testfile
 
 	for name in "${test_names[@]}"; do
-		ls "$testdir/f_$name"
+		ls "$testdir/f_$name" 2>&1 | sed -e "s/'//g"
 		$ATTR_PROG -g "a_$name" $testfile
 	done
 }
diff --git a/tests/xfs/148.out b/tests/xfs/148.out
index c301ecb6..b1bea98a 100644
--- a/tests/xfs/148.out
+++ b/tests/xfs/148.out
@@ -4,10 +4,11 @@ f_another
 f_are_bad_for_you
 f_something
 f_too_many_beans
-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_too_many_beans" 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
+Attribute "a_something" has a 3 byte value for TEST_DIR/mount-148/testfile
+Attribute "selinux" has a 37 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
@@ -20,10 +21,10 @@ heh
 TEST_DIR/mount-148/testdir/f_another
 Attribute "a_another" had a 3 byte value for TEST_DIR/mount-148/testfile:
 heh
-ls: cannot access 'TEST_DIR/mount-148/testdir/f_too_many': No such file or directory
+ls: cannot access TEST_DIR/mount-148/testdir/f_too_many: No such file or directory
 attr_get: No data available
 Could not get "a_too_many" for TEST_DIR/mount-148/testfile
-ls: cannot access 'TEST_DIR/mount-148/testdir/f_are_bad/for_you': No such file or directory
+ls: cannot access TEST_DIR/mount-148/testdir/f_are_bad/for_you: No such file or directory
 attr_get: No data available
 Could not get "a_are_bad/for_you" for TEST_DIR/mount-148/testfile
 ++ ACCESSING BAD METADATA
@@ -33,18 +34,18 @@ attr_list: Structure needs cleaning
 TEST_DIR/mount-148/testdir/f_something
 Attribute "a_something" had a 3 byte value for TEST_DIR/mount-148/testfile:
 heh
-ls: cannot access 'TEST_DIR/mount-148/testdir/f_too_many_beans': No such file or directory
+ls: cannot access TEST_DIR/mount-148/testdir/f_too_many_beans: No such file or directory
 attr_get: No data available
 Could not get "a_too_many_beans" for TEST_DIR/mount-148/testfile
-ls: cannot access 'TEST_DIR/mount-148/testdir/f_are_bad_for_you': No such file or directory
+ls: cannot access TEST_DIR/mount-148/testdir/f_are_bad_for_you: No such file or directory
 attr_get: No data available
 Could not get "a_are_bad_for_you" for TEST_DIR/mount-148/testfile
 TEST_DIR/mount-148/testdir/f_another
 Attribute "a_another" had a 3 byte value for TEST_DIR/mount-148/testfile:
 heh
-ls: cannot access 'TEST_DIR/mount-148/testdir/f_too_many': No such file or directory
+ls: cannot access TEST_DIR/mount-148/testdir/f_too_many: No such file or directory
 attr_get: No data available
 Could not get "a_too_many" for TEST_DIR/mount-148/testfile
-ls: cannot access 'TEST_DIR/mount-148/testdir/f_are_bad/for_you': No such file or directory
+ls: cannot access TEST_DIR/mount-148/testdir/f_are_bad/for_you: No such file or directory
 Attribute "a_are_bad/for_you" had a 3 byte value for TEST_DIR/mount-148/testfile:
 heh
-- 
2.18.1


             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04  8:04 XiaoLi Feng [this message]
2019-12-04 16:10 ` Darrick J. Wong
2019-12-06  6:45   ` Xiaoli Feng

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=20191204080423.27295-1-xifeng@redhat.com \
    --to=xifeng@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    /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