The branch, master has been updated
       via  4882a4c docs:man:vfs_gpfs: fix formatting of values for gpfs:syncio
       via  475f0d1 docs:man:vfs_gpfs: Fix documented values for gpfs:hsm
       via  2619eae s3:vfs_tsmsm: Fix a misspelling of a config parameter in 
the doc-comment
       via  0e3be00 s3-selftest: Remove some unnecessary comma
       via  56f2f76 s3-selftest: Add samba3.blackbox.net.registry.check to test 
list
       via  d5db47c s3-selftest: introduce new net registry check check
      from  86a80cf Fix bug 8823 - source3/smbd/process.c:smb_dump seems to 
have a memory leak.

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


- Log -----------------------------------------------------------------
commit 4882a4cd68f90ee2c0808bffe114cd147e665c5c
Author: Michael Adam <ob...@samba.org>
Date:   Thu Mar 22 00:03:08 2012 +0100

    docs:man:vfs_gpfs: fix formatting of values for gpfs:syncio
    
    Autobuild-User: Michael Adam <ob...@samba.org>
    Autobuild-Date: Thu Mar 22 01:56:08 CET 2012 on sn-devel-104

commit 475f0d15122851cbd26a62726455728a9dd7e9e9
Author: Michael Adam <ob...@samba.org>
Date:   Thu Mar 22 00:01:24 2012 +0100

    docs:man:vfs_gpfs: Fix documented values for gpfs:hsm

commit 2619eae6260c9af9a43337c7ca8fb8ababf3e11a
Author: Michael Adam <ob...@samba.org>
Date:   Wed Mar 21 23:40:44 2012 +0100

    s3:vfs_tsmsm: Fix a misspelling of a config parameter in the doc-comment
    
    The module uses "tsmsm:dmapi attribute" instead of "tsmsm:attribute name".

commit 0e3be00af10f12a9664a955279ee5565e58f521c
Author: Björn Baumbach <b...@sernet.de>
Date:   Wed Nov 9 13:19:59 2011 +0100

    s3-selftest: Remove some unnecessary comma
    
    Signed-off-by: Michael Adam <ob...@samba.org>

commit 56f2f76166def8e06f7ceade98ccb00b72999443
Author: Björn Baumbach <b...@sernet.de>
Date:   Wed Nov 9 13:19:22 2011 +0100

    s3-selftest: Add samba3.blackbox.net.registry.check to test list
    
    Signed-off-by: Michael Adam <ob...@samba.org>

commit d5db47c7d412c1795a7485f10c2517e36f80c7fc
Author: Björn Baumbach <b...@sernet.de>
Date:   Wed Nov 9 13:24:42 2011 +0100

    s3-selftest: introduce new net registry check check
    
    Add a new check which checks for defects in the net registry
    check tool.
    
    Signed-off-by: Michael Adam <ob...@samba.org>

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

Summary of changes:
 docs-xml/manpages-3/vfs_gpfs.8.xml              |    6 +-
 source3/modules/vfs_tsmsm.c                     |    2 +-
 source3/script/tests/test_net_registry_check.sh |  146 +++++++++++++++++++++++
 source3/selftest/tests.py                       |    6 +-
 4 files changed, 154 insertions(+), 6 deletions(-)
 create mode 100755 source3/script/tests/test_net_registry_check.sh


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/vfs_gpfs.8.xml 
b/docs-xml/manpages-3/vfs_gpfs.8.xml
index a6b3124..2107b74 100644
--- a/docs-xml/manpages-3/vfs_gpfs.8.xml
+++ b/docs-xml/manpages-3/vfs_gpfs.8.xml
@@ -118,7 +118,7 @@
                <command>no(default)</command> - Do not announce HSM.
                </para></listitem>
                <listitem><para>
-               <command>no</command> - Announce HSM.
+               <command>yes</command> - Announce HSM.
                </para></listitem>
                </itemizedlist>
                </listitem>
