From 06fbef53c5798677864b93a86d34aae5f7cd98d2 Mon Sep 17 00:00:00 2001 From: yoe Date: Mon, 6 Nov 2006 17:13:16 +0000 Subject: [PATCH] r219: Support checking on devel builds, too. --- simple_test | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/simple_test b/simple_test index 06af876..3432592 100755 --- a/simple_test +++ b/simple_test @@ -7,9 +7,17 @@ tmpnam=`mktemp` dd if=/dev/zero of=$tmpnam bs=1024 count=1024 ./nbd-server -C /dev/null -p ./nbd-server.pid 11111 $tmpnam & +# -p only works if nbd-server wasn't compiled with -DNOFORK or -DNODAEMON, +# which I sometimes do for testing and debugging. +PID=$! sleep 1 ./nbd-tester-client localhost 11111 retval=$? -kill `cat nbd-server.pid` +if [ -f nbd-server.pid ] +then + kill `cat nbd-server.pid` +else + kill $PID +fi rm -f nbd-server.pid exit $retval -- 1.7.10.4