* xfstest 318
@ 2013-10-24 15:44 Christoph Hellwig
2013-10-24 17:05 ` Dwight Engen
2013-10-24 20:11 ` [PATCH] xfstests: generic/318 use symbolic namespaced ids Dwight Engen
0 siblings, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2013-10-24 15:44 UTC (permalink / raw)
To: Dwight Engen; +Cc: xfs
This test has always been failing for me on my Debian stable system
with the output below, any idea why this could be?
--- tests/generic/318.out 2013-09-09 14:41:08.000000000 +0000
+++ /root/xfstests/results//generic/318.out.bad 2013-10-24 15:44:01.000000000 +0000
@@ -17,7 +17,7 @@
# group: 65534
user::rw-
user:0:r-x #effective:r--
-user:1:rw- #effective:r--
+user:3:rw- #effective:r--
group::r--
group:0:--x #effective:---
mask::r--
@@ -43,7 +43,7 @@
# group: 65534
user::rw-
user:0:r-x #effective:r--
-user:1:rw- #effective:r--
+user:3:rw- #effective:r--
group::r--
group:0:--x #effective:---
mask::r--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: xfstest 318
2013-10-24 15:44 xfstest 318 Christoph Hellwig
@ 2013-10-24 17:05 ` Dwight Engen
2013-10-24 20:11 ` [PATCH] xfstests: generic/318 use symbolic namespaced ids Dwight Engen
1 sibling, 0 replies; 7+ messages in thread
From: Dwight Engen @ 2013-10-24 17:05 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Thu, 24 Oct 2013 08:44:14 -0700
Christoph Hellwig <hch@infradead.org> wrote:
> This test has always been failing for me on my Debian stable system
> with the output below, any idea why this could be?
Looks like the | getfacl_filter_id isn't doing any good on the getfacl
that is being run in the userns because the uids don't match $acl[12]
(which is the point), and the uids that _acl_setup_ids picked are not
the same distance apart as they were on my system. So on your system
$acl2 is not $acl1 + 1.
Let me see about running the second getfacl through a filter that knows
how to replace it based on the delta between $acl1 and $acl2, I think
that should always work.
> --- tests/generic/318.out 2013-09-09 14:41:08.000000000 +0000
> +++ /root/xfstests/results//generic/318.out.bad 2013-10-24
> 15:44:01.000000000 +0000 @@ -17,7 +17,7 @@
> # group: 65534
> user::rw-
> user:0:r-x #effective:r--
> -user:1:rw- #effective:r--
> +user:3:rw- #effective:r--
> group::r--
> group:0:--x #effective:---
> mask::r--
> @@ -43,7 +43,7 @@
> # group: 65534
> user::rw-
> user:0:r-x #effective:r--
> -user:1:rw- #effective:r--
> +user:3:rw- #effective:r--
> group::r--
> group:0:--x #effective:---
> mask::r--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] xfstests: generic/318 use symbolic namespaced ids
2013-10-24 15:44 xfstest 318 Christoph Hellwig
2013-10-24 17:05 ` Dwight Engen
@ 2013-10-24 20:11 ` Dwight Engen
2013-10-25 9:31 ` Christoph Hellwig
2013-11-04 20:25 ` Rich Johnston
1 sibling, 2 replies; 7+ messages in thread
From: Dwight Engen @ 2013-10-24 20:11 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph, I think the following should fix 318 for you.
--
- use namespace ids that correspond to the initial acl ids
and match them symbolically in the output
- also ensure that all uids have a mapping in the namespace
so we don't get the unmapped uid (65534) in the output
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
---
tests/generic/318 | 21 +++++++++++++++++++--
tests/generic/318.out | 20 ++++++++++----------
2 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/tests/generic/318 b/tests/generic/318
index d3bce51..810cff4 100755
--- a/tests/generic/318
+++ b/tests/generic/318
@@ -63,6 +63,23 @@ _require_scratch
_need_to_be_root
_acl_setup_ids
_require_acls
+ns_acl1=0
+ns_acl2=`expr $acl2 - $acl1`
+ns_acl3=`expr $acl3 - $acl1`
+
+_getfacl_filter_nsid()
+{
+ sed \
+ -e "s/user:$ns_acl1/user:nsid1/" \
+ -e "s/user:$ns_acl2/user:nsid2/" \
+ -e "s/user:$ns_acl3/user:nsid3/" \
+ -e "s/group:$ns_acl1/group:nsid1/" \
+ -e "s/group:$ns_acl2/group:nsid2/" \
+ -e "s/group:$ns_acl3/group:nsid3/" \
+ -e "s/: $ns_acl1/: nsid1/" \
+ -e "s/: $ns_acl2/: nsid2/" \
+ -e "s/: $ns_acl3/: nsid3/"
+}
_print_getfacls()
{
@@ -70,7 +87,7 @@ _print_getfacls()
getfacl --absolute-names -n $file 2>/dev/null | _filter_scratch | _getfacl_filter_id
echo "From user_ns"
- $nsexec -U -M "0 $acl1 1000" -G "0 $acl2 1000" getfacl --absolute-names -n $file 2>/dev/null | _filter_scratch | _getfacl_filter_id
+ $nsexec -U -M "0 $acl1 1000" -G "0 $acl1 1000" getfacl --absolute-names -n $file 2>/dev/null | _filter_scratch | _getfacl_filter_nsid
}
umount $SCRATCH_DEV >/dev/null 2>&1
@@ -85,7 +102,7 @@ chown $acl1.$acl1 $file
# set acls from init_user_ns, to be checked from inside the userns
setfacl -n -m u:$acl2:rw,g:$acl2:r $file
# set acls from inside userns, to be checked from init_user_ns
-$nsexec -s -U -M "0 $acl1 1000" -G "0 $acl2 1000" setfacl -n -m u:root:rx,g:root:x $file
+$nsexec -s -U -M "0 $acl1 1000" -G "0 $acl1 1000" setfacl -n -m u:root:rx,g:$ns_acl2:x $file
_print_getfacls
diff --git a/tests/generic/318.out b/tests/generic/318.out
index e2b42a4..6ff2bf8 100644
--- a/tests/generic/318.out
+++ b/tests/generic/318.out
@@ -13,13 +13,13 @@ other::r--
From user_ns
# file: SCRATCH_MNT/file1
-# owner: 0
-# group: 65534
+# owner: nsid1
+# group: nsid1
user::rw-
-user:0:r-x #effective:r--
-user:1:rw- #effective:r--
+user:nsid1:r-x #effective:r--
+user:nsid2:rw- #effective:r--
group::r--
-group:0:--x #effective:---
+group:nsid2:--x #effective:---
mask::r--
other::r--
@@ -39,13 +39,13 @@ other::r--
From user_ns
# file: SCRATCH_MNT/file1
-# owner: 0
-# group: 65534
+# owner: nsid1
+# group: nsid1
user::rw-
-user:0:r-x #effective:r--
-user:1:rw- #effective:r--
+user:nsid1:r-x #effective:r--
+user:nsid2:rw- #effective:r--
group::r--
-group:0:--x #effective:---
+group:nsid2:--x #effective:---
mask::r--
other::r--
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests: generic/318 use symbolic namespaced ids
2013-10-24 20:11 ` [PATCH] xfstests: generic/318 use symbolic namespaced ids Dwight Engen
@ 2013-10-25 9:31 ` Christoph Hellwig
2013-11-04 20:11 ` Rich Johnston
2013-11-04 20:25 ` Rich Johnston
1 sibling, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2013-10-25 9:31 UTC (permalink / raw)
To: Dwight Engen; +Cc: xfs
On Thu, Oct 24, 2013 at 04:11:55PM -0400, Dwight Engen wrote:
> Christoph, I think the following should fix 318 for you.
This fixes the test for me, thanks.
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests: generic/318 use symbolic namespaced ids
2013-10-25 9:31 ` Christoph Hellwig
@ 2013-11-04 20:11 ` Rich Johnston
2013-11-04 20:21 ` Rich Johnston
0 siblings, 1 reply; 7+ messages in thread
From: Rich Johnston @ 2013-11-04 20:11 UTC (permalink / raw)
To: Christoph Hellwig, Dwight Engen; +Cc: xfs
On 10/25/2013 04:31 AM, Christoph Hellwig wrote:
> On Thu, Oct 24, 2013 at 04:11:55PM -0400, Dwight Engen wrote:
>> Christoph, I think the following should fix 318 for you.
>
> This fixes the test for me, thanks.
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
Hey Dwight,
This still fails for me.
--Rich
diff -u tests/generic/318.out
/usr/src/tot/xfstests/results//generic/318.out.bad
--- tests/generic/318.out 2013-11-04 13:03:03.000000000 -0600
+++ /usr/src/tot/xfstests/results//generic/318.out.bad 2013-11-04
14:08:32.000000000 -0600
@@ -17,7 +17,7 @@
# group: 65534
user::rw-
user:0:r-x #effective:r--
-user:1:rw- #effective:r--
+user:12:rw- #effective:r--
group::r--
group:0:--x #effective:---
mask::r--
@@ -43,7 +43,7 @@
# group: 65534
user::rw-
user:0:r-x #effective:r--
-user:1:rw- #effective:r--
+user:12:rw- #effective:r--
group::r--
group:0:--x #effective:---
mask::r--
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests: generic/318 use symbolic namespaced ids
2013-11-04 20:11 ` Rich Johnston
@ 2013-11-04 20:21 ` Rich Johnston
0 siblings, 0 replies; 7+ messages in thread
From: Rich Johnston @ 2013-11-04 20:21 UTC (permalink / raw)
To: Christoph Hellwig, Dwight Engen; +Cc: xfs
On 11/04/2013 02:11 PM, Rich Johnston wrote:
>>
> Hey Dwight,
>
> This still fails for me.
>
> --Rich
>
Unsend sorry yes it does fix it, sorry for the noise.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xfstests: generic/318 use symbolic namespaced ids
2013-10-24 20:11 ` [PATCH] xfstests: generic/318 use symbolic namespaced ids Dwight Engen
2013-10-25 9:31 ` Christoph Hellwig
@ 2013-11-04 20:25 ` Rich Johnston
1 sibling, 0 replies; 7+ messages in thread
From: Rich Johnston @ 2013-11-04 20:25 UTC (permalink / raw)
To: Dwight Engen; +Cc: xfs
This has been committed.
Thanks
--Rich
commit c4d4fb21ef3b08e530512071e798bffeea6f2c74
Author: Dwight Engen <dwight.engen@oracle.com>
Date: Thu Oct 24 20:11:55 2013 +0000
xfstests: generic/318 use symbolic namespaced ids
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-11-04 20:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-24 15:44 xfstest 318 Christoph Hellwig
2013-10-24 17:05 ` Dwight Engen
2013-10-24 20:11 ` [PATCH] xfstests: generic/318 use symbolic namespaced ids Dwight Engen
2013-10-25 9:31 ` Christoph Hellwig
2013-11-04 20:11 ` Rich Johnston
2013-11-04 20:21 ` Rich Johnston
2013-11-04 20:25 ` Rich Johnston
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox