tests: add setdomainname.test
* tests/setdomainname.c: New file. * tests/setdomainname.test: New test. * tests/.gitignore: Add setdomainname. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add setdomainname.test.
This commit is contained in:
parent
cd61c9f3e4
commit
7f05113624
1
tests/.gitignore
vendored
1
tests/.gitignore
vendored
@ -166,6 +166,7 @@ semop
|
||||
sendfile
|
||||
sendfile64
|
||||
set_ptracer_any
|
||||
setdomainname
|
||||
setfsgid
|
||||
setfsgid32
|
||||
setfsuid
|
||||
|
@ -217,6 +217,7 @@ check_PROGRAMS = \
|
||||
sendfile \
|
||||
sendfile64 \
|
||||
set_ptracer_any \
|
||||
setdomainname \
|
||||
setfsgid \
|
||||
setfsgid32 \
|
||||
setfsuid \
|
||||
@ -464,6 +465,7 @@ DECODER_TESTS = \
|
||||
semop.test \
|
||||
sendfile.test \
|
||||
sendfile64.test \
|
||||
setdomainname.test \
|
||||
setfsgid.test \
|
||||
setfsgid32.test \
|
||||
setfsuid.test \
|
||||
|
24
tests/setdomainname.c
Normal file
24
tests/setdomainname.c
Normal file
@ -0,0 +1,24 @@
|
||||
#include "tests.h"
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __NR_setdomainname
|
||||
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
long rc = syscall(__NR_setdomainname, 0, 63);
|
||||
printf("setdomainname(NULL, 63) = %ld %s (%m)\n",
|
||||
rc, errno2name());
|
||||
|
||||
puts("+++ exited with 0 +++");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
SKIP_MAIN_UNDEFINED("__NR_setdomainname")
|
||||
|
||||
#endif
|
6
tests/setdomainname.test
Executable file
6
tests/setdomainname.test
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Check setdomainname syscall decoding.
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
run_strace_match_diff -a24
|
Loading…
Reference in New Issue
Block a user