[LTP] [PATCH] ioctl_pidfd02-06: Add CONFIG_USER_NS and CONFIG_PID_NS to needs_kconfigs

Terry Tritton
2025-12-12T10:15:10Z

The flags CLONE_NEWUSER and CLONE_NEWPID require specific namespace support.
Add CONFIG_USER_NS and CONFIG_PID_NS to needs_kconfigs so these tests return
TCONF instead of failing.

Signed-off-by: Terry Tritton <terry.tritton@linaro.org>
---
testcases/kernel/syscalls/ioctl/ioctl_pidfd02.c | 5 +++++
testcases/kernel/syscalls/ioctl/ioctl_pidfd03.c | 5 +++++
testcases/kernel/syscalls/ioctl/ioctl_pidfd04.c | 5 +++++
testcases/kernel/syscalls/ioctl/ioctl_pidfd05.c | 5 +++++
testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 5 +++++
5 files changed, 25 insertions(+)

diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd02.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd02.c
index 7eb60e7fc..6983259e4 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd02.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd02.c
@@ -81,5 +81,10 @@ static struct tst_test test = {
{&info0, .size = sizeof(*info0)},
{&info1, .size = sizeof(*info1)},
{}
+ },
+ .needs_kconfigs = (const char *[]) {
+ "CONFIG_USER_NS",
+ "CONFIG_PID_NS",
+ NULL
}
};
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd03.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd03.c
index 8f2779be2..5ea64a9bd 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd03.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd03.c
@@ -60,5 +60,10 @@ static struct tst_test test = {
{&args, .size = sizeof(*args)},
{&info, .size = sizeof(*info)},
{}
+ },
+ .needs_kconfigs = (const char *[]) {
+ "CONFIG_USER_NS",
+ "CONFIG_PID_NS",
+ NULL
}
};
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd04.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd04.c
index cf8393dec..d4a1a1ea3 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd04.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd04.c
@@ -67,5 +67,10 @@ static struct tst_test test = {
{&args, .size = sizeof(*args)},
{&info, .size = sizeof(*info)},
{}
+ },
+ .needs_kconfigs = (const char *[]) {
+ "CONFIG_USER_NS",
+ "CONFIG_PID_NS",
+ NULL
}
};
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd05.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd05.c
index 31439f0b7..3a5bc7592 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd05.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd05.c
@@ -71,5 +71,10 @@ static struct tst_test test = {
{&args, .size = sizeof(*args)},
{&info_invalid, .size = sizeof(*info_invalid)},
{}
+ },
+ .needs_kconfigs = (const char *[]) {
+ "CONFIG_USER_NS",
+ "CONFIG_PID_NS",
+ NULL
}
};
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
index 2a8bc1432..386a1e235 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
@@ -62,5 +62,10 @@ static struct tst_test test = {
{&args, .size = sizeof(*args)},
{&info, .size = sizeof(*info)},
{}
+ },
+ .needs_kconfigs = (const char *[]) {
+ "CONFIG_USER_NS",
+ "CONFIG_PID_NS",
+ NULL
}
};
--
2.47.3