tests: extend test coverage of setgid32 syscall
* tests/setgid32.c: New file. * tests/setgid32.test: New test. * tests/.gitignore: Add setgid32. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add setgid32.test.
This commit is contained in:
parent
cf273016fe
commit
6511b2df01
1
tests/.gitignore
vendored
1
tests/.gitignore
vendored
@ -143,6 +143,7 @@ sendfile
|
||||
sendfile64
|
||||
set_ptracer_any
|
||||
setgid
|
||||
setgid32
|
||||
sethostname
|
||||
setuid
|
||||
setuid32
|
||||
|
@ -193,6 +193,7 @@ check_PROGRAMS = \
|
||||
sendfile64 \
|
||||
set_ptracer_any \
|
||||
setgid \
|
||||
setgid32 \
|
||||
sethostname \
|
||||
setuid \
|
||||
setuid32 \
|
||||
@ -403,6 +404,7 @@ DECODER_TESTS = \
|
||||
sendfile.test \
|
||||
sendfile64.test \
|
||||
setgid.test \
|
||||
setgid32.test \
|
||||
sethostname.test \
|
||||
setuid.test \
|
||||
setuid32.test \
|
||||
|
17
tests/setgid32.c
Normal file
17
tests/setgid32.c
Normal file
@ -0,0 +1,17 @@
|
||||
#include "tests.h"
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __NR_setgid32
|
||||
|
||||
# define SYSCALL_NR __NR_setgid32
|
||||
# define SYSCALL_NAME "setgid32"
|
||||
# define UGID_TYPE int
|
||||
# define GETUGID getegid()
|
||||
# define CHECK_OVERFLOWUGID(arg)
|
||||
# include "setugid.c"
|
||||
|
||||
#else
|
||||
|
||||
SKIP_MAIN_UNDEFINED("__NR_setgid32")
|
||||
|
||||
#endif
|
6
tests/setgid32.test
Executable file
6
tests/setgid32.test
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Check setgid32 syscall decoding.
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
run_strace_match_diff -a12
|
Loading…
Reference in New Issue
Block a user