tests: add sched_rr_get_interval.test
* tests/sched_rr_get_interval.c: New file. * tests/sched_rr_get_interval.test: New test. * tests/.gitignore: Add sched_rr_get_interval. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add sched_rr_get_interval.test.
This commit is contained in:
1
tests/.gitignore
vendored
1
tests/.gitignore
vendored
@ -152,6 +152,7 @@ rt_sigsuspend
|
||||
rt_sigtimedwait
|
||||
rt_tgsigqueueinfo
|
||||
sched_get_priority_mxx
|
||||
sched_rr_get_interval
|
||||
sched_xetaffinity
|
||||
sched_xetattr
|
||||
sched_xetparam
|
||||
|
@ -203,6 +203,7 @@ check_PROGRAMS = \
|
||||
rt_sigtimedwait \
|
||||
rt_tgsigqueueinfo \
|
||||
sched_get_priority_mxx \
|
||||
sched_rr_get_interval \
|
||||
sched_xetaffinity \
|
||||
sched_xetattr \
|
||||
sched_xetparam \
|
||||
@ -450,6 +451,7 @@ DECODER_TESTS = \
|
||||
rt_sigtimedwait.test \
|
||||
rt_tgsigqueueinfo.test \
|
||||
sched_get_priority_mxx.test \
|
||||
sched_rr_get_interval.test \
|
||||
sched_xetaffinity.test \
|
||||
sched_xetattr.test \
|
||||
sched_xetparam.test \
|
||||
|
26
tests/sched_rr_get_interval.c
Normal file
26
tests/sched_rr_get_interval.c
Normal file
@ -0,0 +1,26 @@
|
||||
#include "tests.h"
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __NR_sched_rr_get_interval
|
||||
|
||||
# include <stdio.h>
|
||||
# include <sched.h>
|
||||
# include <unistd.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
struct timespec *const tp = tail_alloc(sizeof(struct timespec));
|
||||
long rc = syscall(__NR_sched_rr_get_interval, -1, tp);
|
||||
printf("sched_rr_get_interval(-1, %p) = %ld %s (%m)\n",
|
||||
tp, rc, errno2name());
|
||||
|
||||
puts("+++ exited with 0 +++");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
SKIP_MAIN_UNDEFINED("__NR_sched_rr_get_interval")
|
||||
|
||||
#endif
|
6
tests/sched_rr_get_interval.test
Executable file
6
tests/sched_rr_get_interval.test
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Check sched_rr_get_interval syscall decoding.
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
run_strace_match_diff -a31
|
Reference in New Issue
Block a user