s3:selftest: test the streams_depot module as it passes make test
[metze/samba/wip.git] / source / script / tests / selftest.sh
index 5a170b21172d7ee5f9887ca6a527fc2c7d78072a..f79c3292920467c8ff4f2272f0179c04a08f7e32 100755 (executable)
@@ -6,7 +6,7 @@ if [ $# != 3 ]; then
 fi
 
 SMBTORTURE4=$3
-TESTS=$2
+SUBTESTS=$2
 
 ##
 ## create the test directory
@@ -107,7 +107,7 @@ fi
 ## 
 ## create the test directory layout
 ##
-echo -n "CREATE TEST ENVIRONMENT IN '$PREFIX'"...
+printf "%s" "CREATE TEST ENVIRONMENT IN '$PREFIX'"...
 /bin/rm -rf $PREFIX/*
 mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $LOGDIR
 mkdir -p $SOCKET_WRAPPER_DIR
@@ -162,6 +162,10 @@ cat >$SERVERCONFFILE<<EOF
 
        passdb backend = tdbsam
 
+       domain master = yes
+       domain logons = yes
+       time server = yes
+
        add user script = $PERL $SRCDIR/lib/nss_wrapper/nss_wrapper.pl --path $NSS_WRAPPER_PASSWD --type passwd --action add --name %u
        add machine script = $PERL $SRCDIR/lib/nss_wrapper/nss_wrapper.pl --path $NSS_WRAPPER_PASSWD --type passwd --action add --name %u
        delete user script = $PERL $SRCDIR/lib/nss_wrapper/nss_wrapper.pl --path $NSS_WRAPPER_PASSWD --type passwd --action delete --name %u
@@ -183,10 +187,11 @@ cat >$SERVERCONFFILE<<EOF
        path = $PREFIX_ABS/tmp
        read only = no
        smbd:sharedelay = 100000
+       smbd:writetimeupdatedelay = 500000
        map hidden = yes
        map system = yes
        create mask = 755
-       vfs objects = $BINDIR/xattr_tdb.so
+       vfs objects = $BINDIR/xattr_tdb.so $BINDIR/streams_depot.so
 [hideunread]
        copy = tmp
        hide unreadable = yes
@@ -220,11 +225,16 @@ nogroup:x:65534:nobody
 $USERNAME-group:x:$GROUPID:
 EOF
 
+MAKE_TEST_BINARY="bin/smbpasswd"
+export MAKE_TEST_BINARY
+
 (echo $PASSWORD; echo $PASSWORD) | \
-       smbpasswd -c $CONFFILE -L -s -a $USERNAME >/dev/null || exit 1
+       bin/smbpasswd -c $CONFFILE -L -s -a $USERNAME >/dev/null || exit 1
 
 echo "DONE";
 
+MAKE_TEST_BINARY=""
+
 SERVER_TEST_FIFO="$PREFIX/server_test.fifo"
 export SERVER_TEST_FIFO
 NMBD_TEST_LOG="$PREFIX/nmbd_test.log"
@@ -234,9 +244,6 @@ export WINBINDD_TEST_LOG
 SMBD_TEST_LOG="$PREFIX/smbd_test.log"
 export SMBD_TEST_LOG
 
-MAKE_TEST_BINARY=""
-export MAKE_TEST_BINARY
-
 # start off with 0 failures
 failed=0
 export failed
@@ -247,6 +254,7 @@ SOCKET_WRAPPER_DEFAULT_IFACE=2
 export SOCKET_WRAPPER_DEFAULT_IFACE
 samba3_check_or_start
 
+
 # ensure any one smbtorture call doesn't run too long
 # and smbtorture will use 127.0.0.6 as source address by default
 SOCKET_WRAPPER_DEFAULT_IFACE=6
@@ -272,6 +280,7 @@ START=`date`
  echo "delaying for nbt name registration"
  sleep 10
  # This will return quickly when things are up, but be slow if we need to wait for (eg) SSL init 
+ MAKE_TEST_BINARY="bin/nmblookup"
  bin/nmblookup $CONFIGURATION -U $SERVER_IP __SAMBA__
  bin/nmblookup $CONFIGURATION __SAMBA__
  bin/nmblookup $CONFIGURATION -U 127.255.255.255 __SAMBA__
@@ -279,12 +288,14 @@ START=`date`
  bin/nmblookup $CONFIGURATION $SERVER
  # make sure smbd is also up set
  echo "wait for smbd"
+ MAKE_TEST_BINARY="bin/smbclient"
  bin/smbclient $CONFIGURATION -L $SERVER_IP -U% -p 139 | head -2
  bin/smbclient $CONFIGURATION -L $SERVER_IP -U% -p 139 | head -2
+ MAKE_TEST_BINARY=""
 
  failed=0
 
- . $SCRIPTDIR/tests_$TESTS.sh
+ . $SCRIPTDIR/tests_$SUBTESTS.sh
  exit $failed
 )
 failed=$?