projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6a81344
)
r265: Check whether the program runs with a config file rather than stuff on the...
author
yoe <yoe>
Thu, 19 Jul 2007 08:50:47 +0000
(08:50 +0000)
committer
yoe <yoe>
Thu, 19 Jul 2007 08:50:47 +0000
(08:50 +0000)
simple_test
patch
|
blob
|
history
diff --git
a/simple_test
b/simple_test
index
8b62f29
..
b19e968
100755
(executable)
--- a/
simple_test
+++ b/
simple_test
@@
-20,5
+20,23
@@
else
kill $PID
fi
rm -f nbd-server.pid
kill $PID
fi
rm -f nbd-server.pid
+if [ $retval -ne 0 ]
+then
+ rm -f $tmpnam
+ exit $retval
+fi
+cat > nbd-server.conf <<EOF
+[generic]
+[export]
+ exportname = `pwd`/$tmpnam
+ port = 11111
+EOF
+./nbd-server -C nbd-server.conf -p `pwd`/nbd-server.pid &
+PID=$!
+sleep 1
+./nbd-tester-client localhost 11111
+retval=$?
+rm -f nbd-server.pid
+rm -f nbd-server.conf
rm -f $tmpnam
exit $retval
rm -f $tmpnam
exit $retval