From 11f98f21b781f4da069591c0441e87d5155102b2 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 16 Apr 2016 23:02:27 +0000 Subject: [PATCH] tests: check decoding of lchown32 syscall * 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 | 1 + tests/Makefile.am | 2 ++ tests/lchown32.c | 14 ++++++++++++++ tests/lchown32.test | 6 ++++++ 4 files changed, 23 insertions(+) create mode 100644 tests/lchown32.c create mode 100755 tests/lchown32.test diff --git a/tests/.gitignore b/tests/.gitignore index 1e138b00..99411f20 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -70,6 +70,7 @@ ipc_shm ksysent ksysent.h lchown +lchown32 libtests.a linkat llseek diff --git a/tests/Makefile.am b/tests/Makefile.am index 83e0f7ba..823fc0a5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 index 00000000..ff5ad3e8 --- /dev/null +++ b/tests/lchown32.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#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 index 00000000..6ee1ac95 --- /dev/null +++ b/tests/lchown32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check lchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 -- 2.40.0