tests: check decoding of fchown syscall
* tests/fchown.c: New file. * tests/fchown.test: New test. * tests/.gitignore: Add fchown. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add fchown.test.
This commit is contained in:
1
tests/.gitignore
vendored
1
tests/.gitignore
vendored
@ -40,6 +40,7 @@ faccessat
|
||||
fanotify_mark
|
||||
fchmod
|
||||
fchmodat
|
||||
fchown
|
||||
fchownat
|
||||
fcntl
|
||||
fcntl64
|
||||
|
@ -92,6 +92,7 @@ check_PROGRAMS = \
|
||||
fanotify_mark \
|
||||
fchmod \
|
||||
fchmodat \
|
||||
fchown \
|
||||
fchownat \
|
||||
fcntl \
|
||||
fcntl64 \
|
||||
@ -303,6 +304,7 @@ DECODER_TESTS = \
|
||||
fanotify_mark.test \
|
||||
fchmod.test \
|
||||
fchmodat.test \
|
||||
fchown.test \
|
||||
fchownat.test \
|
||||
fcntl.test \
|
||||
fcntl64.test \
|
||||
|
20
tests/fchown.c
Normal file
20
tests/fchown.c
Normal file
@ -0,0 +1,20 @@
|
||||
#include "tests.h"
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __NR_fchown
|
||||
|
||||
# define SYSCALL_NR __NR_fchown
|
||||
# define SYSCALL_NAME "fchown"
|
||||
# define ACCESS_BY_DESCRIPTOR
|
||||
|
||||
# if defined __NR_fchown32 && __NR_fchown != __NR_fchown32
|
||||
# define UGID_TYPE_IS_SHORT
|
||||
# endif
|
||||
|
||||
# include "xchownx.c"
|
||||
|
||||
#else
|
||||
|
||||
SKIP_MAIN_UNDEFINED("__NR_fchown")
|
||||
|
||||
#endif
|
6
tests/fchown.test
Executable file
6
tests/fchown.test
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Check fchown syscall decoding.
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
run_strace_match_diff -a16
|
Reference in New Issue
Block a user