[SCM] Samba Shared Repository - branch master updated

Martin Schwenke martins at samba.org
Thu Nov 28 01:24:03 MST 2013


The branch, master has been updated
       via  e2db9c5 ctdb:tests: in the stub "ip link show" command use echo instead of cat
       via  e9f4b69 autobuild: Run ctdb regression tests
       via  85a25ab autobuild: build the "ctdb" target with socket-wrapper enabled
       via  fd5e890 ctdb:test: remove unused ip2ipmask from integration.bash
       via  e281cfa ctdb:tests:76_ctdb_pdb_recovery: change from using ctdb pstore to ctdb ptrans.
       via  30dead1 ctdb:tests:76_ctdb_pdb_recovery: fix a typo in a message
       via  3e083f9 ctdb:tests:76_ctdb_pdb_recovery: fix a typo in a message
       via  70f469e ctdb:tests: in the stub ip command, avoid broken pipe by using echo instead of cat
       via  90f79bf ctdb:tests: ignore SIGPIPE in unit tests
       via  e01a715 ctdb:tests: add path of ip command to extra output in the error case
       via  956b4b7 ctdb:tests: remove old now unused script test/recover.sh
       via  609fee6 ctdb:build: Update mkversion.sh to use samba-* tags
      from  92489bf Cope with first element in hdb_method having a different name in different heimdal versions.

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


- Log -----------------------------------------------------------------
commit e2db9c524f40f8771ae19b2be47a56f7a9d887af
Author: Michael Adam <obnox at samba.org>
Date:   Wed Nov 27 23:43:53 2013 +0100

    ctdb:tests: in the stub "ip link show" command use echo instead of cat
    
    This case of "ip link show" does not break autobuild with
    "Broken pipe" messages, but let's be consistent.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Martin Schwenke <martins at samba.org>
    Autobuild-Date(master): Thu Nov 28 09:23:03 CET 2013 on sn-devel-104

commit e9f4b69bae08af6a4a228fc5f9ae1df9628819b1
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Thu Nov 14 17:38:29 2013 +1100

    autobuild: Run ctdb regression tests
    
    Pair-Programmed-with: Michael Adam <obnox at samba.org>
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit 85a25abed0b05d829ed5e628c6f61790a975167b
Author: Michael Adam <obnox at samba.org>
Date:   Thu Nov 14 14:13:01 2013 +0100

    autobuild: build the "ctdb" target with socket-wrapper enabled
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit fd5e8905a09875d13ef109133edd361a82cf8e1e
Author: Michael Adam <obnox at samba.org>
Date:   Wed Nov 27 22:28:06 2013 +0100

    ctdb:test: remove unused ip2ipmask from integration.bash
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit e281cfa8db4a2506f9016718373cdc80f4aa9c1f
Author: Michael Adam <obnox at samba.org>
Date:   Wed Nov 27 11:42:28 2013 +0100

    ctdb:tests:76_ctdb_pdb_recovery: change from using ctdb pstore to ctdb ptrans.
    
    This removes the requirement to create a temporary file
    and hence makes this test runnable against local daemons
    and against a real cluster without further changes.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 30dead171f82b5da31cbcbab88eaa70a896d9c55
Author: Michael Adam <obnox at samba.org>
Date:   Wed Nov 27 23:28:24 2013 +0100

    ctdb:tests:76_ctdb_pdb_recovery: fix a typo in a message
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 3e083f96ff02cbf419513e16a200e8d4d0c2c227
Author: Michael Adam <obnox at samba.org>
Date:   Wed Nov 27 11:40:53 2013 +0100

    ctdb:tests:76_ctdb_pdb_recovery: fix a typo in a message
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 70f469e05e279e29980df2af10dd89c53001b236
Author: Michael Adam <obnox at samba.org>
Date:   Wed Nov 27 12:13:40 2013 +0100

    ctdb:tests: in the stub ip command, avoid broken pipe by using echo instead of cat
    
    This fixes running "make autotest" from autobuild, since
    it prevents irritating error output in delete_ip_from_iface()
    when calling ip addr list ... | grep -Fq "inet ..." .
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 90f79bf0737e8ad900d7cbf68edad977df55b4b6
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 22 00:35:35 2013 +0100

    ctdb:tests: ignore SIGPIPE in unit tests
    
    This makes scripts called in the unit tests behave like
    when called from ctdbd which ignodes SIGPIPE.
    This also makes the scrips behave the same when
    called from "make autotest" directly and via autobuild (python).
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit e01a7157f3aae4e1f2e0f17e748e312fc5a3695a
Author: Michael Adam <obnox at samba.org>
Date:   Thu Nov 21 09:29:33 2013 +0100

    ctdb:tests: add path of ip command to extra output in the error case
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 956b4b7c4e30fdd941b659c8885e2c8e987c27c6
Author: Michael Adam <obnox at samba.org>
Date:   Thu Nov 21 08:39:25 2013 +0100

    ctdb:tests: remove old now unused script test/recover.sh
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit 609fee613531c834d254d1128fec483c91660fab
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Nov 28 12:23:57 2013 +1100

    ctdb:build: Update mkversion.sh to use samba-* tags
    
    To test CTDB on a cluster we need to be able to build test RPMs with
    relatively sane version numbers.  This is a minimal change to allow
    that to happen, until CTDB is integrated into the Samba build system.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

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

