From: Petr Vorel <pvorel@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] isofs.sh: Create group and user before check mount option
Date: Thu, 29 Aug 2024 01:02:06 +0200 [thread overview]
Message-ID: <20240828230206.GA1811258@pevik> (raw)
In-Reply-To: <20240828134551.6344-1-wegao@suse.com>
Hi Wei,
> Case will failed if default system has no group named "bin", such
> as suse sle-micro, so this patch will create specific group for test
> instead of fixed "bin" group.
I wonder if we should not add this group to SUT, there are more tests which
needs some group (IDcheck.sh has bin, daemon, nobody, ...), e.g. hugeshmat03.c,
cgroup_core0[12].c, access01.c use nobody. Maybe that is more common than bin
(and presented on the SUT).
FYI we even have a ticket, although I don't expect you would have time to
to work on something generic...
https://github.com/linux-test-project/ltp/issues/468
...
> MAX_DEPTH=3
> MAX_DIRS=4
> +test_group="abc"
... thus I'm not opposite to workaround like this. But it'd be better to name
the new user ltp_isofs or something really unique.
> +
> +setup()
> +{
> + if ! getent group $test_group > /dev/null; then
> + useradd -U $test_group
> + fi
> +}
> +
> +cleanup()
> +{
> + userdel -f $test_group
> + groupdel -f $test_group
+1 for using userdel which is everywhere.
But maybe prefix it with ROD?
or use TST_NEEDS_CMDS to make sure both binaries are on SUT?
Kind regards,
Petr
> +}
> +
> gen_fs_tree()
> {
> local cur_path="$1"
> @@ -92,8 +109,8 @@ do_test()
> "loop,block=512,unhide" \
> "loop,block=1024,cruft" \
> "loop,block=2048,nocompress" \
> - "loop,check=strict,map=off,gid=bin,uid=bin" \
> - "loop,check=strict,map=acorn,gid=bin,uid=bin" \
> + "loop,block=2048,nocompress" \ "loop,check=strict,map=off,gid=$test_group,uid=$test_group" \
> + "loop,check=strict,map=acorn,gid=$test_group,uid=$test_group" \
> "loop,check=relaxed,map=normal" \
> "loop,block=512,unhide,session=2"
> do
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-08-28 23:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 5:25 [LTP] [PATCH v1] isofs.sh: Create group and user before check mount option Wei Gao via ltp
2024-08-28 9:14 ` Cyril Hrubis
2024-08-28 13:45 ` [LTP] [PATCH v2] " Wei Gao via ltp
2024-08-28 23:02 ` Petr Vorel [this message]
2024-08-29 6:59 ` [LTP] [PATCH v3] " Wei Gao via ltp
2024-08-30 11:55 ` Petr Vorel
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=20240828230206.GA1811258@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=wegao@suse.com \
/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