xfs/019: extend protofile test
PATCH 1/1 xfs/019: extend protofile test
This test creates an xfs filesystem and verifies that the filesystem matches what is specified by the protofile.
This patch extends the current test to check that a protofile can specify setgid mode on directories. Also, check that the created symlink isn’t broken.
--- tests/xfs/019 | 6 ++++++ tests/xfs/019.out | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-)
tests/xfs/019 +6 -0
@@ -73,6 +73,10 @@ $ setuid -u-666 0 0 $tempfile setgid --g666 0 0 $tempfile setugid -ug666 0 0 $tempfile +directory_setgid d-g755 3 2 +file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5 ---755 3 1 $tempfile +$ +: back in the root block_device b--012 3 1 161 162 char_device c--345 3 1 177 178 pipe p--670 0 0
@@ -114,6 +118,8 @@ _verify_fs() | xargs $here/src/lstat64 | _filter_stat) diff -q $SCRATCH_MNT/bigfile $tempfile.2 \ || _fail "bigfile corrupted" + diff -q $SCRATCH_MNT/symlink $tempfile.2 \ + || _fail "symlink broken" echo "*** unmount FS" _full "umount"
tests/xfs/019.out +11 -1
@@ -7,7 +7,7 @@ Wrote 2048.00Kb (value 0x2c) File: "." Size: <DSIZE> Filetype: Directory Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1) -Device: <DEVICE> Inode: <INODE> Links: 3 +Device: <DEVICE> Inode: <INODE> Links: 4 File: "./bigfile" Size: 2097152 Filetype: Regular File
@@ -54,6 +54,16 @@ Device: <DEVICE> Inode: <INODE> Links: 1 Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1) Device: <DEVICE> Inode: <INODE> Links: 1 + File: "./directory_setgid" + Size: <DSIZE> Filetype: Directory + Mode: (2755/drwxr-sr-x) Uid: (3) Gid: (2) +Device: <DEVICE> Inode: <INODE> Links: 2 + + File: "./directory_setgid/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5" + Size: 5 Filetype: Regular File + Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (2) +Device: <DEVICE> Inode: <INODE> Links: 1 + File: "./pipe" Size: 0 Filetype: Fifo File Mode: (0670/frw-rwx---) Uid: (0) Gid: (0)
Signature · 1 line
2.25.1
Quoted 9 lines · Catherine Hoang
This test creates an xfs filesystem and verifies that the filesystem matches what is specified by the protofile.
This patch extends the current test to check that a protofile can specify setgid mode on directories. Also, check that the created symlink isn’t broken.
Signed-off-by Catherine Hoang <[email protected]>---
Any specific reason to add this test? Likes uncovering some one known bug/fix?
Thanks,
Zorro
Quoted 61 lines
tests/xfs/019 | 6 ++++++ tests/xfs/019.out | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-)tests/xfs/019 +6
-0@@ -73,6 +73,10 @@ $ setuid -u-666 0 0 $tempfile setgid --g666 0 0 $tempfile setugid -ug666 0 0 $tempfile +directory_setgid d-g755 3 2 +file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5 ---755 3 1 $tempfile +$ +: back in the root block_device b--012 3 1 161 162 char_device c--345 3 1 177 178 pipe p--670 0 0@@ -114,6 +118,8 @@ _verify_fs() | xargs $here/src/lstat64 | _filter_stat) diff -q $SCRATCH_MNT/bigfile $tempfile.2 \ || _fail "bigfile corrupted" + diff -q $SCRATCH_MNT/symlink $tempfile.2 \ + || _fail "symlink broken" echo "*** unmount FS" _full "umount"tests/xfs/019.out +11
-1@@ -7,7 +7,7 @@ Wrote 2048.00Kb (value 0x2c) File: "." Size: <DSIZE> Filetype: Directory Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1) -Device: <DEVICE> Inode: <INODE> Links: 3 +Device: <DEVICE> Inode: <INODE> Links: 4 File: "./bigfile" Size: 2097152 Filetype: Regular File@@ -54,6 +54,16 @@ Device: <DEVICE> Inode: <INODE> Links: 1 Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1) Device: <DEVICE> Inode: <INODE> Links: 1 + File: "./directory_setgid" + Size: <DSIZE> Filetype: Directory + Mode: (2755/drwxr-sr-x) Uid: (3) Gid: (2) +Device: <DEVICE> Inode: <INODE> Links: 2 + + File: "./directory_setgid/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5" + Size: 5 Filetype: Regular File + Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (2) +Device: <DEVICE> Inode: <INODE> Links: 1 + File: "./pipe" Size: 0 Filetype: Fifo File Mode: (0670/frw-rwx---) Uid: (0) Gid: (0)Signature · 1 line
2.25.1
Quoted 10 lines · Zorro Lang
Quoted 7 lines · Catherine Hoang
This test creates an xfs filesystem and verifies that the filesystem matches what is specified by the protofile.
This patch extends the current test to check that a protofile can specify setgid mode on directories. Also, check that the created symlink isn’t broken.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Catherine Hoang <[email protected]>---
Any specific reason to add this test? Likes uncovering some one known bug/fix?
Thanks,
Zorro
Hi Zorro,
We’ve been exploring alternate uses for protofiles and noticed a few holes in the testing.
Thanks,
Catherine
Quoted 63 lines
Quoted 62 lines
tests/xfs/019 | 6 ++++++
tests/xfs/019.out | 12 +++++++++++-2 files changed, 17 insertions(+), 1 deletion(-)tests/xfs/019 +0
-0@@ -73,6 +73,10 @@ $setuid -u-666 0 0 $tempfile
setgid --g666 0 0 $tempfile
setugid -ug666 0 0 $tempfiletests/xfs/019 +4
-0+directory_setgid d-g755 3 2 +file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5 ---755 3 1 $tempfile +$ +: back in the root
block_deviceb--012 3 1 161 162char_devicec--345 3 1 177 178
pipe p--670 0 0tests/xfs/019 +2
-0@@ -114,6 +118,8 @@ _verify_fs() | xargs $here/src/lstat64 | _filter_stat) diff -q $SCRATCH_MNT/bigfile $tempfile.2 \ || _fail "bigfile corrupted" + diff -q $SCRATCH_MNT/symlink $tempfile.2 \ + || _fail "symlink broken" echo "*** unmount FS" _full "umount"tests/xfs/019.out +1
-1@@ -7,7 +7,7 @@ Wrote 2048.00Kb (value 0x2c) File: "." Size: <DSIZE> Filetype: Directory Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1) -Device: <DEVICE> Inode: <INODE> Links: 3 +Device: <DEVICE> Inode: <INODE> Links: 4 File: "./bigfile" Size: 2097152 Filetype: Regular File@@ -54,6 +54,16 @@ Device: <DEVICE> Inode: <INODE> Links: 1 Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)Device: <DEVICE> Inode: <INODE> Links: 1
+ File: "./directory_setgid"
+ Size: <DSIZE> Filetype: Directory
+ Mode: (2755/drwxr-sr-x) Uid: (3) Gid: (2)tests/xfs/019.out +7
-0+Device: <DEVICE> Inode: <INODE> Links: 2 + + File: "./directory_setgid/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5" + Size: 5 Filetype: Regular File + Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (2) +Device: <DEVICE> Inode: <INODE> Links: 1 + File: "./pipe" Size: 0 Filetype: Fifo File Mode: (0670/frw-rwx---) Uid: (0) Gid: (0)Signature · 1 line
2.25.1
Quoted 16 lines · Catherine Hoang
Quoted 16 lines · Zorro Lang
Quoted 9 lines · Catherine Hoang
This test creates an xfs filesystem and verifies that the filesystem matches what is specified by the protofile.
This patch extends the current test to check that a protofile can specify setgid mode on directories. Also, check that the created symlink isn’t broken.
Signed-off-by Catherine Hoang <[email protected]>---
Any specific reason to add this test? Likes uncovering some one known bug/fix?
Quoted 7 lines
Quoted 2 lines
Thanks,
ZorroHi Zorro,
We’ve been exploring alternate uses for protofiles and noticed a few holes in the testing.
That's great, but better to show some details in the patch/commit, likes a commit id of xfsprogs?/kernel? (if there's one) which fix the bug you metioned, to help others to know what's this change trying to cover.
Thanks,
Zorro
Quoted 67 lines
Thanks,
CatherineQuoted 63 lines
Quoted 62 lines
tests/xfs/019 | 6 ++++++
tests/xfs/019.out | 12 +++++++++++-2 files changed, 17 insertions(+), 1 deletion(-)tests/xfs/019 +0
-0@@ -73,6 +73,10 @@ $setuid -u-666 0 0 $tempfile
setgid --g666 0 0 $tempfile
setugid -ug666 0 0 $tempfiletests/xfs/019 +4
-0+directory_setgid d-g755 3 2 +file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5 ---755 3 1 $tempfile +$ +: back in the root
block_deviceb--012 3 1 161 162char_devicec--345 3 1 177 178
pipe p--670 0 0tests/xfs/019 +2
-0@@ -114,6 +118,8 @@ _verify_fs() | xargs $here/src/lstat64 | _filter_stat) diff -q $SCRATCH_MNT/bigfile $tempfile.2 \ || _fail "bigfile corrupted" + diff -q $SCRATCH_MNT/symlink $tempfile.2 \ + || _fail "symlink broken" echo "*** unmount FS" _full "umount"tests/xfs/019.out +1
-1@@ -7,7 +7,7 @@ Wrote 2048.00Kb (value 0x2c) File: "." Size: <DSIZE> Filetype: Directory Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1) -Device: <DEVICE> Inode: <INODE> Links: 3 +Device: <DEVICE> Inode: <INODE> Links: 4 File: "./bigfile" Size: 2097152 Filetype: Regular File@@ -54,6 +54,16 @@ Device: <DEVICE> Inode: <INODE> Links: 1 Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)Device: <DEVICE> Inode: <INODE> Links: 1
+ File: "./directory_setgid"
+ Size: <DSIZE> Filetype: Directory
+ Mode: (2755/drwxr-sr-x) Uid: (3) Gid: (2)tests/xfs/019.out +7
-0+Device: <DEVICE> Inode: <INODE> Links: 2 + + File: "./directory_setgid/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5" + Size: 5 Filetype: Regular File + Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (2) +Device: <DEVICE> Inode: <INODE> Links: 1 + File: "./pipe" Size: 0 Filetype: Fifo File Mode: (0670/frw-rwx---) Uid: (0) Gid: (0)Signature · 1 line
2.25.1
Quoted 20 lines · Zorro Lang
Quoted 19 lines · Catherine Hoang
Quoted 18 lines · Zorro Lang
Quoted 9 lines · Catherine Hoang
This test creates an xfs filesystem and verifies that the filesystem matches what is specified by the protofile.
This patch extends the current test to check that a protofile can specify setgid mode on directories. Also, check that the created symlink isn’t broken.
Signed-off-by Catherine Hoang <[email protected]>---
Any specific reason to add this test? Likes uncovering some one known bug/fix?
Thanks,
Zorro
Quoted 8 lines
Quoted 4 lines
Hi Zorro,
We’ve been exploring alternate uses for protofiles and noticed a few holes in the testing.
That's great, but better to show some details in the patch/commit, likes a commit id of xfsprogs?/kernel? (if there's one) which fix the bug you metioned, to help others to know what's this change trying to cover.
I think this patch is adding a check that protofile lines are actually being honored (in the case of the symlink file) and checking that setgid on a directory is not carried over into new children unless the protofile explicitly marks the children setgid.
IOWs, this isn't adding a regression test for a fix in xfsprogs, it's increasing test coverage.
--D
Quoted 71 lines
Thanks,
ZorroQuoted 67 lines
Thanks,
CatherineQuoted 63 lines
Quoted 62 lines
tests/xfs/019 | 6 ++++++
tests/xfs/019.out | 12 +++++++++++-2 files changed, 17 insertions(+), 1 deletion(-)tests/xfs/019 +0
-0@@ -73,6 +73,10 @@ $setuid -u-666 0 0 $tempfile
setgid --g666 0 0 $tempfile
setugid -ug666 0 0 $tempfiletests/xfs/019 +4
-0+directory_setgid d-g755 3 2 +file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5 ---755 3 1 $tempfile +$ +: back in the root
block_deviceb--012 3 1 161 162char_devicec--345 3 1 177 178
pipe p--670 0 0tests/xfs/019 +2
-0@@ -114,6 +118,8 @@ _verify_fs() | xargs $here/src/lstat64 | _filter_stat) diff -q $SCRATCH_MNT/bigfile $tempfile.2 \ || _fail "bigfile corrupted" + diff -q $SCRATCH_MNT/symlink $tempfile.2 \ + || _fail "symlink broken" echo "*** unmount FS" _full "umount"tests/xfs/019.out +1
-1@@ -7,7 +7,7 @@ Wrote 2048.00Kb (value 0x2c) File: "." Size: <DSIZE> Filetype: Directory Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1) -Device: <DEVICE> Inode: <INODE> Links: 3 +Device: <DEVICE> Inode: <INODE> Links: 4 File: "./bigfile" Size: 2097152 Filetype: Regular File@@ -54,6 +54,16 @@ Device: <DEVICE> Inode: <INODE> Links: 1 Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)Device: <DEVICE> Inode: <INODE> Links: 1
+ File: "./directory_setgid"
+ Size: <DSIZE> Filetype: Directory
+ Mode: (2755/drwxr-sr-x) Uid: (3) Gid: (2)tests/xfs/019.out +7
-0+Device: <DEVICE> Inode: <INODE> Links: 2 + + File: "./directory_setgid/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5" + Size: 5 Filetype: Regular File + Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (2) +Device: <DEVICE> Inode: <INODE> Links: 1 + File: "./pipe" Size: 0 Filetype: Fifo File Mode: (0670/frw-rwx---) Uid: (0) Gid: (0)Signature · 1 line
2.25.1
Quoted 30 lines · Darrick J. Wong
Quoted 20 lines · Zorro Lang
Quoted 19 lines · Catherine Hoang
Quoted 18 lines · Zorro Lang
Quoted 9 lines · Catherine Hoang
This test creates an xfs filesystem and verifies that the filesystem matches what is specified by the protofile.
This patch extends the current test to check that a protofile can specify setgid mode on directories. Also, check that the created symlink isn’t broken.
Signed-off-by Catherine Hoang <[email protected]>---
Any specific reason to add this test? Likes uncovering some one known bug/fix?
Thanks,
ZorroQuoted 8 lines
Quoted 4 lines
Hi Zorro,
We’ve been exploring alternate uses for protofiles and noticed a few holes in the testing.
That's great, but better to show some details in the patch/commit, likes a commit id of xfsprogs?/kernel? (if there's one) which fix the bug you metioned, to help others to know what's this change trying to cover.
Quoted 7 lines
I think this patch is adding a check that protofile lines are actually being honored (in the case of the symlink file) and checking that setgid on a directory is not carried over into new children unless the protofile explicitly marks the children setgid.
IOWs, this isn't adding a regression test for a fix in xfsprogs, it's increasing test coverage.
Oh, understand, I have no objection with this patch, just thought it covers a known bug :) If it's good to you too, let's ACK it.
Thanks,
Zorro
Quoted 75 lines
--D
Quoted 71 lines
Thanks,
ZorroQuoted 67 lines
Thanks,
CatherineQuoted 63 lines
Quoted 62 lines
tests/xfs/019 | 6 ++++++
tests/xfs/019.out | 12 +++++++++++-2 files changed, 17 insertions(+), 1 deletion(-)tests/xfs/019 +0
-0@@ -73,6 +73,10 @@ $setuid -u-666 0 0 $tempfile
setgid --g666 0 0 $tempfile
setugid -ug666 0 0 $tempfiletests/xfs/019 +4
-0+directory_setgid d-g755 3 2 +file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5 ---755 3 1 $tempfile +$ +: back in the root
block_deviceb--012 3 1 161 162char_devicec--345 3 1 177 178
pipe p--670 0 0tests/xfs/019 +2
-0@@ -114,6 +118,8 @@ _verify_fs() | xargs $here/src/lstat64 | _filter_stat) diff -q $SCRATCH_MNT/bigfile $tempfile.2 \ || _fail "bigfile corrupted" + diff -q $SCRATCH_MNT/symlink $tempfile.2 \ + || _fail "symlink broken" echo "*** unmount FS" _full "umount"tests/xfs/019.out +1
-1@@ -7,7 +7,7 @@ Wrote 2048.00Kb (value 0x2c) File: "." Size: <DSIZE> Filetype: Directory Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1) -Device: <DEVICE> Inode: <INODE> Links: 3 +Device: <DEVICE> Inode: <INODE> Links: 4 File: "./bigfile" Size: 2097152 Filetype: Regular File@@ -54,6 +54,16 @@ Device: <DEVICE> Inode: <INODE> Links: 1 Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)Device: <DEVICE> Inode: <INODE> Links: 1
+ File: "./directory_setgid"
+ Size: <DSIZE> Filetype: Directory
+ Mode: (2755/drwxr-sr-x) Uid: (3) Gid: (2)tests/xfs/019.out +7
-0+Device: <DEVICE> Inode: <INODE> Links: 2 + + File: "./directory_setgid/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5" + Size: 5 Filetype: Regular File + Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (2) +Device: <DEVICE> Inode: <INODE> Links: 1 + File: "./pipe" Size: 0 Filetype: Fifo File Mode: (0670/frw-rwx---) Uid: (0) Gid: (0)Signature · 1 line
2.25.1
Darrick J. Wong
Reviewed-byQuoted 36 lines · Zorro Lang
Quoted 35 lines · Darrick J. Wong
Quoted 20 lines · Zorro Lang
Quoted 19 lines · Catherine Hoang
Quoted 18 lines · Zorro Lang
Quoted 9 lines · Catherine Hoang
This test creates an xfs filesystem and verifies that the filesystem matches what is specified by the protofile.
This patch extends the current test to check that a protofile can specify setgid mode on directories. Also, check that the created symlink isn’t broken.
Signed-off-by Catherine Hoang <[email protected]>---
Any specific reason to add this test? Likes uncovering some one known bug/fix?
Thanks,
ZorroQuoted 8 lines
Quoted 4 lines
Hi Zorro,
We’ve been exploring alternate uses for protofiles and noticed a few holes in the testing.
That's great, but better to show some details in the patch/commit, likes a commit id of xfsprogs?/kernel? (if there's one) which fix the bug you metioned, to help others to know what's this change trying to cover.
I think this patch is adding a check that protofile lines are actually being honored (in the case of the symlink file) and checking that setgid on a directory is not carried over into new children unless the protofile explicitly marks the children setgid.
Quoted 5 lines
Quoted 2 lines
IOWs, this isn't adding a regression test for a fix in xfsprogs, it's increasing test coverage.
Oh, understand, I have no objection with this patch, just thought it covers a known bug :) If it's good to you too, let's ACK it.
Yes!
--D
Quoted 80 lines
Thanks,
ZorroQuoted 75 lines
--D
Quoted 71 lines
Thanks,
ZorroQuoted 67 lines
Thanks,
CatherineQuoted 63 lines
Quoted 62 lines
tests/xfs/019 | 6 ++++++
tests/xfs/019.out | 12 +++++++++++-2 files changed, 17 insertions(+), 1 deletion(-)tests/xfs/019 +0
-0@@ -73,6 +73,10 @@ $setuid -u-666 0 0 $tempfile
setgid --g666 0 0 $tempfile
setugid -ug666 0 0 $tempfiletests/xfs/019 +4
-0+directory_setgid d-g755 3 2 +file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5 ---755 3 1 $tempfile +$ +: back in the root
block_deviceb--012 3 1 161 162char_devicec--345 3 1 177 178
pipe p--670 0 0tests/xfs/019 +2
-0@@ -114,6 +118,8 @@ _verify_fs() | xargs $here/src/lstat64 | _filter_stat) diff -q $SCRATCH_MNT/bigfile $tempfile.2 \ || _fail "bigfile corrupted" + diff -q $SCRATCH_MNT/symlink $tempfile.2 \ + || _fail "symlink broken" echo "*** unmount FS" _full "umount"tests/xfs/019.out +1
-1@@ -7,7 +7,7 @@ Wrote 2048.00Kb (value 0x2c) File: "." Size: <DSIZE> Filetype: Directory Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1) -Device: <DEVICE> Inode: <INODE> Links: 3 +Device: <DEVICE> Inode: <INODE> Links: 4 File: "./bigfile" Size: 2097152 Filetype: Regular File@@ -54,6 +54,16 @@ Device: <DEVICE> Inode: <INODE> Links: 1 Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)Device: <DEVICE> Inode: <INODE> Links: 1
+ File: "./directory_setgid"
+ Size: <DSIZE> Filetype: Directory
+ Mode: (2755/drwxr-sr-x) Uid: (3) Gid: (2)tests/xfs/019.out +7
-0+Device: <DEVICE> Inode: <INODE> Links: 2 + + File: "./directory_setgid/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5" + Size: 5 Filetype: Regular File + Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (2) +Device: <DEVICE> Inode: <INODE> Links: 1 + File: "./pipe" Size: 0 Filetype: Fifo File Mode: (0670/frw-rwx---) Uid: (0) Gid: (0)Signature · 1 line
2.25.1
Quoted 42 lines · Darrick J. Wong
Quoted 39 lines · Zorro Lang
Quoted 37 lines · Darrick J. Wong
Quoted 20 lines · Zorro Lang
Quoted 19 lines · Catherine Hoang
Quoted 18 lines · Zorro Lang
Quoted 9 lines · Catherine Hoang
This test creates an xfs filesystem and verifies that the filesystem matches what is specified by the protofile.
This patch extends the current test to check that a protofile can specify setgid mode on directories. Also, check that the created symlink isn’t broken.
Signed-off-by Catherine Hoang <[email protected]>---
Any specific reason to add this test? Likes uncovering some one known bug/fix?
Thanks,
ZorroQuoted 8 lines
Quoted 4 lines
Hi Zorro,
We’ve been exploring alternate uses for protofiles and noticed a few holes in the testing.
That's great, but better to show some details in the patch/commit, likes a commit id of xfsprogs?/kernel? (if there's one) which fix the bug you metioned, to help others to know what's this change trying to cover.
I think this patch is adding a check that protofile lines are actually being honored (in the case of the symlink file) and checking that setgid on a directory is not carried over into new children unless the protofile explicitly marks the children setgid.
IOWs, this isn't adding a regression test for a fix in xfsprogs, it's increasing test coverage.
Quoted 7 lines
Quoted 2 lines
Oh, understand, I have no objection with this patch, just thought it covers a known bug :) If it's good to you too, let's ACK it.
Yes!
Reviewed-by Darrick J. Wong <[email protected]>--D
Thanks Darrick!
Quoted 81 lines
Quoted 81 lines
Thanks,
ZorroQuoted 75 lines
--D
Quoted 71 lines
Thanks,
ZorroQuoted 67 lines
Thanks,
CatherineQuoted 63 lines
Quoted 62 lines
tests/xfs/019 | 6 ++++++
tests/xfs/019.out | 12 +++++++++++-2 files changed, 17 insertions(+), 1 deletion(-)tests/xfs/019 +0
-0@@ -73,6 +73,10 @@ $setuid -u-666 0 0 $tempfile
setgid --g666 0 0 $tempfile
setugid -ug666 0 0 $tempfiletests/xfs/019 +4
-0+directory_setgid d-g755 3 2 +file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5 ---755 3 1 $tempfile +$ +: back in the root
block_deviceb--012 3 1 161 162char_devicec--345 3 1 177 178
pipe p--670 0 0tests/xfs/019 +2
-0@@ -114,6 +118,8 @@ _verify_fs() | xargs $here/src/lstat64 | _filter_stat) diff -q $SCRATCH_MNT/bigfile $tempfile.2 \ || _fail "bigfile corrupted" + diff -q $SCRATCH_MNT/symlink $tempfile.2 \ + || _fail "symlink broken" echo "*** unmount FS" _full "umount"tests/xfs/019.out +0
-0@@ -7,7 +7,7 @@ Wrote 2048.00Kb (value 0x2c)File: "."
Size: <DSIZE> Filetype: Directory
Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1)tests/xfs/019.out +1
-1-Device: <DEVICE> Inode: <INODE> Links: 3 +Device: <DEVICE> Inode: <INODE> Links: 4File: "./bigfile"
Size: 2097152 Filetype: Regular Filetests/xfs/019.out +0
-0@@ -54,6 +54,16 @@ Device: <DEVICE> Inode: <INODE> Links: 1 Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)Device: <DEVICE> Inode: <INODE> Links: 1
+ File: "./directory_setgid"
+ Size: <DSIZE> Filetype: Directory
+ Mode: (2755/drwxr-sr-x) Uid: (3) Gid: (2)tests/xfs/019.out +7
-0+Device: <DEVICE> Inode: <INODE> Links: 2 + + File: "./directory_setgid/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5" + Size: 5 Filetype: Regular File + Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (2) +Device: <DEVICE> Inode: <INODE> Links: 1 +File: "./pipe"
Size: 0 Filetype: Fifo File
Mode: (0670/frw-rwx---) Uid: (0) Gid: (0)Signature · 1 line
2.25.1
Alli
Reviewed-by Allison HendersonQuoted 55 lines · Darrick J. Wong
Quoted 54 lines · Zorro Lang
Quoted 52 lines · Darrick J. Wong
Quoted 34 lines · Zorro Lang
Quoted 23 lines · Catherine Hoang
Quoted 23 lines
On Mar 22, 2022, at 6:36 PM, Zorro Lang <[email protected]> wrote:
Quoted 10 lines · Catherine Hoang
This test creates an xfs filesystem and verifies that the filesystem
matches what is specified by the protofile.This patch extends the current test to check that a protofile can specify
setgid mode on directories. Also, check that the created symlink isn’t
broken.Quoted 3 lines
Signed-off-by: Catherine Hoang < [email protected]>
---Any specific reason to add this test? Likes uncovering some one known
bug/fix?Quoted 8 lines
Quoted 2 lines
Thanks,
ZorroHi Zorro,
We’ve been exploring alternate uses for protofiles and noticed a few holes
in the testing.Quoted 6 lines
That's great, but better to show some details in the patch/commit, likes
a commit id of xfsprogs?/kernel? (if there's one) which fix the bug you
metioned, to help others to know what's this change trying to cover.I think this patch is adding a check that protofile lines are actually
being honored (in the case of the symlink file) and checking that setgid
on a directory is not carried over into new children unless the protofile explicitly marks the children setgid.IOWs, this isn't adding a regression test for a fix in xfsprogs, it's
increasing test coverage.
Quoted 9 lines
Quoted 3 lines
Oh, understand, I have no objection with this patch, just thought it covers
a known bug :) If it's good to you too, let's ACK it.Yes!
Reviewed-by Darrick J. Wong <[email protected]>--D
This looks good to me as well. Feel free to add my rvb:
Thanks!
Allison
Quoted 75 lines
Quoted 75 lines
Thanks,
ZorroQuoted 72 lines
--D
Quoted 70 lines
Thanks,
ZorroQuoted 67 lines
Thanks,
CatherineQuoted 65 lines
Quoted 65 lines
tests/xfs/019 | 6 ++++++
tests/xfs/019.out | 12 +++++++++++-2 files changed, 17 insertions(+), 1 deletion(-)tests/xfs/019 +0
-0@@ -73,6 +73,10 @@ $setuid -u-666 0 0 $tempfile setgid --g666 0 0 $tempfile setugid -ug666 0 0 $tempfile
tests/xfs/019 +4
-1+directory_setgid d-g755 3 2 +file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_5 - --755 3 1 $tempfile +$ +: back in the root
block_deviceb--012 3 1 161 162char_devicec--345 3 1 177 178 pipe p--670 0 0tests/xfs/019 +2
-0@@ -114,6 +118,8 @@ _verify_fs() | xargs $here/src/lstat64 | _filter_stat) diff -q $SCRATCH_MNT/bigfile $tempfile.2 \ || _fail "bigfile corrupted" + diff -q $SCRATCH_MNT/symlink $tempfile.2 \ + || _fail "symlink broken" echo "*** unmount FS" _full "umount"tests/xfs/019.out +1
-1@@ -7,7 +7,7 @@ Wrote 2048.00Kb (value 0x2c) File: "." Size: <DSIZE> Filetype: Directory Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1) -Device: <DEVICE> Inode: <INODE> Links: 3 +Device: <DEVICE> Inode: <INODE> Links: 4 File: "./bigfile" Size: 2097152 Filetype: Regular File@@ -54,6 +54,16 @@ Device: <DEVICE> Inode: <INODE> Links:1
Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (1)
Device: <DEVICE> Inode: <INODE> Links: 1+ File: "./directory_setgid"
+ Size: <DSIZE> Filetype: Directory
+ Mode: (2755/drwxr-sr-x) Uid: (3) Gid: (2)tests/xfs/019.out +3
-0+Device: <DEVICE> Inode: <INODE> Links: 2 + + File:"./directory_setgid/file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxx_5"
+ Size: 5 Filetype: Regular File
+ Mode: (0755/-rwxr-xr-x) Uid: (3) Gid: (2)tests/xfs/019.out +2
-0+Device: <DEVICE> Inode: <INODE> Links: 1 + File: "./pipe" Size: 0 Filetype: Fifo File Mode: (0670/frw-rwx---) Uid: (0) Gid: (0)Signature · 1 line
2.25.1