projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a7138d8
)
Use YAZ GFS PID file instead of zebrasrv.pid
author
Adam Dickmeiss
<adam@indexdata.dk>
Sun, 2 Jan 2005 23:21:31 +0000
(23:21 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Sun, 2 Jan 2005 23:21:31 +0000
(23:21 +0000)
test/gils/stop01.sh
patch
|
blob
|
history
test/gils/stop02.sh
patch
|
blob
|
history
test/gils/stop03.sh
patch
|
blob
|
history
test/gils/stop04.sh
patch
|
blob
|
history
test/gils/test1.sh
patch
|
blob
|
history
test/gils/test2.sh
patch
|
blob
|
history
test/gils/test3.sh
patch
|
blob
|
history
test/gils/timing1.sh
patch
|
blob
|
history
test/gils/timing2.sh
patch
|
blob
|
history
diff --git
a/test/gils/stop01.sh
b/test/gils/stop01.sh
index
caf714b
..
edaf28e
100755
(executable)
--- a/
test/gils/stop01.sh
+++ b/
test/gils/stop01.sh
@@
-1,5
+1,5
@@
#!/bin/sh
#!/bin/sh
-# $Id: stop01.sh,v 1.9 2004-12-04 01:48:26 adam Exp $
+# $Id: stop01.sh,v 1.10 2005-01-02 23:21:31 adam Exp $
# test start and stop of the server with -1
pp=${srcdir:-"."}
# test start and stop of the server with -1
pp=${srcdir:-"."}
@@
-14,9
+14,6
@@
test -d reg || mkdir reg
#create a base to test on
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
#create a base to test on
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
-#kill old server (if any)
-test -f z.pid && kill -9 `cat z.pid`
-
echo "Starting server with -1 (one shot)..." >>$LOG
../../index/zebrasrv -D -p z.pid -1 -c $pp/zebra1.cfg -l $LOG unix:socket
echo " checking that it runs... " >>$LOG
echo "Starting server with -1 (one shot)..." >>$LOG
../../index/zebrasrv -D -p z.pid -1 -c $pp/zebra1.cfg -l $LOG unix:socket
echo " checking that it runs... " >>$LOG
diff --git
a/test/gils/stop02.sh
b/test/gils/stop02.sh
index
889cf8c
..
37a20db
100755
(executable)
--- a/
test/gils/stop02.sh
+++ b/
test/gils/stop02.sh
@@
-1,5
+1,5
@@
#!/bin/sh
#!/bin/sh
-# $Id: stop02.sh,v 1.9 2004-12-04 01:48:26 adam Exp $
+# $Id: stop02.sh,v 1.10 2005-01-02 23:21:31 adam Exp $
# test start and stop of the server with -S
pp=${srcdir:-"."}
# test start and stop of the server with -S
pp=${srcdir:-"."}
@@
-14,9
+14,6
@@
test -d reg || mkdir reg
#create a base to test on
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
#create a base to test on
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
-#kill old server (if any)
-test -f z.pid && kill -9 `cat z.pid`
-
echo "Starting server with -S (static)..." >>$LOG
../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg -l $LOG unix:socket
echo " checking that it runs... " >>$LOG
echo "Starting server with -S (static)..." >>$LOG
../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg -l $LOG unix:socket
echo " checking that it runs... " >>$LOG
diff --git
a/test/gils/stop03.sh
b/test/gils/stop03.sh
index
e2ab9fc
..
3b8cbe7
100755
(executable)
--- a/
test/gils/stop03.sh
+++ b/
test/gils/stop03.sh
@@
-1,5
+1,5
@@
#!/bin/sh
#!/bin/sh
-# $Id: stop03.sh,v 1.8 2004-09-24 15:03:19 adam Exp $
+# $Id: stop03.sh,v 1.9 2005-01-02 23:21:31 adam Exp $
# test start and stop of the threaded server (-T)
pp=${srcdir:-"."}
# test start and stop of the threaded server (-T)
pp=${srcdir:-"."}
@@
-14,31
+14,24
@@
mkdir -p reg
#create a base to test on
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
#create a base to test on
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
-#kill old server (if any)
-test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid`
-
echo "Starting server with -T (threaded)..." >>$LOG
echo "Starting server with -T (threaded)..." >>$LOG
-(
- ../../index/zebrasrv -T -c $pp/zebra1.cfg -l $LOG tcp:@:9901 2>out ||
- echo "server failed with $?" > $LOG
-)&
-sleep 1
+../../index/zebrasrv -D -p z.pid -T -c $pp/zebra1.cfg -l $LOG tcp:@:9901 2>out
if grep 'not available' out >/dev/null; then
if grep 'not available' out >/dev/null; then
- test -f zebrasrv.pid && rm zebrasrv.pid
+ test -f z.pid && rm -f z.pid
exit 0
fi
exit 0
fi
-echo " checking that it runs... " >>$LOG
-test -f zebrasrv.pid || sleep 5 || test -f zebrasrv.pid || exit 1
-PID=`cat zebrasrv.pid`
-ps -p $PID | grep $PID >/dev/null || exit 1
+
+PID=`cat z.pid`
+echo " checking that it still runs..." >>$LOG
+kill -CHLD $PID >/dev/null 2>&1 || exit 1
echo " connecting to it..." >>$LOG
../api/testclient localhost:9901 utah >>$LOG || exit 1
sleep 1
echo " checking that it still runs..." >>$LOG
echo " connecting to it..." >>$LOG
../api/testclient localhost:9901 utah >>$LOG || exit 1
sleep 1
echo " checking that it still runs..." >>$LOG
-ps -p $PID >/dev/null || exit 1
+kill -CHLD $PID >/dev/null 2>&1 || exit 1
echo " connecting again, with a delay..." >>$LOG
../api/testclient localhost:9901 utah 5 >>$LOG &
echo " connecting again, with a delay..." >>$LOG
../api/testclient localhost:9901 utah 5 >>$LOG &
@@
-48,8
+41,9
@@
echo " killing it..." >>$LOG
kill $PID
sleep 1
kill $PID
sleep 1
-echo " checking that it is dead" >>$LOG
-ps -p $PID | grep $PID >/dev/null && exit 1
+echo " checking that it is dead..." >>$LOG
+kill -CHLD $PID >/dev/null 2>&1 && sleep 1 && \
+kill -CHLD $PID >/dev/null 2>&1 && exit 1
# clean up
# clean up
-rm -rf reg zebrasrv.pid
+rm -rf reg z.pid
diff --git
a/test/gils/stop04.sh
b/test/gils/stop04.sh
index
11bfd7b
..
356afec
100755
(executable)
--- a/
test/gils/stop04.sh
+++ b/
test/gils/stop04.sh
@@
-1,5
+1,5
@@
#!/bin/sh
#!/bin/sh
-# $Id: stop04.sh,v 1.7 2004-09-24 15:03:19 adam Exp $
+# $Id: stop04.sh,v 1.8 2005-01-02 23:21:31 adam Exp $
# test start and stop of the forked server
pp=${srcdir:-"."}
# test start and stop of the forked server
pp=${srcdir:-"."}
@@
-14,24
+14,21
@@
mkdir -p reg
#create a base to test on
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
#create a base to test on
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
-#kill old server (if any)
-test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid`
-
echo "Starting server with (forked)..." >>$LOG
echo "Starting server with (forked)..." >>$LOG
-../../index/zebrasrv -c $pp/zebra1.cfg -l $LOG tcp:@:9901 &
+../../index/zebrasrv -D -p z.pid -c $pp/zebra1.cfg -l $LOG tcp:@:9901
sleep 1
echo " checking that it runs... " >>$LOG
sleep 1
echo " checking that it runs... " >>$LOG
-test -f zebrasrv.pid || sleep 5 || test -f zebrasrv.pid || exit 1
-PID=`cat zebrasrv.pid`
-ps -p $PID | grep $PID >/dev/null || exit 1
+test -f z.pid || sleep 5 || test -f z.pid || exit 1
+PID=`cat z.pid`
+kill -CHLD $PID >/dev/null 2>&1 || exit 1
echo " connecting to it..." >>$LOG
../api/testclient localhost:9901 utah >>$LOG || exit 1
sleep 1
echo " checking that it still runs..." >>$LOG
echo " connecting to it..." >>$LOG
../api/testclient localhost:9901 utah >>$LOG || exit 1
sleep 1
echo " checking that it still runs..." >>$LOG
-ps -p $PID | grep $PID >/dev/null || exit 1
+kill -CHLD $PID >/dev/null 2>&1 || exit 1
echo " connecting again, with a delay..." >>$LOG
../api/testclient localhost:9901 utah 5 >>$LOG
echo " connecting again, with a delay..." >>$LOG
../api/testclient localhost:9901 utah 5 >>$LOG
@@
-41,8
+38,10
@@
echo " killing it..." >>$LOG
kill $PID
sleep 1
kill $PID
sleep 1
-echo " checking that the server is dead..." >>$LOG
-ps -p $PID | grep $PID >/dev/null && exit 1
+echo " checking that it is dead..." >>$LOG
+kill -CHLD $PID >/dev/null 2>&1 && sleep 1 && \
+kill -CHLD $PID >/dev/null 2>&1 && exit 1
+
# clean up
# clean up
-rm -rf reg zebrasrv.pid
+rm -rf reg z.pid
diff --git
a/test/gils/test1.sh
b/test/gils/test1.sh
index
682ed78
..
666284f
100755
(executable)
--- a/
test/gils/test1.sh
+++ b/
test/gils/test1.sh
@@
-1,5
+1,5
@@
#!/bin/sh
#!/bin/sh
-# $Id: test1.sh,v 1.10 2004-09-24 15:03:19 adam Exp $
+# $Id: test1.sh,v 1.11 2005-01-02 23:21:31 adam Exp $
pp=${srcdir:-"."}
pp=${srcdir:-"."}
@@
-14,15
+14,12
@@
rm -f $pp/records/esdd000[12].grs # these should not be here, will be created la
echo "updating..." >>$LOG
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1
echo "updating..." >>$LOG
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1
-echo "killing old server (if any)..." >>$LOG
-test -f zebrasrv.pid && kill `cat zebrasrv.pid`
-
echo "starting server..." >>$LOG
echo "starting server..." >>$LOG
-../../index/zebrasrv -S -c $pp/zebra1.cfg -l $LOG tcp:@:9901 &
+../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg -l $LOG tcp:@:9901
sleep 1
echo "checking it runs..." >>$LOG
sleep 1
echo "checking it runs..." >>$LOG
-test -f zebrasrv.pid || sleep 5 || test -f zebrasrv.pid || exit 1
+test -f z.pid || sleep 5 || test -f z.pid || exit 1
echo "search 1..." >>$LOG
../api/testclient localhost:9901 utah > log || exit 1
echo "search 1..." >>$LOG
../api/testclient localhost:9901 utah > log || exit 1
@@
-48,7
+45,7
@@
echo "search 5..." >>$LOG
grep "^Result count: 18$" log >/dev/null || exit 1
echo "stopping server..." >>$LOG
grep "^Result count: 18$" log >/dev/null || exit 1
echo "stopping server..." >>$LOG
-test -f zebrasrv.pid || exit 1
-kill `cat zebrasrv.pid` || exit 1
-rm -f zebrasrv.pid
+test -f z.pid || exit 1
+kill `cat z.pid` || exit 1
+rm -f z.pid
diff --git
a/test/gils/test2.sh
b/test/gils/test2.sh
index
c99e171
..
8a13039
100755
(executable)
--- a/
test/gils/test2.sh
+++ b/
test/gils/test2.sh
@@
-1,5
+1,5
@@
#!/bin/sh
#!/bin/sh
-# $Id: test2.sh,v 1.10 2004-09-24 15:03:19 adam Exp $
+# $Id: test2.sh,v 1.11 2005-01-02 23:21:31 adam Exp $
pp=${srcdir:-"."}
pp=${srcdir:-"."}
@@
-17,12
+17,12
@@
echo "update 2..." >>$LOG
../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
echo "killing old server (if any)..." >>$LOG
../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
echo "killing old server (if any)..." >>$LOG
-test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid`
+test -f z.pid && kill -9 `cat z.pid`
echo "starting server..." >>$LOG
echo "starting server..." >>$LOG
-../../index/zebrasrv -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901 &
+../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901
sleep 1
sleep 1
-test -f zebrasrv.pid || sleep 5 || test -f zebrasrv.pid || exit 1
+test -f z.pid || sleep 5 || test -f z.pid || exit 1
echo "search 1..." >>$LOG
../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
echo "search 1..." >>$LOG
../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
@@
-81,8
+81,8
@@
echo "search 7..." >>$LOG
grep "^Result count: 1$" log >/dev/null || exit 1
echo "stopping server..." >>$LOG
grep "^Result count: 1$" log >/dev/null || exit 1
echo "stopping server..." >>$LOG
-test -f zebrasrv.pid || exit 1
-kill `cat zebrasrv.pid` || exit 1
+test -f z.pid || exit 1
+kill `cat z.pid` || exit 1
rm -f log
rm -f $pp/records/esdd000[12].grs
rm -f log
rm -f $pp/records/esdd000[12].grs
-rm -f zebrasrv.pid
+rm -f z.pid
diff --git
a/test/gils/test3.sh
b/test/gils/test3.sh
index
e8bfbb0
..
04eb3d7
100755
(executable)
--- a/
test/gils/test3.sh
+++ b/
test/gils/test3.sh
@@
-1,5
+1,5
@@
#!/bin/sh
#!/bin/sh
-# $Id: test3.sh,v 1.4 2004-06-15 09:43:30 adam Exp $
+# $Id: test3.sh,v 1.5 2005-01-02 23:21:31 adam Exp $
# Testing searches with lots of @and operators
# in order to test the fast-forward operation of rsets
# Testing searches with lots of @and operators
# in order to test the fast-forward operation of rsets
@@
-10,9
+10,6
@@
LOG=test3.log
DBG="-v 1647"
rm -f $LOG
DBG="-v 1647"
rm -f $LOG
-echo "killing old server (if any)..." >>$LOG
-test -f zebrasrv.pid && kill `cat zebrasrv.pid`
-rm -f zebrasrv.pid
echo "initializing..." >>$LOG
mkdir -p reg
echo "initializing..." >>$LOG
mkdir -p reg
@@
-22,11
+19,11
@@
echo "updating..." >>$LOG
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1
echo "starting server..." >>$LOG
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1
echo "starting server..." >>$LOG
-../../index/zebrasrv -S -c $pp/zebra1.cfg $DBG -l $LOG tcp:@:9901 &
+../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg $DBG -l $LOG tcp:@:9901
sleep 1
echo "checking it runs..." >>$LOG
sleep 1
echo "checking it runs..." >>$LOG
-test -f zebrasrv.pid || exit 1
+test -f z.pid || exit 1
echo "search A1..." >>$LOG
../api/testclient -c 17 localhost:9901 utah > log || exit 1
echo "search A1..." >>$LOG
../api/testclient -c 17 localhost:9901 utah > log || exit 1
@@
-117,9
+114,9
@@
echo "search F4..." >>$LOG
echo "stopping server..." >>$LOG
echo "stopping server..." >>$LOG
-test -f zebrasrv.pid || exit 1
-kill `cat zebrasrv.pid` || exit 1
-rm -f zebrasrv.pid
+test -f z.pid || exit 1
+kill `cat z.pid` || exit 1
+rm -f z.pid
sleep 1
echo "Test successfully completed" >>$LOG
sleep 1
echo "Test successfully completed" >>$LOG
diff --git
a/test/gils/timing1.sh
b/test/gils/timing1.sh
index
b59b876
..
a394281
100755
(executable)
--- a/
test/gils/timing1.sh
+++ b/
test/gils/timing1.sh
@@
-1,5
+1,5
@@
#!/bin/sh
#!/bin/sh
-# $Id: timing1.sh,v 1.9 2004-06-15 09:43:30 adam Exp $
+# $Id: timing1.sh,v 1.10 2005-01-02 23:21:31 adam Exp $
# tests that updates are reflected immediately # in the registers.
# Repeatedly modifies a record and counts hits.
# Test 1: with good sleeps in every between - should pass always
# tests that updates are reflected immediately # in the registers.
# Repeatedly modifies a record and counts hits.
# Test 1: with good sleeps in every between - should pass always
@@
-14,13
+14,10
@@
echo " init..." >>$LOG
rm -f $pp/records/esdd000[12].grs # these should not be here, will be created later
../../index/zebraidx -c $pp/zebra2.cfg -l $LOG init || exit 1
rm -f $pp/records/esdd000[12].grs # these should not be here, will be created later
../../index/zebraidx -c $pp/zebra2.cfg -l $LOG init || exit 1
-echo " killing old server (if any)..." >>$LOG
-test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid`
-
echo " starting server..." >>$LOG
echo " starting server..." >>$LOG
-../../index/zebrasrv -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901 &
+../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901
sleep 1
sleep 1
-test -f zebrasrv.pid || exit 1
+test -f z.pid || exit 1
sleep 2
echo " update 1..." >>$LOG
sleep 2
echo " update 1..." >>$LOG
@@
-131,9
+128,9
@@
echo " checking..." >>$LOG
grep "^Result count: 10$" log >/dev/null || exit 1
echo "stopping server..." >>$LOG
grep "^Result count: 10$" log >/dev/null || exit 1
echo "stopping server..." >>$LOG
-test -f zebrasrv.pid || exit 1
-kill `cat zebrasrv.pid` || exit 1
+test -f z.pid || exit 1
+kill `cat z.pid` || exit 1
rm -f log
rm -f $pp/records/esdd000[12].grs
rm -f log
rm -f $pp/records/esdd000[12].grs
-rm -f zebrasrv.pid
+rm -f z.pid
diff --git
a/test/gils/timing2.sh
b/test/gils/timing2.sh
index
e34b1c2
..
ddbd0fa
100755
(executable)
--- a/
test/gils/timing2.sh
+++ b/
test/gils/timing2.sh
@@
-1,5
+1,5
@@
#!/bin/sh
#!/bin/sh
-# $Id: timing2.sh,v 1.9 2004-06-15 09:43:30 adam Exp $
+# $Id: timing2.sh,v 1.10 2005-01-02 23:21:31 adam Exp $
# Demonstrated that updates depend on file timestamps
pp=${srcdir:-"."}
# Demonstrated that updates depend on file timestamps
pp=${srcdir:-"."}
@@
-14,13
+14,10
@@
rm -f $pp/records/esdd000[12].grs # these should not be here, will be created la
../../index/zebraidx -c $pp/zebra2.cfg -l $LOG init || exit 1
touch timeref1 # make an early timestamp
../../index/zebraidx -c $pp/zebra2.cfg -l $LOG init || exit 1
touch timeref1 # make an early timestamp
-echo " killing old server (if any)..." >>$LOG
-test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid`
-
echo " starting server..." >>$LOG
echo " starting server..." >>$LOG
-../../index/zebrasrv -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901 &
+../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901
sleep 1
sleep 1
-test -f zebrasrv.pid || exit 1
+test -f z.pid || exit 1
touch timeref2 # make a later timestamp
echo " update 1..." >>$LOG
touch timeref2 # make a later timestamp
echo " update 1..." >>$LOG
@@
-66,9
+63,9
@@
echo " checking..." >>$LOG
grep "^Result count: 9$" log >/dev/null || exit 1
echo "stopping server..." >>$LOG
grep "^Result count: 9$" log >/dev/null || exit 1
echo "stopping server..." >>$LOG
-test -f zebrasrv.pid || exit 1
-kill `cat zebrasrv.pid` || exit 1
+test -f z.pid || exit 1
+kill `cat z.pid` || exit 1
rm -f log timeref[12]
rm -f $pp/records/esdd000[12].grs
rm -f log timeref[12]
rm -f $pp/records/esdd000[12].grs
-rm -f zebrasrv.pid
+rm -f z.pid