diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-06-23 22:39:32 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-06-23 22:39:32 +0000 |
commit | 5a2b566d4784e6cecadc12e756ae4df5faba5311 (patch) | |
tree | 695b1875929ec7084c750079ade78f9f0191ae1d /regress/lib | |
parent | ac5e40f42d1db1a4e1916d49bc52a27191c7a490 (diff) |
Adjust test. You're not supposed to change errno in a signal handler and
count on it being observable in the normal program flow after the signal
handler returns. Such code would break code that sets errno to 0 and
looks at its value later. With the recent futex(2) changes this particular
aspect of the test no longer passed.
ok deraadt@, bluhm@
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libpthread/errno/errno.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/regress/lib/libpthread/errno/errno.c b/regress/lib/libpthread/errno/errno.c index 5ddf05775f8..941e1b713a4 100644 --- a/regress/lib/libpthread/errno/errno.c +++ b/regress/lib/libpthread/errno/errno.c @@ -1,4 +1,4 @@ -/* $OpenBSD: errno.c,v 1.2 2012/02/20 02:34:33 guenther Exp $ */ +/* $OpenBSD: errno.c,v 1.3 2021/06/23 22:39:31 kettenis Exp $ */ /* PUBLIC DOMAIN Sep 2011 <guenther@openbsd.org> */ /* @@ -68,9 +68,7 @@ act_handler(int signal) ASSERT(&errno == t1_errno); ASSERTe(errno, == EXDEV); ASSERT(pthread_equal(t1_tid, pthread_self())); - errno = ENODEV; CHECKe(kill(getpid(), SIGUSR2)); - ASSERTe(errno, == ENODEV); } else if (handler_errno == &t2_errno) { CHECKe(write(STDOUT_FILENO, "2", 1)); ASSERT(&errno == t2_errno); @@ -102,7 +100,6 @@ tmain(void *arg) set_state(T1_SIGNAL); ASSERT(&errno == t1_errno); wait_for_state(T1_CHECK2); - ASSERTe(*t1_errno, == ENODEV); ASSERT(&errno == t1_errno); ASSERT(pthread_equal(t1_tid, pthread_self())); @@ -176,7 +173,6 @@ main(int argc, char **argv) ASSERT(&errno == main_errno); ASSERT(pthread_equal(main_tid, pthread_self())); - handler_errno = &t1_errno; CHECKe(pthread_kill(t1_tid, SIGUSR1)); ASSERT(&errno == main_errno); |