]> granicus.if.org Git - strace/commitdiff
tests: check decoding of gettid syscall
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Apr 2017 04:04:37 +0000 (04:04 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Apr 2017 04:04:37 +0000 (04:04 +0000)
* tests/gettid.c: New file.
* tests/.gitignore: Add gettid.
* tests/Makefile.am (check_PROGRAMS): Likewise.
* tests/gen_tests.in (gettid): New entry.

tests/.gitignore
tests/Makefile.am
tests/gen_tests.in
tests/gettid.c [new file with mode: 0644]

index 15e8c45cc1f6eaea9739436c245622cbcd35e767..1b03984661f2641ff6b2ac9b3ae5e2ecf01b0c95 100644 (file)
@@ -105,6 +105,7 @@ getrlimit
 getrusage
 getsid
 getsockname
+gettid
 getuid
 getuid32
 getxxid
index 8dff1db1e81244ab96f21e5b77a9bc3c28d31889..d38fe25711ea9362bb16a05da4b3060542a7ae43 100644 (file)
@@ -169,6 +169,7 @@ check_PROGRAMS = \
        getrusage \
        getsid \
        getsockname \
+       gettid \
        getuid \
        getuid32 \
        getxxid \
index 0cc0e6c7e0dae2e2d780298fc16e443ad341433e..d855212e6235a32df4377155badf7f5bc880d188 100644 (file)
@@ -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 (file)
index 0000000..9b13eb8
--- /dev/null
@@ -0,0 +1,12 @@
+#include "tests.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <asm/unistd.h>
+
+int
+main(void)
+{
+       printf("gettid() = %ld\n", syscall(__NR_gettid));
+       puts("+++ exited with 0 +++");
+       return 0;
+}