diff --git a/tests/.gitignore b/tests/.gitignore index 2f5f95e4..d89e9e6d 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -73,6 +73,7 @@ getresgid32 getresuid getresuid32 getrusage +getsid getuid getuid32 getxxid diff --git a/tests/Makefile.am b/tests/Makefile.am index 6c6c8b30..7662a6d8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -126,6 +126,7 @@ check_PROGRAMS = \ getresuid \ getresuid32 \ getrusage \ + getsid \ getuid \ getuid32 \ getxxid \ @@ -371,6 +372,7 @@ DECODER_TESTS = \ getresuid.test \ getresuid32.test \ getrusage.test \ + getsid.test \ getuid.test \ getuid32.test \ getxxid.test \ diff --git a/tests/getsid.c b/tests/getsid.c new file mode 100644 index 00000000..b563de9d --- /dev/null +++ b/tests/getsid.c @@ -0,0 +1,13 @@ +#include "tests.h" +#include +#include + +int +main(void) +{ + pid_t pid = getpid(); + printf("getsid(%d) = %d\n", pid, getsid(pid)); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests/getsid.test b/tests/getsid.test new file mode 100755 index 00000000..3fcf9799 --- /dev/null +++ b/tests/getsid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getsid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10