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 v5 4/8] syscalls/mknod04: Convert to new API
Date: Fri, 6 Jun 2025 13:27:20 +0200 [thread overview]
Message-ID: <20250606112720.GC1289709@pevik> (raw)
In-Reply-To: <20250605-conversions-mknod-v5-4-0b5cff90c21c@suse.com>
Hi Ricardo,
...
> -#define MODE_RWX S_IFIFO | S_IRWXU | S_IRWXG | S_IRWXO
Similarly, to what I noted to mknod03.c in v4:
https://lore.kernel.org/ltp/20250605073231.GC1190804@pevik/
Originally here was also S_IFIFO (used for both mkdir() and mknod()). Although
the tests "works" IMHO we should use mknod() with S_IFIFO (and I believe it's
not needed for mkdir().
> -#define MODE_SGID S_IFIFO | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO
> +#define MODE_RWX 0777
But you omit it.
> +#define MODE_SGID (S_ISGID | 0777)
...
> - /*
> - * TEST CASE CONDITION:
> - * Attempt to create a filesystem node on a directory
> - * with group id (sgid) bit set such that,
> - * the node created by mknod(2) should not have group id
> - * (sgid) bit set and node's gid should be equal to the
> - * effective gid of the process.
> - */
> - TEST(mknod(node_name, MODE_RWX, 0));
> + SAFE_MKNOD(TEMP_NODE, MODE_RWX, 0);
I vote for following diff (no need to repost).
Kind regards,
Petr
+++ testcases/kernel/syscalls/mknod/mknod04.c
@@ -17,6 +17,7 @@
#include "tst_test.h"
#define MODE_RWX 0777
+#define MODE_FIFO (S_IFIFO | 0777)
#define MODE_SGID (S_ISGID | 0777)
#define TEMP_DIR "testdir"
@@ -29,7 +30,7 @@ static void run(void)
{
struct stat buf;
- SAFE_MKNOD(TEMP_NODE, MODE_RWX, 0);
+ SAFE_MKNOD(TEMP_NODE, MODE_FIFO, 0);
SAFE_STAT(TEMP_NODE, &buf);
TST_EXP_EQ_LI(buf.st_mode & S_ISGID, 0);
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-06-06 11:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 12:52 [LTP] [PATCH v5 0/8] syscalls/mknod: Refactor all tests Ricardo B. Marlière via ltp
2025-06-05 12:52 ` [LTP] [PATCH v5 1/8] syscalls/mknod01: Fix checkpatch.pl warnings Ricardo B. Marlière via ltp
2025-06-05 12:52 ` [LTP] [PATCH v5 2/8] syscalls/mknod02: Use relative path to avoid use of SAFE_CHDIR Ricardo B. Marlière via ltp
2025-06-06 10:08 ` Petr Vorel
2025-06-05 12:52 ` [LTP] [PATCH v5 3/8] syscalls/mknod03: Convert to new API Ricardo B. Marlière via ltp
2025-06-06 10:34 ` Petr Vorel
2025-06-06 11:49 ` Petr Vorel
2025-06-06 11:57 ` Ricardo B. Marlière via ltp
2025-06-06 12:33 ` Petr Vorel
2025-06-05 12:52 ` [LTP] [PATCH v5 4/8] syscalls/mknod04: " Ricardo B. Marlière via ltp
2025-06-06 10:48 ` Petr Vorel
2025-06-06 11:05 ` Ricardo B. Marlière via ltp
2025-06-06 11:27 ` Petr Vorel [this message]
2025-06-06 11:31 ` Ricardo B. Marlière via ltp
2025-06-06 13:59 ` Petr Vorel
2025-06-05 12:52 ` [LTP] [PATCH v5 5/8] syscalls/mknod05: " Ricardo B. Marlière via ltp
2025-06-06 11:44 ` Petr Vorel
2025-06-06 11:45 ` Ricardo B. Marlière via ltp
2025-06-05 12:52 ` [LTP] [PATCH v5 6/8] syscalls/mknod06: " Ricardo B. Marlière via ltp
2025-06-06 12:06 ` Petr Vorel
2025-06-05 12:52 ` [LTP] [PATCH v5 7/8] syscalls/mknod07: " Ricardo B. Marlière via ltp
2025-06-06 12:21 ` Petr Vorel
2025-06-05 12:52 ` [LTP] [PATCH v5 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=20250606112720.GC1289709@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.