strace/tests/setresuid.c
Dmitry V. Levin 0eac88a00a tests: extend test coverage of setresuid syscall
* tests/setresugid.c: New file.
* tests/setresuid.c: New file.
* tests/setresuid.test: New test.
* tests/.gitignore: Add setresuid.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add setresuid.test.
(EXTRA_DIST): Add setresugid.c.
2016-04-20 01:08:12 +00:00

26 lines
510 B
C

#include "tests.h"
#include <sys/syscall.h>
#ifdef __NR_setresuid
# define SYSCALL_NR __NR_setresuid
# define SYSCALL_NAME "setresuid"
# if defined __NR_setresuid32 && __NR_setresuid != __NR_setresuid32
# define UGID_TYPE short
# define GETUGID syscall(__NR_geteuid)
# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg)
# else
# define UGID_TYPE int
# define GETUGID geteuid()
# define CHECK_OVERFLOWUGID(arg)
# endif
# include "setresugid.c"
#else
SKIP_MAIN_UNDEFINED("__NR_setresuid")
#endif