From 47a36ae531f4355bed1723b6edf902bf8db8292a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 7 Jun 2009 21:48:23 -0700 Subject: sleep in test to avoid race condition Yeah, it's janky and non-portable but so is the entire project. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 07e870d..7569e63 100644 --- a/Makefile +++ b/Makefile @@ -25,8 +25,9 @@ test: libnodelay.so strace -o test-client.out \ nc -q 1 127.0.0.1 $(TEST_PORT) & \ echo $$! > test-client.pid - kill `cat test-client.pid` || sleep 1 - kill `cat test-server.pid` || sleep 1 + sleep 1 + kill -9 `cat test-client.pid` || sleep 1 + kill -9 `cat test-server.pid` || sleep 1 $(RM) test-server.pid test-client.pid grep setsockopt.*TCP_NODELAY test-server.out grep setsockopt.*TCP_NODELAY test-client.out -- cgit v1.2.3-24-ge0c7