Use numeric user and group IDs in getfacl
cover Use numeric user and group IDs in getfacl
Hi,
I just saw generic/319 test failing in a system where /etc/group didn't had the 0 group ID defined. I guess that's not a common setup, but the test can easily fixed by having getfacl returning the numeric IDs instead.
Running 'git grep' showed that overlay/023 seems have a similar issue and, although I didn't tested it, I'm sending the fix for that test as well.
Luis Henriques (2):
generic/319: use number user and group IDs in getfacl overlay/023: use number user and group IDs in getfacl
tests/generic/319 | 4 ++-- tests/generic/319.out | 8 ++++---- tests/overlay/023 | 2 +- tests/overlay/023.out | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-)
PATCH 1/2 generic/319: use numeric user and group IDs in getfacl
This prevents test failures if cases where, e.g., /etc/group doesn't include the 'root' group ID.
--- tests/generic/319 | 4 ++-- tests/generic/319.out | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
tests/generic/319 +2 -2
@@ -44,10 +44,10 @@ _scratch_mount mkdir $SCRATCH_MNT/testdir setfacl -d --set u::rwx,g::rwx,o::- $SCRATCH_MNT/testdir -getfacl --absolute-names $SCRATCH_MNT/testdir | _filter_scratch +getfacl -n --absolute-names $SCRATCH_MNT/testdir | _filter_scratch mkdir $SCRATCH_MNT/testdir/testsubdir -getfacl --absolute-names $SCRATCH_MNT/testdir/testsubdir | _filter_scratch +getfacl -n --absolute-names $SCRATCH_MNT/testdir/testsubdir | _filter_scratch # success, all done status=0
tests/generic/319.out +4 -4
@@ -1,7 +1,7 @@ QA output created by 319 # file: SCRATCH_MNT/testdir -# owner: root -# group: root +# owner: 0 +# group: 0 user::rwx group::r-x other::r-x
@@ -10,8 +10,8 @@ default:group::rwx default:other::--- # file: SCRATCH_MNT/testdir/testsubdir -# owner: root -# group: root +# owner: 0 +# group: 0 user::rwx group::rwx other::---
Re: [PATCH 1/2] generic/319: use numeric user and group IDs in getfacl
Quoted 6 lines · Luis Henriques
This prevents test failures if cases where, e.g.,
/etc/groupdoesn't include the 'root' group ID.Cc Filipe Manana <[email protected]>Signed-off-by Luis Henriques <[email protected]>
Looks good, thanks.
Quoted 47 lines
--- tests/generic/319 | 4 ++-- tests/generic/319.out | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)tests/generic/319 +2
-2@@ -44,10 +44,10 @@ _scratch_mount mkdir $SCRATCH_MNT/testdir setfacl -d --set u::rwx,g::rwx,o::- $SCRATCH_MNT/testdir -getfacl --absolute-names $SCRATCH_MNT/testdir | _filter_scratch +getfacl -n --absolute-names $SCRATCH_MNT/testdir | _filter_scratch mkdir $SCRATCH_MNT/testdir/testsubdir -getfacl --absolute-names $SCRATCH_MNT/testdir/testsubdir | _filter_scratch +getfacl -n --absolute-names $SCRATCH_MNT/testdir/testsubdir | _filter_scratch # success, all done status=0tests/generic/319.out +4
-4@@ -1,7 +1,7 @@ QA output created by 319 # file: SCRATCH_MNT/testdir -# owner: root -# group: root +# owner: 0 +# group: 0 user::rwx group::r-x other::r-x@@ -10,8 +10,8 @@ default:group::rwx default:other::--- # file: SCRATCH_MNT/testdir/testsubdir -# owner: root -# group: root +# owner: 0 +# group: 0 user::rwx group::rwx other::---
Signature · 3 lines
Filipe David Manana, “Whether you think you can, or you think you can't — you're right.”
PATCH 2/2 overlay/023: use numeric user and group IDs in getfacl
In reply to Luis HenriquesThis prevents test failures if cases where, e.g., /etc/group doesn't include the 'root' group ID.
--- tests/overlay/023 | 2 +- tests/overlay/023.out | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
tests/overlay/023 +1 -1
@@ -55,7 +55,7 @@ setfacl -d -m o::rwx $wkdir _scratch_mount # getting acls, ACL set on workdir should be cleaned -getfacl -p $wkdir/work 2>&1 | _filter_scratch | _filter_ovl_dirs +getfacl -n -p $wkdir/work 2>&1 | _filter_scratch | _filter_ovl_dirs # success, all done status=0
tests/overlay/023.out +2 -2
@@ -1,7 +1,7 @@ QA output created by 023 # file: SCRATCH_DEV/OVL_WORK/work -# owner: root -# group: root +# owner: 0 +# group: 0 user::--- group::--- other::---
Re: [PATCH 2/2] overlay/023: use numeric user and group IDs in getfacl
Quoted 2 lines · Luis Henriques
This prevents test failures if cases where, e.g.,
/etc/groupdoesn't include the 'root' group ID.
Ack for this patch(I don't see that other 1/2 one). Thanks!
Xiong
Quoted 35 lines
Cc Xiong Zhou <[email protected]>Signed-off-by Luis Henriques <[email protected]>--- tests/overlay/023 | 2 +- tests/overlay/023.out | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)tests/overlay/023 +1
-1@@ -55,7 +55,7 @@ setfacl -d -m o::rwx $wkdir _scratch_mount # getting acls, ACL set on workdir should be cleaned -getfacl -p $wkdir/work 2>&1 | _filter_scratch | _filter_ovl_dirs +getfacl -n -p $wkdir/work 2>&1 | _filter_scratch | _filter_ovl_dirs # success, all done status=0tests/overlay/023.out +2
-2@@ -1,7 +1,7 @@ QA output created by 023 # file: SCRATCH_DEV/OVL_WORK/work -# owner: root -# group: root +# owner: 0 +# group: 0 user::--- group::--- other::---