summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorChristian Brauner <christian@brauner.io>2019-06-05 16:06:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-25 06:34:52 +0300
commitd6accdd40a49d3715497336afd8e71ad3b14eee5 (patch)
treed808bdd71cd6f8db6702362752f4db2a6d3481cf /tools/testing
parent4fe18137a3575d9e46c7fd6d4f435c5eae5d89d7 (diff)
downloadlinux-d6accdd40a49d3715497336afd8e71ad3b14eee5.tar.xz
tests: fix pidfd-test compilation
[ Upstream commit 1fcd0eb356ad56c4e405f06e31dd9fde2109d5ab ] Define __NR_pidfd_send_signal if it isn't to prevent a potential compilation error. To make pidfd-test compile on all arches, irrespective of whether or not syscall numbers are assigned, define the syscall number to -1. If it isn't defined this will cause the kernel to return -ENOSYS. Fixes: 575a0ae9744d ("selftests: add tests for pidfd_send_signal()") Signed-off-by: Christian Brauner <christian@brauner.io> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/pidfd/pidfd_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/pidfd/pidfd_test.c b/tools/testing/selftests/pidfd/pidfd_test.c
index d59378a93782..20323f55613a 100644
--- a/tools/testing/selftests/pidfd/pidfd_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_test.c
@@ -16,6 +16,10 @@
#include "../kselftest.h"
+#ifndef __NR_pidfd_send_signal
+#define __NR_pidfd_send_signal -1
+#endif
+
static inline int sys_pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
unsigned int flags)
{