]> granicus.if.org Git - strace/commitdiff
tests: check decoding of lchown32 syscall
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 16 Apr 2016 23:02:27 +0000 (23:02 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 18 Apr 2016 01:10:44 +0000 (01:10 +0000)
* tests/lchown32.c: New file.
* tests/lchown32.test: New test.
* tests/.gitignore: Add lchown32.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add lchown32.test.

tests/.gitignore
tests/Makefile.am
tests/lchown32.c [new file with mode: 0644]
tests/lchown32.test [new file with mode: 0755]

index 1e138b00d4e804dad7ae04a561c59001dcda9771..99411f2078c6d40f7c02109e698377467f73cdbb 100644 (file)
@@ -70,6 +70,7 @@ ipc_shm
 ksysent
 ksysent.h
 lchown
+lchown32
 libtests.a
 linkat
 llseek
index 83e0f7bae1813a906376de303f6054069a5c328a..823fc0a5949a61300dc33a050417e9debc5b5ebb 100644 (file)
@@ -121,6 +121,7 @@ check_PROGRAMS = \
        ipc_shm \
        ksysent \
        lchown \
+       lchown32 \
        linkat \
        llseek \
        lseek \
@@ -328,6 +329,7 @@ DECODER_TESTS = \
        ipc_sem.test \
        ipc_shm.test \
        lchown.test \
+       lchown32.test \
        linkat.test \
        llseek.test \
        lseek.test \
diff --git a/tests/lchown32.c b/tests/lchown32.c
new file mode 100644 (file)
index 0000000..ff5ad3e
--- /dev/null
@@ -0,0 +1,14 @@
+#include "tests.h"
+#include <sys/syscall.h>
+
+#ifdef __NR_lchown32
+
+# define SYSCALL_NR __NR_lchown32
+# define SYSCALL_NAME "lchown32"
+# include "xchownx.c"
+
+#else
+
+SKIP_MAIN_UNDEFINED("__NR_lchown32")
+
+#endif
diff --git a/tests/lchown32.test b/tests/lchown32.test
new file mode 100755 (executable)
index 0000000..6ee1ac9
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Check lchown32 syscall decoding.
+
+. "${srcdir=.}/init.sh"
+run_strace_match_diff -a32