[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2311-g0b87981

Michael Adam obnox at samba.org
Tue May 6 10:26:51 GMT 2008


The branch, v3-3-test has been updated
       via  0b879817ba20861c7d0b239d7f7199b0a5ed2ca1 (commit)
       via  b73821c392a23c213e4b1ad25a8a2d0c845cee3a (commit)
       via  baea0615003cc2db8b27872e87064364f2deb079 (commit)
       via  dcf39078cf0524a7450db3f67c8e004eb42690c2 (commit)
       via  110c26374ef3e0bdefe2e54db2b8ffd4544780ef (commit)
       via  b5507f8a95399193099a0474fb8b8bc95ba04a48 (commit)
       via  a5fc47c2457ce370a4f6150b9f2a417dac7589bf (commit)
       via  026d701aff2c035359894786ec22b4ed829cfb31 (commit)
       via  65c619b36d08ac2f24b622c71b7e05d50bdeea50 (commit)
       via  6fb1fe803ccbd3af2946fcbe4586c11d394d5dc2 (commit)
       via  48446f0c798b07a707389404f7a064ed63110cbf (commit)
      from  8717085dba832cfe6d7b807a10f779e495adc326 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit 0b879817ba20861c7d0b239d7f7199b0a5ed2ca1
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 6 12:09:59 2008 +0200

    testsuite: make structuring output of net_s3 tests stand out more.
    
    say "RUNNING SUBTESTS ..." instead of "Running ... tests"
    
    Michael

commit b73821c392a23c213e4b1ad25a8a2d0c845cee3a
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 6 12:08:27 2008 +0200

    testsuite: make diagnostic output more appropriate in tests_all.sh
    
    Say "RUNNING TESTS ..." instead of "RUNNING SUBTESTS ..."
    
    Michael

commit baea0615003cc2db8b27872e87064364f2deb079
Author: Michael Adam <obnox at samba.org>
Date:   Fri Apr 4 18:29:44 2008 +0200

    testsuite: give the testuser administrative rights in selftest.sh
    
    (by adding him to builtin\administrators)
    
    Michael

commit dcf39078cf0524a7450db3f67c8e004eb42690c2
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 6 12:01:49 2008 +0200

    testsuite: run the net rpc registry tests from the net_s3 tests.
    
    Michael

commit 110c26374ef3e0bdefe2e54db2b8ffd4544780ef
Author: Michael Adam <obnox at samba.org>
Date:   Fri Apr 4 18:26:34 2008 +0200

    testsuite: add the ability to test "net rpc registry" with the net_registry tests
    
    by specifying a parameter "rpc" on the commandline.
    
    Michael

commit b5507f8a95399193099a0474fb8b8bc95ba04a48
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 6 11:43:27 2008 +0200

    testsuite: adapt informative message to say "Running _local_ registry tests".
    
    The plan is to also test remote registry  with "net rpc registry".
    
    Michael

commit a5fc47c2457ce370a4f6150b9f2a417dac7589bf
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 6 11:40:05 2008 +0200

    testsuite: use domain==workgroup in wbinfo tests now that we are PDC.
    
    Previously domain==netbios name was the right thing to use.
    
    Michael

commit 026d701aff2c035359894786ec22b4ed829cfb31
Author: Kai Blin <kai at samba.org>
Date:   Sat May 3 01:50:20 2008 +0200

    tests: Add a net_misc test.

commit 65c619b36d08ac2f24b622c71b7e05d50bdeea50
Author: Kai Blin <kai at samba.org>
Date:   Mon May 5 15:26:11 2008 +0200

    selftest: Advertise as PDC and time server during make test

commit 6fb1fe803ccbd3af2946fcbe4586c11d394d5dc2
Author: Kai Blin <kai at samba.org>
Date:   Sat May 3 01:45:33 2008 +0200

    selftest: Use TESTS env var to specify tests to run like Samba4 does.

commit 48446f0c798b07a707389404f7a064ed63110cbf
Author: Kai Blin <kai at samba.org>
Date:   Sat May 3 01:50:47 2008 +0200

    gitignore: Add *.swp files, *.patch files and export/libtdb.symb

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                               |    3 ++
 source/script/tests/selftest.sh          |   18 +++++++++-
 source/script/tests/test_net_misc.sh     |   50 ++++++++++++++++++++++++++++++
 source/script/tests/test_net_registry.sh |   11 +++++-
 source/script/tests/test_net_s3.sh       |   33 +++++++++++++++++++
 source/script/tests/test_wbinfo_s3.sh    |    4 +-
 source/script/tests/tests_all.sh         |   28 ++++++++--------
 7 files changed, 127 insertions(+), 20 deletions(-)
 create mode 100755 source/script/tests/test_net_misc.sh
 create mode 100755 source/script/tests/test_net_s3.sh


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index d924a3f..7fe98e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
 *.o
 *.po
 *~
+*.swp
+*.patch
 semantic.cache
 source/TAGS
 source/client/client_proto.h
@@ -38,6 +40,7 @@ source/cscope.out
 source/torture.tdb
 source/pkgconfig/*.pc
 source/st
+source/exports/libtdb.syms
 examples/VFS/Makefile
 examples/VFS/config.log
 examples/VFS/config.status
diff --git a/source/script/tests/selftest.sh b/source/script/tests/selftest.sh
index b53940e..5cec6d6 100755
--- a/source/script/tests/selftest.sh
+++ b/source/script/tests/selftest.sh
@@ -6,7 +6,7 @@ if [ $# != 3 ]; then
 fi
 
 SMBTORTURE4=$3
-TESTS=$2
+SUBTESTS=$2
 
 ##
 ## create the test directory
@@ -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
@@ -250,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
@@ -288,9 +293,18 @@ START=`date`
  bin/smbclient $CONFIGURATION -L $SERVER_IP -U% -p 139 | head -2
  MAKE_TEST_BINARY=""
 
+ MAKE_TEST_BINARY="bin/net"
+ printf "%s" "GIVING USER ${USERNAME} ADMINISTRATIVE RIGHTS..."
+ bin/net -s $SERVERCONFFILE sam createbuiltingroup \
+   Administrators > /dev/null 2>&1 ||  exit 1
+ bin/net -s $SERVERCONFFILE sam addmem \
+   BUILTIN\\Administrators $USERNAME > /dev/null 2>&1 || exit 1
+ echo "DONE"
+ MAKE_TEST_BINARY=""
+
  failed=0
 
- . $SCRIPTDIR/tests_$TESTS.sh
+ . $SCRIPTDIR/tests_$SUBTESTS.sh
  exit $failed
 )
 failed=$?
diff --git a/source/script/tests/test_net_misc.sh b/source/script/tests/test_net_misc.sh
new file mode 100755
index 0000000..3ceb087
--- /dev/null
+++ b/source/script/tests/test_net_misc.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# various tests for the "net" command
+
+NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
+
+NETTIME="${NET} time"
+NETLOOKUP="${NET} lookup"
+
+incdir=`dirname $0`
+. $incdir/test_functions.sh
+
+failed=0
+
+test_time()
+{
+	PARAM="$1"
+
+	${NETTIME} ${PARAM} -S localhost2
+}
+
+test_lookup()
+{
+	PARAM="$1"
+
+	${NETLOOKUP} ${PARAM}
+}
+
+testit "get the time" \
+	test_time || \
+	failed=`expr $failed + 1`
+
+testit "get the system time" \
+	test_time system || \
+	failed=`expr $failed + 1`
+
+testit "get the tize zone" \
+	test_time zone || \
+	failed=`expr $failed + 1`
+
+testit "lookup the PDC" \
+	test_lookup pdc || \
+	failed=`expr $failed + 1`
+
+testit "lookup the master browser" \
+	test_lookup master || \
+	failed=`expr $failed + 1`
+
+testok $0 $failed
+
diff --git a/source/script/tests/test_net_registry.sh b/source/script/tests/test_net_registry.sh
index 9ea78cf..b263ecb 100755
--- a/source/script/tests/test_net_registry.sh
+++ b/source/script/tests/test_net_registry.sh
@@ -2,10 +2,15 @@
 
 # tests for the "net registry" command - local access to the registry db
 
+RPC="$1"
 
 NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
 
-NETREG="${NET} registry"
+if test "x${RPC}" = "xrpc" ; then
+	NETREG="${NET} -U${USERNAME}%${PASSWORD} -I ${SERVER_IP} rpc registry"
+else
+	NETREG="${NET} registry"
+fi
 
 incdir=`dirname $0`
 . $incdir/test_functions.sh
@@ -324,7 +329,6 @@ test_setvalue_twice()
 	${NETREG} setvalue ${KEY} ${VALNAME} ${VALTYPE2} ${VALVALUE2}
 }
 
-
 testit "enumerate HKLM" \
 	test_enumerate HKLM || \
 	failed=`expr $failed + 1`
@@ -337,9 +341,12 @@ testit "enumerate without key" \
 	test_enumerate_no_key || \
 	failed=`expr $failed + 1`
 
+# skip getsd test for registry currently: it fails
+if test "x${RPC}" != "xrpc" ; then
 testit "getsd HKLM" \
 	test_getsd HKLM || \
 	failed=`expr $failed + 1`
+fi
 
 testit "create existing HKLM" \
 	test_create_existing || \
diff --git a/source/script/tests/test_net_s3.sh b/source/script/tests/test_net_s3.sh
new file mode 100755
index 0000000..f7dc2b7
--- /dev/null
+++ b/source/script/tests/test_net_s3.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# tests for the "net" command
+
+incdir=`dirname $0`
+. $incdir/test_functions.sh
+
+failed=0
+
+net_misc() {
+	echo "RUNNING SUBTESTS net_misc"
+	$SCRIPTDIR/test_net_misc.sh \
+	|| failed=`expr $failed + $?`
+}
+
+net_registry() {
+	echo "RUNNING SUBTESTS net_registry"
+	$SCRIPTDIR/test_net_registry.sh \
+	|| failed=`expr $failed + $?`
+}
+
+net_rpc_registry() {
+	echo "RUNNING SUBTESTS net_rpc_registry"
+	$SCRIPTDIR/test_net_registry.sh rpc \
+	|| failed=`expr $failed + $?`
+}
+
+net_misc
+net_registry
+net_rpc_registry
+
+testok $0 $failed
+
diff --git a/source/script/tests/test_wbinfo_s3.sh b/source/script/tests/test_wbinfo_s3.sh
index b0b6824..e3bf1b9 100755
--- a/source/script/tests/test_wbinfo_s3.sh
+++ b/source/script/tests/test_wbinfo_s3.sh
@@ -25,10 +25,10 @@ tests="$tests:--own-domain"
 tests="$tests:--all-domains"
 tests="$tests:--trusted-domains"
 tests="$tests:--domain-info=BUILTIN"
-tests="$tests:--domain-info=$server"
+tests="$tests:--domain-info=$domain"
 tests="$tests:--online-status"
 tests="$tests:--online-status --domain=BUILTIN"
-tests="$tests:--online-status --domain=$server"
+tests="$tests:--online-status --domain=$domain"
 #Didn't pass yet# tests="$tests:--domain-users"
 tests="$tests:--domain-groups"
 tests="$tests:--name-to-sid=$username"
diff --git a/source/script/tests/tests_all.sh b/source/script/tests/tests_all.sh
index 5e21537..5a6b467 100755
--- a/source/script/tests/tests_all.sh
+++ b/source/script/tests/tests_all.sh
@@ -1,55 +1,55 @@
 local_s3() {
-	echo "RUNNING SUBTESTS local_s3"
+	echo "RUNNING TESTS local_s3"
 	$SCRIPTDIR/test_local_s3.sh \
 	|| failed=`expr $failed + $?`
 }
 
 smbtorture_s3() {
-	echo "RUNNING SUBTESTS smbtorture_s3"
+	echo "RUNNING TESTS smbtorture_s3"
 	$SCRIPTDIR/test_smbtorture_s3.sh \
 		//$SERVER_IP/tmp $USERNAME $PASSWORD "" \
 	|| failed=`expr $failed + $?`
 }
 
 smbtorture_s3_encrypted() {
-	echo "RUNNING SUBTESTS smbtorture_s3_encrypted"
+	echo "RUNNING TESTS smbtorture_s3_encrypted"
 	$SCRIPTDIR/test_smbtorture_s3.sh \
 		//$SERVER_IP/tmp $USERNAME $PASSWORD "" "-e" \
 	|| failed=`expr $failed + $?`
 }
 
 smbclient_s3() {
-	echo "RUNNING SUBTESTS smbclient_s3"
+	echo "RUNNING TESTS smbclient_s3"
 	$SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP \
 	|| failed=`expr $failed + $?`
 }
 
 smbclient_s3_encrypted() {
-	echo "RUNNING SUBTESTS smbclient_s3_encrypted"
+	echo "RUNNING TESTS smbclient_s3_encrypted"
 	$SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP "-e" \
 	|| failed=`expr $failed + $?`
 }
 
 wbinfo_s3() {
-	echo "RUNNING SUBTESTS wbinfo_s3"
+	echo "RUNNING TESTS wbinfo_s3"
 	$SCRIPTDIR/test_wbinfo_s3.sh $WORKGROUP $SERVER $USERNAME $PASSWORD \
 	|| failed=`expr $failed + $?`
 }
 
 ntlm_auth_s3() {
-	echo "RUNNING SUBTESTS ntlm_auth_s3"
+	echo "RUNNING TESTS ntlm_auth_s3"
 	$SCRIPTDIR/test_ntlm_auth_s3.sh \
 	|| failed=`expr $failed + $?`
 }
 
-net_registry() {
-	echo "RUNNING SUBTESTS net_registry"
-	$SCRIPTDIR/test_net_registry.sh \
+net_s3() {
+	echo "RUNNING TESTS net_s3"
+	$SCRIPTDIR/test_net_s3.sh \
 	|| failed=`expr $failed + $?`
 }
 
 posix_s3() {
-	echo "RUNNING SUBTESTS posix_s3"
+	echo "RUNNING TESTS posix_s3"
 	eval "$LIB_PATH_VAR="\$SAMBA4SHAREDDIR:\$$LIB_PATH_VAR"; export $LIB_PATH_VAR"
 	eval echo "$LIB_PATH_VAR=\$$LIB_PATH_VAR"
 	SMBTORTURE4VERSION=`$SMBTORTURE4 --version`
@@ -64,7 +64,7 @@ posix_s3() {
 	fi
 }
 
-if test "x$RUNTESTS" = "x" ; then
+if test "x$TESTS" = "x" ; then
 	local_s3
 	smbtorture_s3
 	smbtorture_s3_encrypted
@@ -72,10 +72,10 @@ if test "x$RUNTESTS" = "x" ; then
 	smbclient_s3_encrypted
 	wbinfo_s3
 	ntlm_auth_s3
-	net_registry
+	net_s3
 	posix_s3
 else
-	for THIS_TEST in $RUNTESTS; do
+	for THIS_TEST in $TESTS; do
 		$THIS_TEST
 	done
 fi


-- 
Samba Shared Repository


More information about the samba-cvs mailing list