* xfstests: ignore absolute address in filename in test case 237
@ 2010-12-09 13:05 Boris Ranto
2010-12-09 13:40 ` Boris Ranto
0 siblings, 1 reply; 5+ messages in thread
From: Boris Ranto @ 2010-12-09 13:05 UTC (permalink / raw)
To: xfs
Test case 237 checks for setfacl output. The setfacl can use both
relative address or absolute address for filename.
Following patch ignores the unnecessary part of absolute address and
therefore the test case can pass on systems that output absolute
address:
diff -urpN a/xfstests/237 b/xfstests/237
--- a/xfstests/237 2010-12-09 11:24:48.587432718 +0100
+++ b/xfstests/237 2010-12-09 13:46:29.008245581 +0100
@@ -72,7 +72,7 @@ touch file1
chown $acl1.$acl1 file1
echo "Expect to FAIL"
-$runas -u $acl2 -g $acl2 -- `which setfacl` -m u::rwx file1 2>&1
+$runas -u $acl2 -g $acl2 -- `which setfacl` -m u::rwx file1 2>&1 | sed 's/^setfacl: \/.*file1: Operation not permitted$/setfacl: file1: Operation not permitted/'
echo "Test over."
# success, all done
Signed-off-by: Boris Ranto <branto@redhat.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xfstests: ignore absolute address in filename in test case 237
2010-12-09 13:05 xfstests: ignore absolute address in filename in test case 237 Boris Ranto
@ 2010-12-09 13:40 ` Boris Ranto
2010-12-10 14:35 ` Christoph Hellwig
0 siblings, 1 reply; 5+ messages in thread
From: Boris Ranto @ 2010-12-09 13:40 UTC (permalink / raw)
To: xfs
On Thu, 2010-12-09 at 14:05 +0100, Boris Ranto wrote:
> Test case 237 checks for setfacl output. The setfacl can use both
> relative address or absolute address for filename.
>
> Following patch ignores the unnecessary part of absolute address and
> therefore the test case can pass on systems that output absolute
> address:
>
> diff -urpN a/xfstests/237 b/xfstests/237
> --- a/xfstests/237 2010-12-09 11:24:48.587432718 +0100
> +++ b/xfstests/237 2010-12-09 13:46:29.008245581 +0100
> @@ -72,7 +72,7 @@ touch file1
> chown $acl1.$acl1 file1
>
> echo "Expect to FAIL"
> -$runas -u $acl2 -g $acl2 -- `which setfacl` -m u::rwx file1 2>&1
> +$runas -u $acl2 -g $acl2 -- `which setfacl` -m u::rwx file1 2>&1 | sed 's/^setfacl: \/.*file1: Operation not permitted$/setfacl: file1: Operation not permitted/'
>
> echo "Test over."
> # success, all done
>
> Signed-off-by: Boris Ranto <branto@redhat.com>
I noticed that text is usually filtered in a little different way
therefore I'd rather suggest the following patch:
diff -urpN a/xfstests/237 b/xfstests/237
--- a/xfstests/237 2010-12-09 11:24:48.587432718 +0100
+++ b/xfstests/237 2010-12-09 14:24:09.463402051 +0100
@@ -47,6 +47,11 @@ _cleanup()
_cleanup_testdir
}
+# Allow absolute path in setfacl output
+_filter_absolute_path()
+{
+ sed 's/^setfacl: \/.*file1: Operation not permitted$/setfacl: file1: Operation not permitted/'
+}
# real QA test starts here
_supported_fs generic
# only Linux supports fallocate
@@ -72,7 +77,7 @@ touch file1
chown $acl1.$acl1 file1
echo "Expect to FAIL"
-$runas -u $acl2 -g $acl2 -- `which setfacl` -m u::rwx file1 2>&1
+$runas -u $acl2 -g $acl2 -- `which setfacl` -m u::rwx file1 2>&1 | _filter_absolute_path
echo "Test over."
# success, all done
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1924340607.1111921292237137384.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com>]
end of thread, other threads:[~2010-12-14 19:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-09 13:05 xfstests: ignore absolute address in filename in test case 237 Boris Ranto
2010-12-09 13:40 ` Boris Ranto
2010-12-10 14:35 ` Christoph Hellwig
[not found] <1924340607.1111921292237137384.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com>
2010-12-13 10:54 ` Boris Ranto
2010-12-14 19:18 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox