diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2015-08-11 23:40:00 -0700 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2015-08-11 23:40:00 -0700 |
commit | 84895dca70f972df3842fb88f7b33b5d695cc599 (patch) | |
tree | ade512ca77f27f09e58435878cec1c640dfaed88 /posix | |
parent | 5011051da35a91577d262040791cbe5a868cffbd (diff) | |
download | glibc-84895dca70f972df3842fb88f7b33b5d695cc599.tar.gz glibc-84895dca70f972df3842fb88f7b33b5d695cc599.tar.xz glibc-84895dca70f972df3842fb88f7b33b5d695cc599.zip |
Fix BZ #18086 -- nice resets errno to 0.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/tst-nice.c | 11 |
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; } |