From f559a876f8d8102bad185bb5c450dd5b9054e8ec Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 15 Apr 2016 23:03:29 +0000 Subject: [PATCH] tests: check decoding of chown32 syscall * 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 | 1 + tests/Makefile.am | 2 ++ tests/chown32.c | 14 ++++++++++++++ tests/chown32.test | 6 ++++++ 4 files changed, 23 insertions(+) create mode 100644 tests/chown32.c create mode 100755 tests/chown32.test diff --git a/tests/.gitignore b/tests/.gitignore index ad270439..49f20c67 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -17,6 +17,7 @@ bpf caps chmod chown +chown32 chroot clock_nanosleep clock_xettime diff --git a/tests/Makefile.am b/tests/Makefile.am index 0a2ac1c5..0888a5a8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 index 00000000..5e590a80 --- /dev/null +++ b/tests/chown32.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#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 index 00000000..0fa04c20 --- /dev/null +++ b/tests/chown32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 -- 2.40.0