summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/clone3/clone3.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/clone3/clone3.c')
-rw-r--r--tools/testing/selftests/clone3/clone3.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/testing/selftests/clone3/clone3.c b/tools/testing/selftests/clone3/clone3.c
index 0f8a9ef40117..4669b3d418e7 100644
--- a/tools/testing/selftests/clone3/clone3.c
+++ b/tools/testing/selftests/clone3/clone3.c
@@ -18,6 +18,7 @@
#include <sched.h>
#include "../kselftest.h"
+#include "clone3_selftests.h"
/*
* Different sizes of struct clone_args
@@ -35,11 +36,6 @@ enum test_mode {
CLONE3_ARGS_INVAL_EXIT_SIGNAL_NSIG,
};
-static pid_t raw_clone(struct clone_args *args, size_t size)
-{
- return syscall(__NR_clone3, args, size);
-}
-
static int call_clone3(uint64_t flags, size_t size, enum test_mode test_mode)
{
struct clone_args args = {
@@ -83,7 +79,7 @@ static int call_clone3(uint64_t flags, size_t size, enum test_mode test_mode)
memcpy(&args_ext.args, &args, sizeof(struct clone_args));
- pid = raw_clone((struct clone_args *)&args_ext, size);
+ pid = sys_clone3((struct clone_args *)&args_ext, size);
if (pid < 0) {
ksft_print_msg("%s - Failed to create new process\n",
strerror(errno));