Summary of changes:
 ctdb/packaging/mkversion.sh               |    6 +-
 ctdb/tests/eventscripts/scripts/local.sh  |    1 +
 ctdb/tests/eventscripts/stubs/ip          |   18 ++----
 ctdb/tests/recover.sh                     |  107 -----------------------------
 ctdb/tests/scripts/integration.bash       |    7 --
 ctdb/tests/scripts/unit.sh                |    2 +
 ctdb/tests/simple/76_ctdb_pdb_recovery.sh |   10 +--
 script/autobuild.py                       |    3 +-
 8 files changed, 17 insertions(+), 137 deletions(-)
 delete mode 100755 ctdb/tests/recover.sh


Changeset truncated at 500 lines:

diff --git a/ctdb/packaging/mkversion.sh b/ctdb/packaging/mkversion.sh
index 7a550a5..bc50165 100755
--- a/ctdb/packaging/mkversion.sh
+++ b/ctdb/packaging/mkversion.sh
@@ -34,10 +34,10 @@ fi
 #
 # If we're not directly on a tag, this is a devel release; we append
 # .0.<patchnum>.<checksum>.devel to the release.
-TAG=`git describe`
+TAG=`git describe --match "samba-*"`
 case "$TAG" in
-    ctdb-*)
-	TAG=${TAG##ctdb-}
+    samba-*)
+	TAG=${TAG##samba-}
 	case "$TAG" in
 	    *-*-g*) # 0.9-168-ge6cf0e8
 		# Not exactly on tag: devel version.
diff --git a/ctdb/tests/eventscripts/scripts/local.sh b/ctdb/tests/eventscripts/scripts/local.sh
index 2b4bc92..e8bf3c4 100644
--- a/ctdb/tests/eventscripts/scripts/local.sh
+++ b/ctdb/tests/eventscripts/scripts/local.sh
@@ -889,6 +889,7 @@ _extra_header ()
 CTDB_BASE="$CTDB_BASE"
 CTDB_ETCDIR="$CTDB_ETCDIR"
 ctdb client is "$(which ctdb)"
+ip command is "$(which ip)"
 EOF
 }
 
diff --git a/ctdb/tests/eventscripts/stubs/ip b/ctdb/tests/eventscripts/stubs/ip
index 053da75..d852cf8 100755
--- a/ctdb/tests/eventscripts/stubs/ip
+++ b/ctdb/tests/eventscripts/stubs/ip
@@ -64,10 +64,8 @@ ip_link_show ()
 	_state="DOWN"
 	_flags=""
     fi
-    cat <<EOF
-${n}: ${dev}: <BROADCAST,MULTICAST${_flags}> mtu 1500 qdisc pfifo_fast state ${_state} qlen 1000
-    link/ether ${mac} brd ff:ff:ff:ff:ff:ff
-EOF
+    echo "${n}: ${dev}: <BROADCAST,MULTICAST${_flags}> mtu 1500 qdisc pfifo_fast state ${_state} qlen 1000"
+    echo "    link/ether ${mac} brd ff:ff:ff:ff:ff:ff"
 }
 
 # This is incomplete because it doesn't actually look up table ids in
@@ -166,25 +164,19 @@ ip_addr_show ()
 	    read local <"$pf"
 	    if [ -z "$_to" -o "${_to%/*}" = "${local%/*}" ] ; then
 		calc_brd
-		cat <<EOF
-    inet ${local} brd ${brd} scope global ${dev}
-EOF
+		echo "    inet ${local} brd ${brd} scope global ${dev}"
 	    fi
 	fi
 	if $secondary && [ -r "$sf" ] ; then
 	    while read local ; do
 		if [ -z "$_to" -o "${_to%/*}" = "${local%/*}" ] ; then
 		    calc_brd
