tests: add getpgrp.test
* tests/getpgrp.c: New file. * tests/getpgrp.test: New test. * tests/.gitignore: Add getpgrp. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add getpgrp.test.
This commit is contained in:
parent
f914194fc3
commit
ef6b4262bb
1
tests/.gitignore
vendored
1
tests/.gitignore
vendored
@ -69,6 +69,7 @@ getgid
|
||||
getgid32
|
||||
getgroups
|
||||
getgroups32
|
||||
getpgrp
|
||||
getrandom
|
||||
getresgid
|
||||
getresgid32
|
||||
|
@ -122,6 +122,7 @@ check_PROGRAMS = \
|
||||
getgid32 \
|
||||
getgroups \
|
||||
getgroups32 \
|
||||
getpgrp \
|
||||
getrandom \
|
||||
getresgid \
|
||||
getresgid32 \
|
||||
@ -371,6 +372,7 @@ DECODER_TESTS = \
|
||||
getgid32.test \
|
||||
getgroups.test \
|
||||
getgroups32.test \
|
||||
getpgrp.test \
|
||||
getrandom.test \
|
||||
getresgid.test \
|
||||
getresgid32.test \
|
||||
|
22
tests/getpgrp.c
Normal file
22
tests/getpgrp.c
Normal file
@ -0,0 +1,22 @@
|
||||
#include "tests.h"
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __NR_getpgrp
|
||||
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
printf("getpgrp() = %ld\n", syscall(__NR_getpgrp));
|
||||
|
||||
puts("+++ exited with 0 +++");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
SKIP_MAIN_UNDEFINED("__NR_getpgrp")
|
||||
|
||||
#endif
|
6
tests/getpgrp.test
Executable file
6
tests/getpgrp.test
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Check getpgrp syscall decoding.
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
run_strace_match_diff -a10
|
Loading…
x
Reference in New Issue
Block a user