diff --git a/tests/unistd/nice.c b/tests/unistd/nice.c index bd86637b61..ea5fb7b244 100644 --- a/tests/unistd/nice.c +++ b/tests/unistd/nice.c @@ -4,10 +4,6 @@ #include "test_helpers.h" int main(void) { - // XXX: in linux sometimes the start prio is random - int s1 = setpriority(PRIO_PROCESS, 0, 0); - ERROR_IF(setpriority, s1, == -1); - errno = 0; int p1 = getpriority(PRIO_PROCESS, 0); ERROR_IF(getpriority, errno, != 0); @@ -19,16 +15,9 @@ int main(void) { errno = 0; int p2 = getpriority(PRIO_PROCESS, 0); ERROR_IF(getpriority, errno, != 0); - UNEXP_IF(nice, p2, != p1 + 5); + // XXX: in linux sometimes the start prio is random + UNEXP_IF(nice, p2, != p1 + 5 && p2 != 19); UNEXP_IF(nice, n1, != p2); - int s2 = setpriority(PRIO_PROCESS, 0, 15); - ERROR_IF(setpriority, s2, == -1); - - errno = 0; - int p3 = getpriority(PRIO_PROCESS, 0); - ERROR_IF(getpriority, errno, != 0); - UNEXP_IF(getpriority, p3, != 15); - return 0; } \ No newline at end of file