From: Petr Vorel <pvorel@suse.cz>
To: "Ricardo B. Marlière" <rbm@suse.com>
Cc: Linux Test Project <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH v3 2/8] syscalls/mknod02: Use relative path to avoid use of SAFE_CHDIR
Date: Tue, 22 Apr 2025 15:06:45 +0200 [thread overview]
Message-ID: <20250422130645.GA934527@pevik> (raw)
In-Reply-To: <20250414-conversions-mknod-v3-2-e08e7463bfaa@suse.com>
Hi Ricardo, all,
...
> +++ b/testcases/kernel/syscalls/mknod/mknod02.c
> @@ -20,7 +20,7 @@
> #define MODE_SGID 02000
> #define TEMP_DIR "testdir"
> -#define TEMP_NODE "testnode"
> +#define TEMP_NODE TEMP_DIR "/testnode"
> static struct stat buf;
> static struct passwd *user_nobody;
> @@ -37,14 +37,12 @@ static void setup(void)
> static void run(void)
> {
> - SAFE_CHDIR(TEMP_DIR);
> TST_EXP_PASS(mknod(TEMP_NODE, MODE1, 0), "mknod(%s, %o, 0)", TEMP_NODE, MODE1);
> SAFE_STAT(TEMP_NODE, &buf);
> TST_EXP_EQ_LI(buf.st_gid, 0);
> SAFE_UNLINK(TEMP_NODE);
> - SAFE_CHDIR("..");
I'm trying to figure out why the original test used SAFE_CHDIR().
IMHO mknod() should not be affected when called from an upper directory.
@Avinesh @Li did I overlook something obvious?
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-04-22 13:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 20:09 [LTP] [PATCH v3 0/8] syscalls/mknod: Refactor all tests Ricardo B. Marlière via ltp
2025-04-14 20:09 ` [LTP] [PATCH v3 1/8] syscalls/mknod01: Fix checkpatch.pl warnings Ricardo B. Marlière via ltp
2025-04-22 10:52 ` Petr Vorel
2025-04-22 12:09 ` Ricardo B. Marlière via ltp
2025-04-14 20:09 ` [LTP] [PATCH v3 2/8] syscalls/mknod02: Use relative path to avoid use of SAFE_CHDIR Ricardo B. Marlière via ltp
2025-04-22 13:06 ` Petr Vorel [this message]
2025-05-15 2:49 ` Li Wang via ltp
2025-04-14 20:09 ` [LTP] [PATCH v3 3/8] syscalls/mknod03: Convert to new API Ricardo B. Marlière via ltp
2025-04-22 14:02 ` Petr Vorel
2025-04-22 14:32 ` Ricardo B. Marlière via ltp
2025-04-14 20:09 ` [LTP] [PATCH v3 4/8] syscalls/mknod04: " Ricardo B. Marlière via ltp
2025-04-22 14:06 ` Petr Vorel
2025-04-14 20:09 ` [LTP] [PATCH v3 5/8] syscalls/mknod05: " Ricardo B. Marlière via ltp
2025-04-25 15:30 ` Cyril Hrubis
2025-04-25 16:26 ` Ricardo B. Marlière via ltp
2025-04-14 20:09 ` [LTP] [PATCH v3 6/8] syscalls/mknod06: " Ricardo B. Marlière via ltp
2025-04-14 20:09 ` [LTP] [PATCH v3 7/8] syscalls/mknod07: " Ricardo B. Marlière via ltp
2025-04-14 20:09 ` [LTP] [PATCH v3 8/8] syscalls/mknod08: " Ricardo B. Marlière via ltp
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=20250422130645.GA934527@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=rbm@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