All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Po-Hsu Lin <po-hsu.lin@canonical.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCHv4] listmount04.c: update struct mnt_id_req support to kernel >= 6.17.9
Date: Thu, 8 Jan 2026 18:09:38 +0100	[thread overview]
Message-ID: <20260108170938.GA28911@pevik> (raw)
In-Reply-To: <20260108162152.104192-1-po-hsu.lin@canonical.com>

Hi Po-Hsu Lin,

> The kernel change 78f0e33cd6c93 ("fs/namespace: correctly handle errors
> returned by grab_requested_mnt_ns") from 6.18 has been ported to upstream
> 6.17.9 [1][2].

> Therefore change the expectation from >= 6.18 to >= 6.17 accodingly.

> [1] https://lwn.net/Articles/1047684/
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.17.9&id=8ff97ade

> v2: add comments for this change into the code.
> v3: correct the RST syntax and move comment as suggested by Petr Vorel.
> v4: correct the patch title.

Thank you, LGTM now.
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

> Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
> ---
>  .../kernel/syscalls/listmount/listmount04.c   | 19 ++++++++++++-------
>  1 file changed, 12 insertions(+), 7 deletions(-)

> diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c
> index 2b8b49101..919f4c854 100644
> --- a/testcases/kernel/syscalls/listmount/listmount04.c
> +++ b/testcases/kernel/syscalls/listmount/listmount04.c
> @@ -7,6 +7,7 @@
>   * Verify that listmount() raises the correct errors according with
>   * invalid data:
>   *
> + * - EBADF: invalid mnt_ns_fd
>   * - EFAULT: req or mnt_id are unaccessible memories
>   * - EINVAL: invalid flags or mnt_id request
>   * - ENOENT: non-existent mount point
> @@ -20,8 +21,12 @@
>  #include "lapi/syscalls.h"

>  #define MNT_SIZE 32
> -#define BEFORE_6_18 1
> -#define AFTER_6_18 2
> +/*
> + * For commit 78f0e33cd6c9 ("fs/namespace: correctly handle errors returned
> + * by grab_requested_mnt_ns") from v6.18-rc7 backported to v6.17.9.
> + */
> +#define BEFORE_6_17_9 1
> +#define AFTER_6_17_9 2

>  static mnt_id_req *request;
>  static uint64_t mnt_ids[MNT_SIZE];
> @@ -84,7 +89,7 @@ static struct tcase {
>  		.nr_mnt_ids = MNT_SIZE,
>  		.exp_errno = EINVAL,
>  		.msg = "invalid mnt_id_req.spare",
> -		.kver = BEFORE_6_18,
> +		.kver = BEFORE_6_17_9,
>  	},
>  	{
>  		.req_usage = 1,
> @@ -95,7 +100,7 @@ static struct tcase {
>  		.nr_mnt_ids = MNT_SIZE,
>  		.exp_errno = EBADF,
>  		.msg = "invalid mnt_id_req.mnt_ns_fd",
> -		.kver = AFTER_6_18,
> +		.kver = AFTER_6_17_9,
>  	},
>  	{
>  		.req_usage = 1,
> @@ -154,10 +159,10 @@ static void run(unsigned int n)

>  static void setup(void)
>  {
> -	if (tst_kvercmp(6, 18, 0) >= 0)
> -		kver = AFTER_6_18;
> +	if (tst_kvercmp(6, 17, 9) >= 0)
> +		kver = AFTER_6_17_9;
>  	else
> -		kver = BEFORE_6_18;
> +		kver = BEFORE_6_17_9;
>  }

>  static struct tst_test test = {

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

  reply	other threads:[~2026-01-08 17:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-08 16:21 [LTP] [PATCHv4] listmount04.c: update struct mnt_id_req support to kernel >= 6.17.9 Po-Hsu Lin via ltp
2026-01-08 17:09 ` Petr Vorel [this message]
2026-01-13 10:24 ` Andrea Cervesato 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=20260108170938.GA28911@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=po-hsu.lin@canonical.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.