From 96492b2acd87bc593df8328967a9cc2af4951003 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 17 Apr 2016 22:24:41 +0000 Subject: [PATCH] tests: check decoding of fchown32 syscall * 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 | 1 + tests/Makefile.am | 2 ++ tests/fchown32.c | 15 +++++++++++++++ tests/fchown32.test | 6 ++++++ 4 files changed, 24 insertions(+) create mode 100644 tests/fchown32.c create mode 100755 tests/fchown32.test diff --git a/tests/.gitignore b/tests/.gitignore index 5bb8b590..f3ee6294 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -41,6 +41,7 @@ fanotify_mark fchmod fchmodat fchown +fchown32 fchownat fcntl fcntl64 diff --git a/tests/Makefile.am b/tests/Makefile.am index 2e576c36..e9cd6254 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 index 00000000..0927b569 --- /dev/null +++ b/tests/fchown32.c @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#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 index 00000000..e837f54e --- /dev/null +++ b/tests/fchown32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 -- 2.40.0