diff options
Diffstat (limited to 'tests/xetpriority.c')
-rw-r--r-- | tests/xetpriority.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/xetpriority.c b/tests/xetpriority.c index 2d61bd10b..dd38217d7 100644 --- a/tests/xetpriority.c +++ b/tests/xetpriority.c @@ -7,6 +7,7 @@ #include "tests.h" #include "scno.h" +#include "pidns.h" #if defined __NR_getpriority && defined __NR_setpriority @@ -17,15 +18,30 @@ int main(void) { + PIDNS_TEST_INIT; + const int pid = getpid(); + const int pgid = getpgid(0); + long rc = syscall(__NR_getpriority, PRIO_PROCESS, F8ILL_KULONG_MASK | pid); - printf("getpriority(PRIO_PROCESS, %d) = %ld\n", pid, rc); + pidns_print_leader(); + printf("getpriority(PRIO_PROCESS, %d%s) = %ld\n", + pid, pidns_pid2str(PT_TGID), rc); rc = syscall(__NR_setpriority, PRIO_PROCESS, F8ILL_KULONG_MASK | pid, F8ILL_KULONG_MASK); - printf("setpriority(PRIO_PROCESS, %d, 0) = %s\n", pid, sprintrc(rc)); + pidns_print_leader(); + printf("setpriority(PRIO_PROCESS, %d%s, 0) = %s\n", + pid, pidns_pid2str(PT_TGID), sprintrc(rc)); + + rc = syscall(__NR_getpriority, PRIO_PGRP, + F8ILL_KULONG_MASK | pgid); + pidns_print_leader(); + printf("getpriority(PRIO_PGRP, %d%s) = %ld\n", + pgid, pidns_pid2str(PT_PGID), rc); + pidns_print_leader(); puts("+++ exited with 0 +++"); return 0; } |