Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCHv2] listmount04.c: update struct mnt_id_req support to kernel >= 6.17.9
@ 2026-01-08 10:36 Po-Hsu Lin via ltp
  2026-01-08 11:18 ` Andrea Cervesato via ltp
  2026-01-08 12:13 ` Petr Vorel
  0 siblings, 2 replies; 4+ messages in thread
From: Po-Hsu Lin via ltp @ 2026-01-08 10:36 UTC (permalink / raw)
  To: ltp; +Cc: 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.9 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.

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

diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c
index 2b8b49101..59da46cfd 100644
--- a/testcases/kernel/syscalls/listmount/listmount04.c
+++ b/testcases/kernel/syscalls/listmount/listmount04.c
@@ -7,6 +7,10 @@
  * Verify that listmount() raises the correct errors according with
  * invalid data:
  *
+ * - EBADF: invalid mnt_ns_fd
+ * This check was introduced for kernel commit 78f0e33cd6c9 ("fs/namespace:
+ * correctly handle errors returned by grab_requested_mnt_ns") introduced
+ * in v6.18-rc7 and backported to v6.17.9.
  * - EFAULT: req or mnt_id are unaccessible memories
  * - EINVAL: invalid flags or mnt_id request
  * - ENOENT: non-existent mount point
@@ -20,8 +24,8 @@
 #include "lapi/syscalls.h"
 
 #define MNT_SIZE 32
-#define BEFORE_6_18 1
-#define AFTER_6_18 2
+#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 +88,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 +99,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 +158,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 = {
-- 
2.43.0


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCHv2] listmount04.c: update struct mnt_id_req support to kernel >= 6.17.9
  2026-01-08 10:36 [LTP] [PATCHv2] listmount04.c: update struct mnt_id_req support to kernel >= 6.17.9 Po-Hsu Lin via ltp
@ 2026-01-08 11:18 ` Andrea Cervesato via ltp
  2026-01-08 12:13 ` Petr Vorel
  1 sibling, 0 replies; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2026-01-08 11:18 UTC (permalink / raw)
  To: Po-Hsu Lin, ltp

Hi!

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>

-- 
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCHv2] listmount04.c: update struct mnt_id_req support to kernel >= 6.17.9
  2026-01-08 10:36 [LTP] [PATCHv2] listmount04.c: update struct mnt_id_req support to kernel >= 6.17.9 Po-Hsu Lin via ltp
  2026-01-08 11:18 ` Andrea Cervesato via ltp
@ 2026-01-08 12:13 ` Petr Vorel
  2026-01-08 15:45   ` Po-Hsu Lin via ltp
  1 sibling, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2026-01-08 12:13 UTC (permalink / raw)
  To: Po-Hsu Lin; +Cc: ltp

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.9 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.

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

> diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c
> index 2b8b49101..59da46cfd 100644
> --- a/testcases/kernel/syscalls/listmount/listmount04.c
> +++ b/testcases/kernel/syscalls/listmount/listmount04.c
> @@ -7,6 +7,10 @@
>   * Verify that listmount() raises the correct errors according with
>   * invalid data:
>   *
> + * - EBADF: invalid mnt_ns_fd
> + * This check was introduced for kernel commit 78f0e33cd6c9 ("fs/namespace:
> + * correctly handle errors returned by grab_requested_mnt_ns") introduced
> + * in v6.18-rc7 and backported to v6.17.9.

TL;DR
Please either fix RST syntax or move text outside /*\ section.

IMHO this is an implementation detail, I don't think we need it in the test
catalog docs [1]. I would just put this comment above macro definition: #define
BEFORE_6_17_9 1.

Also this is a wrong RST syntax. FYI we parse this into sphinx docs [1] and
this breaks formatting of the list:

* EBADF: invalid mnt_ns_fd

This check was introduced for kernel commit 78f0e33cd6c9 (“fs/namespace: correctly handle errors returned by grab_requested_mnt_ns”) introduced in v6.18-rc7 and backported to v6.17.9. - EFAULT: req or mnt_id are unaccessible memories - EINVAL: invalid flags or mnt_id request - ENOENT: non-existent mount point

If you run:
$ cd doc; make setup && make

you'll get local build of the documentation, see ./html/users/test_catalog.html#listmount04

Kind regards,
Petr

[1] file:///home/pevik/install/src/ltp.git/doc/html/users/test_catalog.html#listmount04

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCHv2] listmount04.c: update struct mnt_id_req support to kernel >= 6.17.9
  2026-01-08 12:13 ` Petr Vorel
@ 2026-01-08 15:45   ` Po-Hsu Lin via ltp
  0 siblings, 0 replies; 4+ messages in thread
From: Po-Hsu Lin via ltp @ 2026-01-08 15:45 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Thu, 8 Jan 2026 at 20:13, Petr Vorel <pvorel@suse.cz> wrote:

> 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.9 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.
>
> > Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
> > ---
> >  .../kernel/syscalls/listmount/listmount04.c    | 18 +++++++++++-------
> >  1 file changed, 11 insertions(+), 7 deletions(-)
>
> > diff --git a/testcases/kernel/syscalls/listmount/listmount04.c
> b/testcases/kernel/syscalls/listmount/listmount04.c
> > index 2b8b49101..59da46cfd 100644
> > --- a/testcases/kernel/syscalls/listmount/listmount04.c
> > +++ b/testcases/kernel/syscalls/listmount/listmount04.c
> > @@ -7,6 +7,10 @@
> >   * Verify that listmount() raises the correct errors according with
> >   * invalid data:
> >   *
> > + * - EBADF: invalid mnt_ns_fd
> > + * This check was introduced for kernel commit 78f0e33cd6c9
> ("fs/namespace:
> > + * correctly handle errors returned by grab_requested_mnt_ns")
> introduced
> > + * in v6.18-rc7 and backported to v6.17.9.
>
> TL;DR
> Please either fix RST syntax or move text outside /*\ section.
>
> IMHO this is an implementation detail, I don't think we need it in the test
> catalog docs [1]. I would just put this comment above macro definition:
> #define
> BEFORE_6_17_9 1.
>
> Also this is a wrong RST syntax. FYI we parse this into sphinx docs [1] and
> this breaks formatting of the list:
>
> * EBADF: invalid mnt_ns_fd
>
> This check was introduced for kernel commit 78f0e33cd6c9 (“fs/namespace:
> correctly handle errors returned by grab_requested_mnt_ns”) introduced in
> v6.18-rc7 and backported to v6.17.9. - EFAULT: req or mnt_id are
> unaccessible memories - EINVAL: invalid flags or mnt_id request - ENOENT:
> non-existent mount point
>
> If you run:
> $ cd doc; make setup && make
>
> you'll get local build of the documentation, see
> ./html/users/test_catalog.html#listmount04
>
> Cool!

thanks for the information, I will correct this and send another version.



> Kind regards,
> Petr
>
> [1]
> file:///home/pevik/install/src/ltp.git/doc/html/users/test_catalog.html#listmount04
>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-01-08 15:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08 10:36 [LTP] [PATCHv2] listmount04.c: update struct mnt_id_req support to kernel >= 6.17.9 Po-Hsu Lin via ltp
2026-01-08 11:18 ` Andrea Cervesato via ltp
2026-01-08 12:13 ` Petr Vorel
2026-01-08 15:45   ` Po-Hsu Lin via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox