Linux Test Project
 help / color / mirror / Atom feed
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 7/8] syscalls/mknod07: Convert to new API
Date: Fri, 6 Jun 2025 14:21:44 +0200	[thread overview]
Message-ID: <20250606122144.GG1289709@pevik> (raw)
In-Reply-To: <20250605-conversions-mknod-v5-7-0b5cff90c21c@suse.com>

Hi Ricardo,

> +static struct tcase {
>  	char *pathname;
>  	int mode;
>  	int exp_errno;
>  	int major, minor;
> -} test_cases[] = {
> -	{ "testdir_1/tnode_1", SOCKET_MODE, EACCES, 0, 0 },
> -	{ "testdir_1/tnode_2", FIFO_MODE, EACCES, 0, 0 },
> -	{ "tnode_3", CHR_MODE, EPERM, 1, 3 },
> -	{ "tnode_4", BLK_MODE, EPERM, 0, 0 },
> -	{ "mntpoint/tnode_5", SOCKET_MODE, EROFS, 0, 0 },
> -	{ elooppathname, FIFO_MODE, ELOOP, 0, 0 },
> +} tcases[] = {
> +	{ NULL, FIFO_MODE, ELOOP, 0, 0 },
> +	{ TEMP_DIR "/tnode1", SOCKET_MODE, EACCES, 0, 0 },

I would slightly prefer to use designated initializers as it's more descriptive
and allows to avoid setting 0 or NULL:

	{ .mode = FIFO_MODE, .exp_errno = ELOOP },
	{ .pathname = TEMP_DIR "/tnode1", .mode = SOCKET_MODE, .exp_errno = EACCES },

But let's ignore it.

Thanks for the rewrite!

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

> +	{ TEMP_DIR "/tnode2", FIFO_MODE, EACCES, 0, 0 },
> +	{ "tnode3", CHR_MODE, EPERM, 1, 3 },
> +	{ "tnode4", BLK_MODE, EPERM, 0, 0 },
> +	{ TEMP_MNT "/tnode5", SOCKET_MODE, EROFS, 0, 0 },
>  };

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2025-06-06 12:22 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
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 [this message]
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=20250606122144.GG1289709@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