Date: Wed, 9 Dec 2015 13:45:51 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r292018 - user/pho/stress2/misc Message-ID: <201512091345.tB9Djpms087645@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Wed Dec 9 13:45:51 2015 New Revision: 292018 URL: https://svnweb.freebsd.org/changeset/base/292018 Log: Added timeout to test. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/fcntl.sh Modified: user/pho/stress2/misc/fcntl.sh ============================================================================== --- user/pho/stress2/misc/fcntl.sh Wed Dec 9 12:25:03 2015 (r292017) +++ user/pho/stress2/misc/fcntl.sh Wed Dec 9 13:45:51 2015 (r292018) @@ -38,8 +38,7 @@ sed '1,/^EOF/d' < $here/$0 > fcntl.c mycc -o fcntl -Wall -Wextra -O0 -g fcntl.c || exit 1 rm -f fcntl.c -/tmp/fcntl -status=$? +/tmp/fcntl || { status=$?; echo FAIL; } rm -f /tmp/fcntl exit $status @@ -63,6 +62,13 @@ const char name[] = "work"; int fd; static void +ahandler(int s __unused) +{ + unlink(name); + _exit(1); +} + +static void handler(int s __unused) { completed++; @@ -176,6 +182,8 @@ main(void) off_t len; signal(SIGHUP, handler); + signal(SIGALRM, ahandler); + alarm(300); if ((fd = open(name, O_RDWR | O_CREAT | O_TRUNC, 0640)) == -1) err(1, "open(%s)", name); len = N * sizeof(val);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512091345.tB9Djpms087645>