From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Zhao Gongyi <zhaogongyi@huawei.com>
Cc: Zhao Gongyi via ltp <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] syscalls/creat09: Add umask(0) to setup
Date: Fri, 8 Jul 2022 01:19:37 +0000 [thread overview]
Message-ID: <62C79471.1090700@fujitsu.com> (raw)
In-Reply-To: <20220708005657.108858-1-zhaogongyi@huawei.com>
Hi Zhao
I don't this fix is meaningful because it only for "fix" this failure
so do you look into why umask(0077) lead this case fail?
I have rejected a similar patch[1] from petr yesterday because it has
bug exists on kernel fs sgid strip logic.
[1]https://lists.linux.it/pipermail/ltp/2022-July/029495.html
Best Regards
Yang Xu
> The bit S_ISGID of st_mode is also affected by umask, if umask is 0077,
> the test will fail.
>
> Signed-off-by: Zhao Gongyi<zhaogongyi@huawei.com>
> ---
> testcases/kernel/syscalls/creat/creat09.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/creat/creat09.c b/testcases/kernel/syscalls/creat/creat09.c
> index bed7bddb0..6edd5dbb9 100644
> --- a/testcases/kernel/syscalls/creat/creat09.c
> +++ b/testcases/kernel/syscalls/creat/creat09.c
> @@ -52,6 +52,8 @@ static void setup(void)
> struct stat buf;
> struct passwd *ltpuser = SAFE_GETPWNAM("nobody");
>
> + umask(0);
> +
> tst_res(TINFO, "User nobody: uid = %d, gid = %d", (int)ltpuser->pw_uid,
> (int)ltpuser->pw_gid);
> free_gid = tst_get_free_gid(ltpuser->pw_gid);
> --
> 2.17.1
>
>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-07-08 1:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 0:56 [LTP] [PATCH] syscalls/creat09: Add umask(0) to setup Zhao Gongyi via ltp
2022-07-08 1:19 ` xuyang2018.jy [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-07-08 6:18 zhaogongyi via ltp
2022-07-08 7:26 ` xuyang2018.jy
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=62C79471.1090700@fujitsu.com \
--to=xuyang2018.jy@fujitsu.com \
--cc=ltp@lists.linux.it \
--cc=zhaogongyi@huawei.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