Date: Mon, 2 Mar 2020 07:34:07 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r358530 - user/pho/stress2/testcases/tcp Message-ID: <202003020734.0227Y7Vs092920@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Mon Mar 2 07:34:07 2020 New Revision: 358530 URL: https://svnweb.freebsd.org/changeset/base/358530 Log: Addd a timeout. Modified: user/pho/stress2/testcases/tcp/tcp.c Modified: user/pho/stress2/testcases/tcp/tcp.c ============================================================================== --- user/pho/stress2/testcases/tcp/tcp.c Mon Mar 2 07:33:15 2020 (r358529) +++ user/pho/stress2/testcases/tcp/tcp.c Mon Mar 2 07:34:07 2020 (r358530) @@ -58,6 +58,7 @@ reader(void) { struct sockaddr_in inetaddr, inetpeer; int n, t, *buf; + alarm(op->run_time + 30); on = 1; if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) err(1, "socket(), %s:%d", __FILE__, __LINE__); @@ -107,6 +108,7 @@ writer(void) { struct hostent *hostent; int i, *buf, r; + alarm(op->run_time + 30); on = 1; for (i = 1; i < 5; i++) { if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003020734.0227Y7Vs092920>