[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Fri Mar 4 18:20:02 MST 2011


The branch, master has been updated
       via  f1a5109 s3:test: the registry roundtrip test passes now
       via  916ff0b s3:test: mark vanished parameter "postscript" invalid in net registry roundtrip test
       via  2fd2e2e s3:test: in net registry roundtrip test, mark "lock dir" as invalid parameter
       via  541c580 s3:test: in net registry roundtrip test, exclude the files from exclude/logon
       via  aa8c9ef s3:registry: fix invalid write in iconvert_talloc()
       via  7b4fc4d s3:test: correctly react to each failing step in the net registry roundtrip tests
       via  f5ab9c1 s3:test: improve logging in the net registry roundtrip test steps
      from  eade61a s4:operational LDB module - fix attribute names to be right up/down-cased

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit f1a5109565cc178242acd33d9d1eb2fd80229e2c
Author: Michael Adam <obnox at samba.org>
Date:   Sat Mar 5 00:58:19 2011 +0100

    s3:test: the registry roundtrip test passes now
    
    Autobuild-User: Michael Adam <obnox at samba.org>
    Autobuild-Date: Sat Mar  5 02:19:33 CET 2011 on sn-devel-104

commit 916ff0bf55afb0335ced8c0b71b9d3a69eb3df13
Author: Michael Adam <obnox at samba.org>
Date:   Sat Mar 5 00:55:27 2011 +0100

    s3:test: mark vanished parameter "postscript" invalid in net registry roundtrip test

commit 2fd2e2e75d3906fcb79a0a502b51772f7bcf6e1b
Author: Michael Adam <obnox at samba.org>
Date:   Sat Mar 5 00:54:28 2011 +0100

    s3:test: in net registry roundtrip test, mark "lock dir" as invalid parameter
    
    This is a synonym of lock directory which is already marked invalid.

commit 541c580895da69c26c2f4ac0e793e7881f01651e
Author: Michael Adam <obnox at samba.org>
Date:   Sat Mar 5 00:50:21 2011 +0100

    s3:test: in net registry roundtrip test, exclude the files from exclude/logon
    
    These files are not samba config files...

commit aa8c9ef1387d4a92ebcc03580bbb9a8a4bcb8320
Author: Michael Adam <obnox at samba.org>
Date:   Fri Mar 4 23:53:44 2011 +0100

    s3:registry: fix invalid write in iconvert_talloc()
    
    For a non-preallocated dest-string and sourcestring of len < 2,
    (one or both of the) final two two zero-bytes would be written
    after the end of the allocated dest-string. The sourcelen did
    not include the source string terminator. For longer strings,
    this was not a problem because the dest-string would have been
    reallocated in the convert-loop. This is fixed now by allocating
    two extra bytes for the terminating 0-bytes that are needed anyways
    in the initial allocation.
    
    Pair-Programmed-With: Gregor Beck <gbeck at sernet.de>

commit 7b4fc4d745d3286363d4627b7c6d93696269fd65
Author: Michael Adam <obnox at samba.org>
Date:   Fri Mar 4 23:17:02 2011 +0100

    s3:test: correctly react to each failing step in the net registry roundtrip tests

commit f5ab9c1e77fceca7893449d4aeb763fc9a91562b
Author: Michael Adam <obnox at samba.org>
Date:   Fri Mar 4 23:12:08 2011 +0100

    s3:test: improve logging in the net registry roundtrip test steps

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

Summary of changes:
 source3/registry/reg_parse_internal.c              |    7 ++-
 .../script/tests/test_net_registry_roundtrip.sh    |   41 +++++++++++++++++++-
 source3/selftest/knownfail                         |    1 -
 3 files changed, 44 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/registry/reg_parse_internal.c b/source3/registry/reg_parse_internal.c
index 4734662..dedbe12 100644
--- a/source3/registry/reg_parse_internal.c
+++ b/source3/registry/reg_parse_internal.c
@@ -42,8 +42,11 @@ size_t iconvert_talloc(const void* ctx,
 	dst = *pdst;
 
 	if (dst == NULL) {
-		/* dstlen = 2*srclen + 2; */
-		dstlen = srclen;
+		/*
+		 * Allocate an extra two bytes for the
+		 * terminating zero.
+		 */
+		dstlen = srclen + 2;
 		dst = (char *)talloc_size(ctx, dstlen);
 		if (dst == NULL) {
 			DEBUG(0,("iconver_talloc no mem\n"));
diff --git a/source3/script/tests/test_net_registry_roundtrip.sh b/source3/script/tests/test_net_registry_roundtrip.sh
index eba28a6..5431098 100755
--- a/source3/script/tests/test_net_registry_roundtrip.sh
+++ b/source3/script/tests/test_net_registry_roundtrip.sh
@@ -34,6 +34,7 @@ failed=0
 
 SED_INVALID_PARAMS="{
 s/lock directory/;&/g
+s/lock dir/;&/g
 s/modules dir/;&/g
 s/logging/;&/g
 s/status/;&/g
@@ -45,13 +46,20 @@ s/timesync/;&/g
 s/sambaconf/;&/g
 s/logtype/;&/g
 s/servername/;&/g
+s/postscript/;&/g
 }"
 
 REGPATH="HKLM\Software\Samba"
 
 conf_roundtrip_step() {
-    echo $* >>$LOG
+    echo "CMD: $*" >>$LOG
     $@ 2>>$LOG
+    RC=$?
+    echo "RC: $RC" >> $LOG
+    test "x$RC" = "x0" || {
+        echo "ERROR: $@ failed (RC=$RC)" | tee -a $LOG
+    }
+    return $RC
 #    echo -n .
 }
 
@@ -67,6 +75,10 @@ conf_roundtrip()
     sed -e "$SED_INVALID_PARAMS" $1 >$DIR/conf_in
 
     conf_roundtrip_step $NET conf drop
+    test "x$?" = "x0" || {
+        return 1
+    }
+
     test -z "$($NET conf list)" 2>>$LOG
     if [ "$?" = "1" ]; then
 	echo "ERROR: conf drop failed" | tee -a $LOG
@@ -74,7 +86,14 @@ conf_roundtrip()
     fi
 
     conf_roundtrip_step $NET conf import $DIR/conf_in
+    test "x$?" = "x0" || {
+        return 1
+    }
+
     conf_roundtrip_step $NET conf list > $DIR/conf_exp
+    test "x$?" = "x0" || {
+        return 1
+    }
 
     grep "\[global\]" $DIR/conf_exp >/dev/null 2>>$LOG
     if [ "$?" = "1" ]; then
@@ -83,8 +102,15 @@ conf_roundtrip()
     fi
 
     conf_roundtrip_step $NET -d10 registry export $REGPATH $DIR/conf_exp.reg
+    test "x$?" = "x0" || {
+        return 1
+    }
 
     conf_roundtrip_step $NET conf drop
+    test "x$?" = "x0" || {
+        return 1
+    }
+
     test -z "$($NET conf list)" 2>>$LOG
     if [ "$?" = "1" ]; then
 	echo "ERROR: conf drop failed" | tee -a $LOG
@@ -92,8 +118,15 @@ conf_roundtrip()
     fi
 
     conf_roundtrip_step $NET registry import $DIR/conf_exp.reg
+    test "x$?" = "x0" || {
+        return 1
+    }
 
     conf_roundtrip_step $NET conf list >$DIR/conf_out
+    test "x$?" = "x0"  || {
+        return 1
+    }
+
     diff -q $DIR/conf_out $DIR/conf_exp  >> $LOG
     if [ "$?" = "1" ]; then
 	echo "ERROR: registry import => conf export failed"  | tee -a $LOG
@@ -101,6 +134,10 @@ conf_roundtrip()
     fi
 
     conf_roundtrip_step $NET registry export $REGPATH $DIR/conf_out.reg
+    test "x$?" = "x0" || {
+        return 1
+    }
+
     diff -q $DIR/conf_out.reg $DIR/conf_exp.reg >>$LOG
     if [ "$?" = "1" ]; then
 	echo "Error: registry import => registry export failed" | tee -a $LOG
@@ -109,7 +146,7 @@ conf_roundtrip()
     rm -r $DIR
 }
 
-CONF_FILES=${CONF_FILES:-$(find $SRCDIR/ -name '*.conf' | xargs grep -l "\[global\]")}
+CONF_FILES=${CONF_FILES:-$(find $SRCDIR/ -name '*.conf' | grep -v examples/logon | xargs grep -l "\[global\]")}
 
 # remove old logs:
 for OLDDIR in $(find ${PREFIX} -type d -name "${LOGDIR_PREFIX}_*") ; do
diff --git a/source3/selftest/knownfail b/source3/selftest/knownfail
index c515223..574910c 100644
--- a/source3/selftest/knownfail
+++ b/source3/selftest/knownfail
@@ -6,5 +6,4 @@ samba3.posix_s3.rpc.spoolss.*printserver.enum_printers_old # fails on some hosts
 samba3.posix_s3.rpc.spoolss.printer.*addprinterex.print_test # another intermittent failure
 samba3.posix_s3.smb2.lock.*.rw-exclusive # another intermittent failure
 .*driver.add_driver_timestamps # we only can store dates, not timestamps
-samba3.blackbox.net.local.registry.roundtrip # this test needs fixing
 samba3.raw.mux.* #This test is flaky on the async lock time


-- 
Samba Shared Repository


More information about the samba-cvs mailing list