[LTP] [PATCH] listmount04.c: update struct mnt_id_req support to kernel >= 6.17
Po-Hsu Lin
po-hsu.lin@canonical.com
Fri Jan 2 12:51:47 CET 2026
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
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
---
testcases/kernel/syscalls/listmount/listmount04.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c
index 2b8b49101..34789353b 100644
--- a/testcases/kernel/syscalls/listmount/listmount04.c
+++ b/testcases/kernel/syscalls/listmount/listmount04.c
@@ -20,8 +20,8 @@
#include "lapi/syscalls.h"
#define MNT_SIZE 32
-#define BEFORE_6_18 1
-#define AFTER_6_18 2
+#define BEFORE_6_17 1
+#define AFTER_6_17 2
static mnt_id_req *request;
static uint64_t mnt_ids[MNT_SIZE];
@@ -84,7 +84,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,
},
{
.req_usage = 1,
@@ -95,7 +95,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,
},
{
.req_usage = 1,
@@ -154,10 +154,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, 0) >= 0)
+ kver = AFTER_6_17;
else
- kver = BEFORE_6_18;
+ kver = BEFORE_6_17;
}
static struct tst_test test = {
--
2.43.0
More information about the ltp
mailing list