Commit 2ec2f99a authored by Suren Baghdasaryan's avatar Suren Baghdasaryan Committed by Christian Brauner

tests: move common definitions and functions into pidfd.h

Move definitions and functions used across different pidfd tests into
pidfd.h header.
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
Reviewed-by: default avatarChristian Brauner <christian@brauner.io>
Link: https://lore.kernel.org/r/20190726162226.252750-1-surenb@google.comSigned-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
parent e63f3085
......@@ -73,6 +73,11 @@ int wait_for_pid(pid_t pid)
return WEXITSTATUS(status);
}
static inline int sys_pidfd_open(pid_t pid, unsigned int flags)
{
return syscall(__NR_pidfd_open, pid, flags);
}
static inline int sys_pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
unsigned int flags)
{
......
......@@ -22,11 +22,6 @@
#include "pidfd.h"
#include "../kselftest.h"
static inline int sys_pidfd_open(pid_t pid, unsigned int flags)
{
return syscall(__NR_pidfd_open, pid, flags);
}
static int safe_int(const char *numstr, int *converted)
{
char *err = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment