From d9e54d6e3e6f341e8d06e8d3775fb02174ff732c Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 11 Apr 2017 04:04:37 +0000 Subject: [PATCH] tests: check decoding of gettid syscall * tests/gettid.c: New file. * tests/.gitignore: Add gettid. * tests/Makefile.am (check_PROGRAMS): Likewise. * tests/gen_tests.in (gettid): New entry. --- tests/.gitignore | 1 + tests/Makefile.am | 1 + tests/gen_tests.in | 1 + tests/gettid.c | 12 ++++++++++++ 4 files changed, 15 insertions(+) create mode 100644 tests/gettid.c diff --git a/tests/.gitignore b/tests/.gitignore index 15e8c45c..1b039846 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -105,6 +105,7 @@ getrlimit getrusage getsid getsockname +gettid getuid getuid32 getxxid diff --git a/tests/Makefile.am b/tests/Makefile.am index 8dff1db1..d38fe257 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -169,6 +169,7 @@ check_PROGRAMS = \ getrusage \ getsid \ getsockname \ + gettid \ getuid \ getuid32 \ getxxid \ diff --git a/tests/gen_tests.in b/tests/gen_tests.in index 0cc0e6c7..d855212e 100644 --- a/tests/gen_tests.in +++ b/tests/gen_tests.in @@ -110,6 +110,7 @@ getrlimit -a27 getrusage -v getsid -a10 getsockname -a27 +gettid -a9 getuid32 +getuid.test getxxid -a10 -e trace=getxpid,getxuid,getxgid inet-cmsg -e trace=recvmsg diff --git a/tests/gettid.c b/tests/gettid.c new file mode 100644 index 00000000..9b13eb88 --- /dev/null +++ b/tests/gettid.c @@ -0,0 +1,12 @@ +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + printf("gettid() = %ld\n", syscall(__NR_gettid)); + puts("+++ exited with 0 +++"); + return 0; +} -- 2.40.0