From: Catherine Hoang <catherine.hoang@oracle.com>
To: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH v1] xfs/019: extend protofile test
Date: Thu, 17 Mar 2022 23:24:08 +0000 [thread overview]
Message-ID: <20220317232408.202636-1-catherine.hoang@oracle.com> (raw)
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 <catherine.hoang@oracle.com>
---
tests/xfs/019 | 6 ++++++
tests/xfs/019.out | 12 +++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/tests/xfs/019 b/tests/xfs/019
index 3dfd5408..535b7af1 100755
--- a/tests/xfs/019
+++ b/tests/xfs/019
@@ -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"
diff --git a/tests/xfs/019.out b/tests/xfs/019.out
index 19614d9d..8584f593 100644
--- a/tests/xfs/019.out
+++ b/tests/xfs/019.out
@@ -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)
--
2.25.1
next reply other threads:[~2022-03-17 23:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-17 23:24 Catherine Hoang [this message]
2022-03-23 1:36 ` [PATCH v1] xfs/019: extend protofile test Zorro Lang
2022-03-24 15:44 ` Catherine Hoang
2022-03-24 19:26 ` Zorro Lang
2022-03-24 20:17 ` Darrick J. Wong
2022-03-25 13:33 ` Zorro Lang
2022-03-25 17:59 ` Darrick J. Wong
2022-03-26 0:40 ` Catherine Hoang
2022-03-28 20:22 ` Alli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220317232408.202636-1-catherine.hoang@oracle.com \
--to=catherine.hoang@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox