diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-06-07 21:48:23 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-06-07 21:48:43 -0700 |
commit | 47a36ae531f4355bed1723b6edf902bf8db8292a (patch) | |
tree | 395d2697d8ed17e69cc6d07c17d27a057173e47c | |
parent | 0f57ea68700d7e8afb3f9e26249889ba0a02e22f (diff) | |
download | libnodelay-47a36ae531f4355bed1723b6edf902bf8db8292a.tar.gz |
sleep in test to avoid race condition
Yeah, it's janky and non-portable but so is the entire project.
-rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |