aboutsummaryrefslogtreecommitdiff
path: root/posix/tst-nice.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/tst-nice.c')
-rw-r--r--posix/tst-nice.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/posix/tst-nice.c b/posix/tst-nice.c
index ac78d6056f..814891deb6 100644
--- a/posix/tst-nice.c
+++ b/posix/tst-nice.c
@@ -56,8 +56,17 @@ do_test (void)
return 1;
}
- printf ("PASS: nice(%d) from %d return: %d\n", incr, old, ret);
+ /* BZ #18086. Make sure we don't reset errno. */
+ errno = EBADF;
+ nice (0);
+ if (errno != EBADF)
+ {
+ printf ("FAIL: errno = %i, but wanted EBADF (%i)\n", errno, EBADF);
+ return 1;
+ }
+
+ printf ("PASS: nice(%d) from %d return: %d\n", incr, old, ret);
return 0;
}