* 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
* Re: xfstests: ignore absolute address in filename in test case 237
2010-12-09 13:40 ` Boris Ranto
@ 2010-12-10 14:35 ` Christoph Hellwig
0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2010-12-10 14:35 UTC (permalink / raw)
To: Boris Ranto; +Cc: xfs
I don't mind the patch, but what version of getfacl would produce an
absolute filename?
_______________________________________________
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
[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
0 siblings, 1 reply; 5+ messages in thread
From: Boris Ranto @ 2010-12-13 10:54 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
----- "Christoph Hellwig" <hch@infradead.org> wrote:
> I don't mind the patch, but what version of getfacl would produce an
> absolute filename?
The behavior was found in acl-2.2.39-6.el5:
* setfacl -m 'user:test:rw' file
setfacl: /mnt/tests/kernel/filesystems/xfs/xfstests/file: Operation not permitted
* setfacl --version
setfacl 2.2.39
_______________________________________________
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-13 10:54 ` Boris Ranto
@ 2010-12-14 19:18 ` Christoph Hellwig
0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2010-12-14 19:18 UTC (permalink / raw)
To: Boris Ranto; +Cc: Christoph Hellwig, xfs
On Mon, Dec 13, 2010 at 05:54:50AM -0500, Boris Ranto wrote:
> ----- "Christoph Hellwig" <hch@infradead.org> wrote:
>
> > I don't mind the patch, but what version of getfacl would produce an
> > absolute filename?
>
> The behavior was found in acl-2.2.39-6.el5:
>
> * setfacl -m 'user:test:rw' file
> setfacl: /mnt/tests/kernel/filesystems/xfs/xfstests/file: Operation not permitted
> * setfacl --version
> setfacl 2.2.39
Ok. I'll apply the patch.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
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