tests/pid_namespace: add pid_max testsSigned-off-by: Alexander Mikhalitsyn <[email protected]>Link: https://lore.kernel.org/r/20241122132459.135120-3-aleksandr.mikhalitsyn@canoni
tests/pid_namespace: add pid_max testsSigned-off-by: Alexander Mikhalitsyn <[email protected]>Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Christian Brauner <[email protected]>
show more ...
selftests: pid_namespace: Fix incorrect kernel headers search pathUse $(KHDR_INCLUDES) as lookup path for kernel headers. This preventsbuilding against kernel headers from the build environment in
selftests: pid_namespace: Fix incorrect kernel headers search pathUse $(KHDR_INCLUDES) as lookup path for kernel headers. This preventsbuilding against kernel headers from the build environment in scenarioswhere kernel headers are installed into a specific output directory(O=...).Signed-off-by: Mathieu Desnoyers <[email protected]>Cc: Shuah Khan <[email protected]>Cc: [email protected]Cc: Ingo Molnar <[email protected]>Cc: <[email protected]> # 5.18+Signed-off-by: Shuah Khan <[email protected]>
selftests: fix header dependency for pid_namespace selftestsThe way the test target was defined before, when building with clang weget a command line like this:clang -Wall -Werror -g -I../../../
selftests: fix header dependency for pid_namespace selftestsThe way the test target was defined before, when building with clang weget a command line like this:clang -Wall -Werror -g -I../../../../usr/include/ \ regression_enomem.c ../pidfd/pidfd.h -o regression_enomemThis yields an error, because clang thinks we want to produce both a *.ofile, as well as a precompiled header:clang: error: cannot specify -o when generating multiple output filesgcc, for whatever reason, doesn't exhibit the same behavior which Isuspect is why the problem wasn't noticed before.This can be fixed simply by using the LOCAL_HDRS infrastructure theselftests lib.mk provides. It does the right think and marks the targetas depending on the header (so if the header changes, we rebuild), butit filters the header out of the compiler command line, so we don't getthe error described above.Signed-off-by: Axel Rasmussen <[email protected]>Reviewed-by: Christian Brauner <[email protected]>Signed-off-by: Shuah Khan <[email protected]>
selftests: Remove unneeded selftest API headersRemove unused includes of the kselftest.h header.Acked-by: Christian Brauner <[email protected]>Signed-off-by: Kees Cook <keescook@chrom
selftests: Remove unneeded selftest API headersRemove unused includes of the kselftest.h header.Acked-by: Christian Brauner <[email protected]>Signed-off-by: Kees Cook <[email protected]>Signed-off-by: Shuah Khan <[email protected]>
selftests: add pid namespace ENOMEM regression testWe recently regressed (cf. [1] and its corresponding fix in [2]) returningENOMEM when trying to create a process in a pid namespace whose initpr
selftests: add pid namespace ENOMEM regression testWe recently regressed (cf. [1] and its corresponding fix in [2]) returningENOMEM when trying to create a process in a pid namespace whose initprocess/child subreaper has already died. This has caused confusion atleast once before that (cf. [3]). Let's add a simple regression test tocatch this in the future.[1]: 49cb2fc42ce4 ("fork: extend clone3() to support setting a PID")[2]: b26ebfe12f34 ("pid: Fix error return value in some cases")[3]: 35f71bc0a09a ("fork: report pid reservation failure properly")Cc: Corey Minyard <[email protected]>Cc: Oleg Nesterov <[email protected]>Cc: Adrian Reber <[email protected]>Cc: Dmitry Safonov <[email protected]>Cc: Andrei Vagin <[email protected]>Signed-off-by: Christian Brauner <[email protected]>