Author: tridge
Date: 2005-06-11 04:07:20 +0000 (Sat, 11 Jun 2005)
New Revision: 7485

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7485

Log:
- allow test_xxx.sh to run outside of 'make test' by ensuring $PREFIX is setup

- use loopback interface only, otherwise nbtd will answer with a real
  ip, which the socket wrapper code will fail to connect to

- enable eadb for posix testing

- sleeping to wait for smbd to start is pointless, as smbd won't start
  till its fifo is opened due to the fifo redirection on stdin

- sleep for a few seconds to allow for nbt server to register names after 
opening fifo

- use bcast name resolution, so we don't rely on /etc/hosts being right


Modified:
   branches/SAMBA_4_0/source/script/tests/selftest.sh
   branches/SAMBA_4_0/source/script/tests/test_functions.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/selftest.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/selftest.sh  2005-06-11 03:55:40 UTC 
(rev 7484)
+++ branches/SAMBA_4_0/source/script/tests/selftest.sh  2005-06-11 04:07:20 UTC 
(rev 7485)
@@ -50,12 +50,15 @@
        ncalrpc dir = $NCALRPCDIR
        lock dir = $LOCKDIR
        sam database = tdb://$PRIVATEDIR/sam.ldb
+       name resolve order = bcast
+       interfaces = lo
 
 [tmp]
        path = $TMPDIR
        read only = no
        ntvfs handler = posix
        posix:sharedelay = 100000
+       posix:eadb = $LOCKDIR/eadb.tdb
 EOF
 
 ADDARG="-s $CONFFILE"
@@ -67,6 +70,10 @@
 
 START=`date`
 (
+ # give time for nbt server to register its names
+ echo delaying for nbt name registration
+ sleep 4
+
  failed=0
  $SRCDIR/script/tests/test_rpc.sh localhost $USERNAME $PASSWORD $DOMAIN 
$ADDARG || failed=`expr $failed + $?`
  $SRCDIR/script/tests/test_binding_string.sh localhost $USERNAME $PASSWORD 
$DOMAIN $ADDARG || failed=`expr $failed + $?`

Modified: branches/SAMBA_4_0/source/script/tests/test_functions.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_functions.sh    2005-06-11 
03:55:40 UTC (rev 7484)
+++ branches/SAMBA_4_0/source/script/tests/test_functions.sh    2005-06-11 
04:07:20 UTC (rev 7485)
@@ -29,7 +29,6 @@
                        echo "smbd exists with status $ret" >>$SMBD_TEST_LOG;
                        exit $ret;
                ) || exit $? &) 2>/dev/null || exit $?
-               sleep 2
                echo  "DONE"
        fi
        return 0;
@@ -55,7 +54,11 @@
 }
 
 testit() {
-        name=$1
+       if [ -z "$PREFIX" ]; then
+           PREFIX=test_prefix
+           mkdir -p $PREFIX
+       fi
+       name=$1
        shift 1
        SMBD_IS_UP="no"
        TEST_LOG="$PREFIX/test_log.$$"

Reply via email to