-		    cat <<EOF
-    inet ${local} brd ${brd} scope global secondary ${dev}
-EOF
+		    echo "    inet ${local} brd ${brd} scope global secondary ${dev}"
 		fi
 	    done <"$sf"
 	fi
 	if [ -z "$_to" ] ; then
-	    cat <<EOF
-       valid_lft forever preferred_lft forever
-EOF
+	    echo "       valid_lft forever preferred_lft forever"
 	fi
     }
     n=1
diff --git a/ctdb/tests/recover.sh b/ctdb/tests/recover.sh
deleted file mode 100755
index c626441..0000000
--- a/ctdb/tests/recover.sh
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/bin/sh
-
-killall -q ctdbd
-
-echo "Starting 4 ctdb daemons"
-bin/ctdbd --recovery-daemon --nlist tests/4nodes.txt
-bin/ctdbd --recovery-daemon --nlist tests/4nodes.txt --listen=127.0.0.2 --socket=/tmp/ctdb.socket.127.0.0.2
-bin/ctdbd --recovery-daemon --nlist tests/4nodes.txt --listen=127.0.0.3 --socket=/tmp/ctdb.socket.127.0.0.3
-bin/ctdbd --recovery-daemon --nlist tests/4nodes.txt --listen=127.0.0.4 --socket=/tmp/ctdb.socket.127.0.0.4
-
-echo
-echo "Attaching to some databases"
-bin/ctdb_control attach test1.tdb || exit 1
-bin/ctdb_control attach test2.tdb || exit 1
-bin/ctdb_control attach test3.tdb || exit 1
-bin/ctdb_control attach test4.tdb || exit 1
-
-echo "Clearing all databases to make sure they are all empty"
-bin/ctdb_control getdbmap 0 | egrep "^dbid:" | sed -e "s/^dbid://" -e "s/ .*$//" | while read DB; do
-	seq 0 3 | while read NODE; do
-		bin/ctdb_control cleardb $NODE $DB
-	done
-done
-
-
-echo
-echo
-echo "Printing all databases on all nodes. they should all be empty"
-echo "============================================================="
-bin/ctdb_control getdbmap 0 | egrep "^dbid:" | sed -e "s/^.*name://" -e "s/ .*$//" | while read DBNAME; do
-	seq 0 3 | while read NODE; do
-		echo "Content of DBNAME:$DBNAME NODE:$NODE :"
-		bin/ctdb_control catdb $DBNAME $NODE
-	done
-done
-
-echo
-echo
-echo "Populating the databases"
-./bin/ctdb_control writerecord 0 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control setdmaster 0 0x220c2a7b 1
-
-./bin/ctdb_control writerecord 1 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control writerecord 1 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control setdmaster 1 0x220c2a7b 2
-
-./bin/ctdb_control writerecord 2 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control writerecord 2 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control writerecord 2 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control setdmaster 2 0x220c2a7b 3
-
-./bin/ctdb_control writerecord 3 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control writerecord 3 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control writerecord 3 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control writerecord 3 0x220c2a7b testkey1 testdata1
-./bin/ctdb_control setdmaster 3 0x220c2a7b 3
-
-
-echo
-echo
-echo "Printing all databases on all nodes. there should be a record there"
-echo "============================================================="
-bin/ctdb_control getdbmap 0 | egrep "^dbid:" | sed -e "s/^.*name://" -e "s/ .*$//" | while read DBNAME; do
-	seq 0 3 | while read NODE; do
-		echo "Content of DBNAME:$DBNAME NODE:$NODE :"
-		bin/ctdb_control catdb $DBNAME $NODE
-	done
-done
-
-echo
-echo
-echo "killing off node #2"
-echo "==================="
-CTDBPID=`./bin/ctdb_control getpid 2 | sed -e "s/Pid://"`
-kill $CTDBPID
-sleep 1
-
-
-echo
-echo
-echo "wait 3 seconds to let the recovery daemon do its job"
-echo "===================================================="
-sleep 3
-
-echo
-echo
-echo "Printing all databases on all nodes."
-echo "The databases should be the same now on all nodes"
-echo "and the record will have been migrated to node 0"
-echo "================================================="
-echo "Node 0:"
-bin/ctdb_control catdb test4.tdb 0
-echo "Node 1:"
-bin/ctdb_control catdb test4.tdb 1
-echo "Node 3:"
-bin/ctdb_control catdb test4.tdb 3
-echo "nodemap:"
-bin/ctdb_control getnodemap 0
-
-echo
-echo
-echo "Traverse the cluster and dump the database"
-bin/ctdb_control catdb test4.tdb
-
-
-#leave the ctdb daemons running   so one can look at the box in more detail
-#killall -q ctdbd
diff --git a/ctdb/tests/scripts/integration.bash b/ctdb/tests/scripts/integration.bash
index 88161c1..c98d511 100644
--- a/ctdb/tests/scripts/integration.bash
+++ b/ctdb/tests/scripts/integration.bash
@@ -497,13 +497,6 @@ wait_until_node_has_some_ips ()
     wait_until 60 node_has_some_ips "$@"
 }
 