@@ -287,9 +287,9 @@
                  values:
                </para>
                <itemizedlist>
-               <listitem><para><command>yes</command>Open files with O_SYNC
+               <listitem><para><command>yes</command> - Open files with O_SYNC
                </para></listitem>
-               <listitem><para><command>no (default)</command>Open files as
+               <listitem><para><command>no (default)</command> - Open files as
                    normal Samba would do
                </para></listitem>
                </itemizedlist>
diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c
index 468fe67..d7cc050 100644
--- a/source3/modules/vfs_tsmsm.c
+++ b/source3/modules/vfs_tsmsm.c
@@ -27,7 +27,7 @@
         where <operation> is currently 'offline' to set offline status of the 
<filepath>
 
   tsmsm: online ratio = ratio to check reported size against actual file size 
(0.5 by default)
-  tsmsm: attribute name = name of DMAPI attribute that is present when a file 
is offline. 
+  tsmsm: dmapi attribute = name of DMAPI attribute that is present when a file 
is offline.
   Default is "IBMobj" (which is what GPFS uses)
 
   The TSMSM VFS module tries to avoid calling expensive DMAPI calls with some 
heuristics
diff --git a/source3/script/tests/test_net_registry_check.sh 
b/source3/script/tests/test_net_registry_check.sh
new file mode 100755
index 0000000..627f67c
--- /dev/null
+++ b/source3/script/tests/test_net_registry_check.sh
@@ -0,0 +1,146 @@
+#!/bin/sh
+#
+# Blackbox tests for the "net registry check" command.
+#
+# Copyright (C) 2011 Björn Baumbach <b...@sernet.de>
+
+if [ $# -lt 5 ]; then
+       echo "Usage: test_net_registry.sh SCRIPTDIR SERVERCONFFILE NET 
CONFIGURATION DBWRAP_TOOL"
+       exit 1
+fi
+
+SCRIPTDIR="$1"
+SERVERCONFFILE="$2"
+NET="$3"
+CONFIGURATION="$4"
+DBWRAP_TOOL="$5"
+
+NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
+
+NETREG="${NET} registry"
+REGORIG="$(grep 'state directory = ' $SERVERCONFFILE | sed 
's/[^=]*=//')/registry.tdb"
+REG=$REGORIG.wip
+
+incdir=`dirname $0`/../../../testprogs/blackbox
+. $incdir/subunit.sh
+
+failed=0
+
+# run registry check and filter allowed errors
+regcheck()
+{
+       ALLOWEDERR="Check database:|INFO: version ="
+       ERRSTR=$(${NETREG} check $REG $@ 2>&1 | grep -E -v "$ALLOWEDERR")
+}
+
+# try to repair registry
+regrepair()
+{
+       regcheck -a
+}
+
+# check if $ERRSTR contains expected error
+checkerr()
+{
+       EXPERR=$1
+
+       ERRCNT=$(echo "$ERRSTR" | grep "$EXPERR" | wc -l)
+       return $ERRCNT
+}
+
+regchecknrepair()
+{
+       EXPERR="$1"
+       EXPERRCNT="$2"
+
+       regcheck
+       checkerr "$EXPERR"
+       test "x$?" = "x$ERRCNT" || {
+               echo "Expected $EXPERRCNT of error $EXPERR. Received $ERRCNT"
+               return 1
+       }
+
+       regrepair
+       regcheck
+       test "x$ERRSTR" = "x" || {
+               echo "Error: Can't repair database"
+               return 1
+       }
+}
+
+test_simple()
+{
+       local ERRSTR=""
+       cp $REGORIG $REG
+
+       regcheck
+       test "x$ERRSTR" = "x" || {
+               echo $ERRSTR
+               return 1
+       }
+}
+
+test_damage()
+{
+       diff $REGORIG $REG
+}
+
+test_duplicate()
+{
+       local ERRSTR=""
+       $DBWRAP_TOOL $REG store 'HKLM/SOFTWARE' hex 
'02000000534F4654574152450053595354454D00'
+
+       regchecknrepair "Duplicate subkeylist" 1
+}
+
+test_slashes()
+{
+       local ERRSTR=""
+       $DBWRAP_TOOL $REG store 'HKLM/SOFTWARE' hex 
'02000000534F4654574152450053595354454D00'
+
+       regchecknrepair "Unnormal key:" 1
+}
+
+test_uppercase()
+{
+       local ERRSTR=""
+       $DBWRAP_TOOL $REG store 'HKLM\Software' hex 
'02000000534F4654574152450053595354454D00'
+
+       regchecknrepair "Unnormal key:" 1
+}
+
+test_strangeletters()
+{
+       local ERRSTR=""
+       $DBWRAP_TOOL $REG store 'HKLM\SOFTWARE' hex 
'02000000534F4654574FABFABFABFAB354454D00'
+
+       regchecknrepair "Conversion error: Incomplete multibyte sequence" 1
+}
+
+testit "simple" \
+       test_simple || \
+       failed=`expr $failed + 1`
+
+testit "damages_registry" \
+       test_damage || \
+       failed=`expr $failed + 1`
+
+testit "duplicate" \
+       test_duplicate || \
+       failed=`expr $failed + 1`
+
+testit "slashes" \
+       test_slashes || \
+       failed=`expr $failed + 1`
+
+testit "uppercase" \
+       test_uppercase || \
+       failed=`expr $failed + 1`
+
+#Can't repair this atm
+#testit "strangeletters" \
+#      test_strangeletters || \
+#      failed=`expr $failed + 1`
+
+testok $0 $failed
+
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index cbef215..fb1eaae 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -190,16 +190,18 @@ plantestsuite("samba3.blackbox.net.misc", "s3dc:local", 
[os.path.join(samba3srcd
                                                        scriptdir, 
"$SMB_CONF_PATH", binpath('net'), configuration])
 plantestsuite("samba3.blackbox.net.local.registry", "s3dc:local", 
[os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
                                                        scriptdir, 
"$SMB_CONF_PATH", binpath('net'), configuration])
+plantestsuite("samba3.blackbox.net.registry.check", "s3dc:local", 
[os.path.join(samba3srcdir, "script/tests/test_net_registry_check.sh"),
+                                                       scriptdir, 
"$SMB_CONF_PATH", binpath('net'), configuration,binpath('dbwrap_tool')])
 plantestsuite("samba3.blackbox.net.rpc.registry", "s3dc", 
[os.path.join(samba3srcdir, "script/tests/test_net_registry.sh"),
                                                        scriptdir, 
"$SMB_CONF_PATH", binpath('net'), configuration, 'rpc'])
 
 plantestsuite("samba3.blackbox.net.local.registry.roundtrip", "s3dc:local", 
[os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
-                                                       scriptdir, 
"$SMB_CONF_PATH", binpath('net'), configuration,])
+                                                       scriptdir, 
"$SMB_CONF_PATH", binpath('net'), configuration])
 plantestsuite("samba3.blackbox.net.rpc.registry.roundtrip", "s3dc", 
[os.path.join(samba3srcdir, "script/tests/test_net_registry_roundtrip.sh"),
                                                        scriptdir, 
"$SMB_CONF_PATH", binpath('net'), configuration, 'rpc'])
 
 plantestsuite("samba3.blackbox.net.local.conf", "s3dc:local", 
[os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
-                                                       scriptdir, 
"$SMB_CONF_PATH", binpath('net'), configuration,])
+                                                       scriptdir, 
"$SMB_CONF_PATH", binpath('net'), configuration])
 plantestsuite("samba3.blackbox.net.rpc.conf", "s3dc", 
[os.path.join(samba3srcdir, "script/tests/test_net_conf.sh"),
                                                        scriptdir, 
"$SMB_CONF_PATH", binpath('net'), configuration, 'rpc'])
 


-- 
Samba Shared Repository

Reply via email to