From: Cyril Hrubis <chrubis@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: Jan Kara <jack@suse.cz>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3] ioctl_loop01.c: Use proper device for partitioning
Date: Tue, 9 Sep 2025 13:50:30 +0200 [thread overview]
Message-ID: <aMAUhpxi1GaDBfGF@yuki.lan> (raw)
In-Reply-To: <20250902111809.6071-1-wegao@suse.com>
Hi!
> .../kernel/syscalls/ioctl/ioctl_loop01.c | 34 ++++++++-----------
> 1 file changed, 15 insertions(+), 19 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/ioctl/ioctl_loop01.c b/testcases/kernel/syscalls/ioctl/ioctl_loop01.c
> index c9137bf1e..b70e9fc22 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl_loop01.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl_loop01.c
> @@ -78,7 +78,21 @@ static void check_loop_value(int set_flag, int get_flag, int autoclear_field)
>
> static void verify_ioctl_loop(void)
> {
> + int ret;
> + const char *const cmd_parted[] = {"parted", "-s", dev_path, "mklabel", "msdos", "mkpart",
> + "primary", "ext4", "1M", "10M", NULL};
> +
> + tst_fill_file("test.img", 0, 1024 * 1024, 10);
> tst_attach_device(dev_path, "test.img");
> +
> + ret = tst_cmd(cmd_parted, NULL, NULL, TST_CMD_PASS_RETVAL);
> + if (!ret)
> + parted_sup = 1;
> + else if (ret == 255)
> + tst_res(TCONF, "parted binary not installed or failed");
> + else
> + tst_res(TCONF, "parted exited with %i", ret);
The test should have needs_cmds set to parted (we do that properly in
ioctl09.c) then we do not have to handle the 255 exit code here since
the test would be skipped if it's missing.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-09-09 11:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 7:47 [LTP] [PATCH v1] ioctl_loop01.c: Use proper device for partitioning Wei Gao via ltp
2025-09-01 10:38 ` Petr Vorel
2025-09-02 2:16 ` Wei Gao via ltp
2025-09-02 3:12 ` [LTP] [PATCH v2] " Wei Gao via ltp
2025-09-02 10:44 ` Petr Vorel
2025-09-02 11:18 ` [LTP] [PATCH v3] " Wei Gao via ltp
2025-09-03 12:48 ` Petr Vorel
2025-09-09 11:50 ` Cyril Hrubis [this message]
2025-09-10 1:35 ` Wei Gao via ltp
2025-09-18 14:53 ` Petr Vorel
2025-09-18 15:35 ` Cyril Hrubis
2025-09-19 13:22 ` Petr Vorel
2025-09-22 7:28 ` Cyril Hrubis
2025-09-22 7:32 ` Petr Vorel
2025-09-24 2:26 ` Wei Gao via ltp
2025-09-24 7:03 ` Petr Vorel
2025-09-24 9:54 ` Cyril Hrubis
2025-09-24 10:40 ` Wei Gao via ltp
2025-09-24 10:54 ` Cyril Hrubis
2025-09-24 12:55 ` Petr Vorel
2025-09-24 13:17 ` Cyril Hrubis
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=aMAUhpxi1GaDBfGF@yuki.lan \
--to=chrubis@suse.cz \
--cc=jack@suse.cz \
--cc=ltp@lists.linux.it \
--cc=wegao@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