projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7439d80
)
r219: Support checking on devel builds, too.
author
yoe <yoe>
Mon, 6 Nov 2006 17:13:16 +0000
(17:13 +0000)
committer
yoe <yoe>
Mon, 6 Nov 2006 17:13:16 +0000
(17:13 +0000)
simple_test
patch
|
blob
|
history
diff --git
a/simple_test
b/simple_test
index
06af876
..
3432592
100755
(executable)
--- 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 &
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=$?
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
rm -f nbd-server.pid
exit $retval