From: bluhm Date: Fri, 29 Oct 2021 20:15:03 +0000 (+0000) Subject: If the test fails, do not hang forever. Abort with a 10 seconds X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c27920e40837b81213db8631e0862ec2a7912a6b;p=openbsd If the test fails, do not hang forever. Abort with a 10 seconds timeout. --- diff --git a/regress/sys/kern/poll/pollnval.c b/regress/sys/kern/poll/pollnval.c index adc9132e473..95be7eac710 100644 --- a/regress/sys/kern/poll/pollnval.c +++ b/regress/sys/kern/poll/pollnval.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pollnval.c,v 1.1 2021/10/29 13:13:04 mpi Exp $ */ +/* $OpenBSD: pollnval.c,v 1.2 2021/10/29 20:15:03 bluhm Exp $ */ /* * Copyright (c) 2021 Leah Neukirchen @@ -26,6 +26,9 @@ main(void) { struct pollfd fds[1]; + /* Do not hang forever, abort with timeout. */ + alarm(10); + fds[0].fd = 0; fds[0].events = POLLIN | POLLHUP; close(0);