Dmitry V. Levin
f096422882
Add strict tests for getuid, getuid32, getgid, getgid32, geteuid, geteuid32, getegid, and getegid32 syscalls. * tests/getegid.c: New file. * tests/getegid.test: New test. * tests/getegid32.c: New file. * tests/getegid32.test: New test. * tests/geteuid.c: New file. * tests/geteuid.test: New test. * tests/geteuid32.c: New file. * tests/geteuid32.test: New test. * tests/getgid.c: New file. * tests/getgid.test: New test. * tests/getgid32.c: New file. * tests/getgid32.test: New test. * tests/getuid.c: New file. * tests/getuid.test: New test. * tests/getuid32.c: New file. * tests/getuid32.test: New test. * tests/.gitignore: Add getuid, getuid32, getgid, getgid32, geteuid, * geteuid32, getegid, and getegid32. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add getegid.test, getegid32.test, geteuid.test, geteuid32.test, getgid.test, getgid32.test, getuid.test, and getuid32.test.
21 lines
239 B
C
21 lines
239 B
C
#include "tests.h"
|
|
#include <sys/syscall.h>
|
|
|
|
#ifdef __NR_getuid
|
|
|
|
# include <stdio.h>
|
|
# include <unistd.h>
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
printf("getuid() = %ld\n", syscall(__NR_getuid));
|
|
return 0;
|
|
}
|
|
|
|
#else
|
|
|
|
SKIP_MAIN_UNDEFINED("__NR_getuid")
|
|
|
|
#endif
|