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

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

index 5bb8b590697db6cdf3fc657ecf776ec0cb3228e2..f3ee62940437ec8a678c45dd3b798c82729caf38 100644 (file)
@@ -41,6 +41,7 @@ fanotify_mark
 fchmod
 fchmodat
 fchown
+fchown32
 fchownat
 fcntl
 fcntl64
index 2e576c3643b0e1c4832b4114669944de5b83682f..e9cd625410ba5ca2685cec7cbd4ff727d83a88eb 100644 (file)
@@ -93,6 +93,7 @@ check_PROGRAMS = \
        fchmod \
        fchmodat \
        fchown \
+       fchown32 \
        fchownat \
        fcntl \
        fcntl64 \
@@ -305,6 +306,7 @@ DECODER_TESTS = \
        fchmod.test \
        fchmodat.test \
        fchown.test \
+       fchown32.test \
        fchownat.test \
        fcntl.test \
        fcntl64.test \
diff --git a/tests/fchown32.c b/tests/fchown32.c
new file mode 100644 (file)
index 0000000..0927b56
--- /dev/null
@@ -0,0 +1,15 @@
+#include "tests.h"
+#include <sys/syscall.h>
+
+#ifdef __NR_fchown32
+
+# define SYSCALL_NR __NR_fchown32
+# define SYSCALL_NAME "fchown32"
+# define ACCESS_BY_DESCRIPTOR
+# include "xchownx.c"
+
+#else
+
+SKIP_MAIN_UNDEFINED("__NR_fchown32")
+
+#endif
diff --git a/tests/fchown32.test b/tests/fchown32.test
new file mode 100755 (executable)
index 0000000..e837f54
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Check fchown32 syscall decoding.
+
+. "${srcdir=.}/init.sh"
+run_strace_match_diff -a18