-ip2ipmask ()
-{
-    _ip="$1"
-
-    ip addr show to "$_ip" | awk '$1 == "inet" { print $2 }'
-}
-
 #######################################
 
 daemons_stop ()
diff --git a/ctdb/tests/scripts/unit.sh b/ctdb/tests/scripts/unit.sh
index f423db1..afa0c1f 100644
--- a/ctdb/tests/scripts/unit.sh
+++ b/ctdb/tests/scripts/unit.sh
@@ -4,6 +4,8 @@
 
 # Common variables and functions for CTDB unit tests.
 
+trap -- '' PIPE
+
 # Set the required result for a test.
 # - Argument 1 is exit code.
 # - Argument 2, if present is the required test output but "--"
diff --git a/ctdb/tests/simple/76_ctdb_pdb_recovery.sh b/ctdb/tests/simple/76_ctdb_pdb_recovery.sh
index 9890e87..1c897c2 100755
--- a/ctdb/tests/simple/76_ctdb_pdb_recovery.sh
+++ b/ctdb/tests/simple/76_ctdb_pdb_recovery.sh
@@ -47,8 +47,7 @@ try_command_on_node 0 $CTDB wipedb $TESTDB
 # and update values
 for value in value1 value2 value3 value4 value5 ; do
 	echo "store key(test1) data($value)"
-	try_command_on_node 0 "(echo -ne $value > /tmp/test_data)"
-	try_command_on_node 0 $CTDB pstore $TESTDB test1 /tmp/test_data
+	echo "\"test1\" \"$value\"" | try_command_on_node -i 0 $CTDB ptrans "$TESTDB"
 done
 
 # Delete record
@@ -63,8 +62,7 @@ wait_until_node_has_status 1 stopped
 
 # Add a record   key=test1 data=value2
 echo "store key(test1) data(newvalue1)"
-try_command_on_node 0 "(echo -ne newvalue1 > /tmp/test_data)"
-try_command_on_node 0 $CTDB pstore $TESTDB test1 /tmp/test_data
+echo '"test1" "newvalue1"' | try_command_on_node -i 0 $CTDB ptrans "$TESTDB"
 
 # Continue node
 echo "contine node 1"
@@ -92,7 +90,7 @@ do_test
 if try_command_on_node 0 $CTDB pfetch $TESTDB test1 ; then
 	echo "GOOD: Record was not deleted (recovery by RSN worked)"
 else
-	echo "BAD: Record was not deleted"
+	echo "BAD: Record was deleted"
 	status=1
 fi
 
@@ -102,7 +100,7 @@ try_command_on_node all $CTDB setvar RecoverPDBBySeqNum 1
 
 do_test
 if try_command_on_node 0 $CTDB pfetch $TESTDB test1 ; then
-	echo "GOOD: Record was not deleted (recovery by sequnce number worked)"
+	echo "GOOD: Record was not deleted (recovery by sequence number worked)"
 else
 	echo "BAD: Record was deleted"
 	status=1
diff --git a/script/autobuild.py b/script/autobuild.py
index 48fbc3b..41ba8a4 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -37,9 +37,10 @@ defaulttasks = [ "ctdb", "samba", "samba-ctdb", "samba-libs", "ldb", "tdb", "ntd
 tasks = {
     "ctdb" : [ ("random-sleep", "../script/random-sleep.sh 60 600", "text/plain"),
                ("autogen", "./autogen.sh", "text/plain"),
-               ("configure", "./configure ${PREFIX}", "text/plain"),
+               ("configure", "./configure ${PREFIX} --enable-socket-wrapper ", "text/plain"),
                ("make", "make all", "text/plain"),
                ("install", "make install", "text/plain"),
+               ("test", "make autotest", "text/plain"),
                ("check-clean-tree", "../script/clean-source-tree.sh", "text/plain"),
                ("clean", "make clean", "text/plain") ],
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list