Hello,
This patch clears out warnings seen while compiling the tests; at the time, it closes a test report.
Thank you,
Link: https://lore.kernel.org/oe-kbuild-all/202412222015.lMBH62zB-lkp@intel.com/
Ariel Otilibili (1): selftests: Clear -Wimplicit-function-declaration warnings
tools/testing/selftests/pid_namespace/pid_max.c | 1 + tools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 1 + 2 files changed, 2 insertions(+)
Seen while compiling tests,
``` $ make -C tools/testing/selftests/ TARGET=bpf 2>&1 | grep implicit
pidfd_fdinfo_test.c:230:13: warning: implicit declaration of function ‘mount’ [-Wimplicit-function-declaration] pidfd_fdinfo_test.c:236:15: warning: implicit declaration of function ‘umount2’; did you mean ‘SYS_umount2’? [-Wimplicit-function-declaration] pid_max.c:42:15: warning: implicit declaration of function ‘mount’ [-Wimplicit-function-declaration] pid_max.c:48:9: warning: implicit declaration of function ‘umount2’; did you mean ‘SYS_umount2’? [-Wimplicit-function-declaration] ```
Adding sys/mount in the header clears out the warnings
``` $ make -C tools/testing/selftests/ TARGET=bpf 2>&1 | grep implicit; echo $? 1 ```
Reported-by: kernel test robot lkp@intel.com Closes: https://lore.kernel.org/oe-kbuild-all/202412222015.lMBH62zB-lkp@intel.com/ Cc: Christian Brauner brauner@kernel.org Cs: Shuah Khan shuah@kernel.org Signed-off-by: Ariel Otilibili ariel.otilibili-anieli@eurecom.fr --- tools/testing/selftests/pid_namespace/pid_max.c | 1 + tools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/tools/testing/selftests/pid_namespace/pid_max.c b/tools/testing/selftests/pid_namespace/pid_max.c index 51c414faabb0..96f274f0582b 100644 --- a/tools/testing/selftests/pid_namespace/pid_max.c +++ b/tools/testing/selftests/pid_namespace/pid_max.c @@ -10,6 +10,7 @@ #include <stdlib.h> #include <string.h> #include <syscall.h> +#include <sys/mount.h> #include <sys/wait.h>
#include "../kselftest_harness.h" diff --git a/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c b/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c index f062a986e382..f718aac75068 100644 --- a/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c +++ b/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c @@ -13,6 +13,7 @@ #include <syscall.h> #include <sys/wait.h> #include <sys/mman.h> +#include <sys/mount.h>
#include "pidfd.h" #include "../kselftest.h"
linux-kselftest-mirror@lists.linaro.org