summaryrefslogtreecommitdiffstats
path: root/regress/lib/libpthread/socket/3/socket3.c
diff options
context:
space:
mode:
authormarc <marc@openbsd.org>2002-10-12 19:02:51 +0000
committermarc <marc@openbsd.org>2002-10-12 19:02:51 +0000
commitef686a3db6ec470e3b574c7a9962c75956f7f17c (patch)
tree8175c274d5cfe2adf9656459a1020bd5b837f451 /regress/lib/libpthread/socket/3/socket3.c
parentreduce the amount of output on this test so you can see when things (diff)
downloadwireguard-openbsd-ef686a3db6ec470e3b574c7a9962c75956f7f17c.tar.xz
wireguard-openbsd-ef686a3db6ec470e3b574c7a9962c75956f7f17c.zip
Enable test for proper inheritance of NONBLOCK flag on accept.
The test will fail -- a reminder that I still need to fix this.
Diffstat (limited to 'regress/lib/libpthread/socket/3/socket3.c')
-rw-r--r--regress/lib/libpthread/socket/3/socket3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regress/lib/libpthread/socket/3/socket3.c b/regress/lib/libpthread/socket/3/socket3.c
index 03242f6768f..5f17bf9571c 100644
--- a/regress/lib/libpthread/socket/3/socket3.c
+++ b/regress/lib/libpthread/socket/3/socket3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: socket3.c,v 1.1 2002/10/10 00:45:20 marc Exp $ */
+/* $OpenBSD: socket3.c,v 1.2 2002/10/12 19:02:51 marc Exp $ */
/* PUBLIC DOMAIN Oct 2002 <marc@snafu.org> */
/* Test blocking/non-blocking mode inheritance on accept */
@@ -100,10 +100,10 @@ sock_accept(void *arg)
CHECKe(close(STDIN_FILENO));
accept_sa_size = sizeof accept_sa;
CHECKe(accept_fd = accept(listen_fd, &accept_sa, &accept_sa_size));
+ /* verify O_NONBLOCK on the accepted fd */
flags = fcntl(accept_fd, F_GETFL);
printf("accept_fd = %d, flags = %x\n", accept_fd, flags);
- /* XXX the above should abort if flags & O_NOBLOCK is zero */
- /* ASSERT(flags & O_NONBLOCK); */
+ ASSERT(flags & O_NONBLOCK);
CHECKe(close(listen_fd));
CHECKe(close(accept_fd));
CHECKr(pthread_join(connect_thread, NULL));