[SCM] CTDB repository - branch master updated - ctdb-1.0.113-78-g11e7235

Ronnie Sahlberg sahlberg at samba.org
Wed Feb 10 17:11:51 MST 2010


The branch, master has been updated
       via  11e72356e849ed4cb315c942e30e9bcadc624f42 (commit)
      from  144c69b633eeb17e120f962162feed6de3dc16a6 (commit)

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


- Log -----------------------------------------------------------------
commit 11e72356e849ed4cb315c942e30e9bcadc624f42
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Feb 10 20:27:53 2010 +1100

    Test suite: Make "ctdb ip" test backward compatible with older ctdb versions.
    
    Recent updates to the test meant that it only worked with the latest
    ctdb versions.  This changes things so that we never bother matching
    the machine readable header, just the actual data in the output.  It
    also takes a slightly more liberal approach in massaging the human
    readable output to ensure it matches the machine readable output.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

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

Summary of changes:
 tests/simple/11_ctdb_ip.sh |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/tests/simple/11_ctdb_ip.sh b/tests/simple/11_ctdb_ip.sh
index 59c5d52..e858845 100755
--- a/tests/simple/11_ctdb_ip.sh
+++ b/tests/simple/11_ctdb_ip.sh
@@ -32,21 +32,14 @@ set -e
 cluster_is_healthy
 
 echo "Getting list of public IPs..."
-try_command_on_node -v 1 $CTDB ip -n all
+try_command_on_node -v 1 "$CTDB ip -n all | tail -n +2"
 ips=$(echo "$out" | sed \
-	-e '1d' \
 	-e 's@ node\[@ @' \
-	-e 's@\].*$@:@')
-machineout1=":Public IP:Node:ActiveInterface:AvailableInterfaces:ConfiguredInterfaces:"
-machineout2=$(echo "$out" | sed \
-	-e '1d' \
-	-e 's@^@:@' \
-	-e 's@ node\[@:@' \
-	-e 's@\] active\[@:@' \
-	-e 's@\] available\[@:@' \
-	-e 's@\] configured\[@:@' \
-	-e 's@\]$@:@')
-machineout=`echo -e "$machineout1\n$machineout2"`
+	-e 's@\].*$@@')
+machineout=$(echo "$out" | sed -r \
+	-e 's@^| |$@:@g' \
+	-e 's@[[:alpha:]]+\[@@g' \
+	-e 's@\]@@g')
 
 while read ip pnn ; do
     try_command_on_node $pnn "ip addr show"
@@ -60,7 +53,7 @@ done <<<"$ips" # bashism to avoid problem setting variable in pipeline.
 
 [ "$testfailures" != 1 ] && echo "Looks good!"
 
-cmd="$CTDB -Y ip -n all"
+cmd="$CTDB -Y ip -n all | tail -n +2"
 echo "Checking that \"$cmd\" produces expected output..."
 
 try_command_on_node 1 "$cmd"


-- 
CTDB repository


More information about the samba-cvs mailing list