From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Petr Vorel <pvorel@suse.cz>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH v2 1/1] creat09: Run on all_filesystems
Date: Fri, 15 Oct 2021 07:36:53 +0000 [thread overview]
Message-ID: <61692F98.80404@fujitsu.com> (raw)
In-Reply-To: <20211015073031.18642-1-pvorel@suse.cz>
Hi Petr
> To make sure bug on XFS is detected on systems which use it.
>
> Due setgid is test problematic on Microsoft filesystems:
>
> creat09.c:81: TBROK: ntfs: Setgid bit not set
> creat09.c:76: TBROK: chown(exfat,65533,4) failed: EPERM (1)
> creat09.c:76: TBROK: chown(vfat,65533,4) failed: EPERM (1)
>
> thus they're disabled.
>
> Signed-off-by: Petr Vorel<pvorel@suse.cz>
> ---
> Changes v1->v2:
> * drop useless code creating directory (reported by Martin Doucha)
>
> testcases/kernel/syscalls/creat/creat09.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/syscalls/creat/creat09.c b/testcases/kernel/syscalls/creat/creat09.c
> index 681b80c7d..1d6c1643c 100644
> --- a/testcases/kernel/syscalls/creat/creat09.c
> +++ b/testcases/kernel/syscalls/creat/creat09.c
> @@ -33,13 +33,15 @@
> #include<stdlib.h>
> #include<sys/types.h>
> #include<pwd.h>
> +#include<stdio.h>
> #include "tst_test.h"
> #include "tst_uid.h"
>
> #define MODE_RWX 0777
> #define MODE_SGID (S_ISGID|0777)
>
> -#define WORKDIR "testdir"
> +#define MNTPOINT "mntpoint"
> +#define WORKDIR MNTPOINT "testdir"
You missed "/".
> #define CREAT_FILE WORKDIR "/creat.tmp"
> #define OPEN_FILE WORKDIR "/open.tmp"
>
> @@ -51,6 +53,8 @@ static void setup(void)
> struct stat buf;
> struct passwd *ltpuser = SAFE_GETPWNAM("nobody");
>
> + SAFE_CHDIR(MNTPOINT);
Why need chdir?
> +
> 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);
> @@ -119,6 +123,15 @@ static struct tst_test test = {
> .cleanup = cleanup,
> .needs_root = 1,
> .needs_tmpdir = 1,
This can be removed.
Best Regards
Yang Xu
> + .all_filesystems = 1,
> + .mount_device = 1,
> + .mntpoint = MNTPOINT,
> + .skip_filesystems = (const char*[]) {
> + "exfat",
> + "ntfs",
> + "vfat",
> + NULL
> + },
> .tags = (const struct tst_tag[]) {
> {"linux-git", "0fa3ecd87848"},
> {"CVE", "2018-13405"},
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2021-10-15 7:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 7:30 [LTP] [PATCH v2 1/1] creat09: Run on all_filesystems Petr Vorel
2021-10-15 7:36 ` xuyang2018.jy [this message]
2021-10-15 8:01 ` Jan Stancek
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=61692F98.80404@fujitsu.com \
--to=xuyang2018.jy@fujitsu.com \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/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