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

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

index ad27043984859b7b98927fe5a3e33a3cd8aaa2de..49f20c677352f63908329cce0d13b50f375989a7 100644 (file)
@@ -17,6 +17,7 @@ bpf
 caps
 chmod
 chown
+chown32
 chroot
 clock_nanosleep
 clock_xettime
index 0a2ac1c53714d42814ee6ab6aa083a7ec56ac172..0888a5a85a9d4affa07d2199f014b1973bc39dfd 100644 (file)
@@ -69,6 +69,7 @@ check_PROGRAMS = \
        caps \
        chmod \
        chown \
+       chown32 \
        chroot \
        clock_nanosleep \
        clock_xettime \
@@ -278,6 +279,7 @@ DECODER_TESTS = \
        caps.test \
        chmod.test \
        chown.test \
+       chown32.test \
        chroot.test \
        clock_nanosleep.test \
        clock_xettime.test \
diff --git a/tests/chown32.c b/tests/chown32.c
new file mode 100644 (file)
index 0000000..5e590a8
--- /dev/null
@@ -0,0 +1,14 @@
+#include "tests.h"
+#include <sys/syscall.h>
+
+#ifdef __NR_chown32
+
+# define SYSCALL_NR __NR_chown32
+# define SYSCALL_NAME "chown32"
+# include "xchownx.c"
+
+#else
+
+SKIP_MAIN_UNDEFINED("__NR_chown32")
+
+#endif
diff --git a/tests/chown32.test b/tests/chown32.test
new file mode 100755 (executable)
index 0000000..0fa04c2
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Check chown32 syscall decoding.
+
+. "${srcdir=.}/init.sh"
+run_strace_match_diff -a31