tests: add getsid.test
* tests/getsid.c: New file. * tests/getsid.test: New test. * tests/.gitignore: Add getsid. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add getsid.test.
This commit is contained in:
parent
2b69fd4c43
commit
8bfe0d5e22
1
tests/.gitignore
vendored
1
tests/.gitignore
vendored
@ -73,6 +73,7 @@ getresgid32
|
||||
getresuid
|
||||
getresuid32
|
||||
getrusage
|
||||
getsid
|
||||
getuid
|
||||
getuid32
|
||||
getxxid
|
||||
|
@ -126,6 +126,7 @@ check_PROGRAMS = \
|
||||
getresuid \
|
||||
getresuid32 \
|
||||
getrusage \
|
||||
getsid \
|
||||
getuid \
|
||||
getuid32 \
|
||||
getxxid \
|
||||
@ -371,6 +372,7 @@ DECODER_TESTS = \
|
||||
getresuid.test \
|
||||
getresuid32.test \
|
||||
getrusage.test \
|
||||
getsid.test \
|
||||
getuid.test \
|
||||
getuid32.test \
|
||||
getxxid.test \
|
||||
|
13
tests/getsid.c
Normal file
13
tests/getsid.c
Normal file
@ -0,0 +1,13 @@
|
||||
#include "tests.h"
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
pid_t pid = getpid();
|
||||
printf("getsid(%d) = %d\n", pid, getsid(pid));
|
||||
|
||||
puts("+++ exited with 0 +++");
|
||||
return 0;
|
||||
}
|
6
tests/getsid.test
Executable file
6
tests/getsid.test
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Check getsid syscall decoding.
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
run_strace_match_diff -a10
|
Loading…
Reference in New Issue
Block a user