[SCM] Samba Shared Repository - branch master updated

Amitay Isaacs amitay at samba.org
Wed Jul 18 12:54:05 UTC 2018


The branch, master has been updated
       via  359e521 ctdb-tests: Loosen match against pstree output in simple test
       via  da115ef ctdb-tests: Simplify pstree output in eventd unit tests
      from  7b0c1f8 dsdb: Fix the 32-bit build

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


- Log -----------------------------------------------------------------
commit 359e52187fbc9b5f94570ff8d12607b4fc42e4f2
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jul 18 15:24:05 2018 +1000

    ctdb-tests: Loosen match against pstree output in simple test
    
    As per previous commit, pstree can truncate output if it gets too
    wide.  Instead of matching against the script's full path and
    arguments, just match against the script name.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13531
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Wed Jul 18 14:53:39 CEST 2018 on sn-devel-144

commit da115efd2b89e10767e9bec7343dce65ffd3c68b
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jul 18 12:01:27 2018 +1000

    ctdb-tests: Simplify pstree output in eventd unit tests
    
    pstree truncates output when it exceeds a maximum width - the default
    is 132 columns.  A couple of recent
    commits (12fd8d7a5c5d14d403aac6cd9e318afcd0a8e159,
    b23f3f996038626f618c5b5aa552686c1b852f44) lengthened the command
    string in the output so that it is more likely to exceed this limit
    and be truncated, as below:
    
    ==================================================
    Running "cat /memdisk/autobuild/fl/b1851760/ctdb/ctdb/tests/var/eventd/debug_script.log"
    --------------------------------------------------
    Output (Exit status: 0):
    --------------------------------------------------
    02.enabled.scri,PID /memdisk/autobuild/fl/b1851760/ctdb/ctdb/tests/var/eventd/events/random/02.enabled.script ...
      `-sleep,PID 99
    01.disabled          DISABLED
    02.enabled           TIMEDOUT   DATETIME
      OUTPUT: Sleeping for 99 seconds
    --------------------------------------------------
    Required output (Exit status: 0):
    --------------------------------------------------
    02.enabled.scri,PID /memdisk/autobuild/fl/b1851760/ctdb/ctdb/tests/var/eventd/events/random/02.enabled.script verbosetimeout
      `-sleep,PID 99
    01.disabled          DISABLED
    02.enabled           TIMEDOUT   DATETIME
      OUTPUT: Sleeping for 99 seconds
    
    FAILED
    
    It isn't clear that the above example exceeds 132 characters, given
    that the PID has been filtered into a fixed string, but it certainly
    goes close.  Whether or not it is truncated probably depends on the
    width of the PID in the unfiltered output.  This would explain why the
    test flaps.
    
    Avoid the output truncation by dropping the -a and -p options to
    simplify the pstree output.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13531
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

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

Summary of changes:
 ctdb/tests/eventd/etc-ctdb/debug-script.sh | 2 +-
 ctdb/tests/eventd/eventd_022.sh            | 3 +--
 ctdb/tests/eventd/eventd_024.sh            | 2 +-
 ctdb/tests/simple/90_debug_hung_script.sh  | 2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/tests/eventd/etc-ctdb/debug-script.sh b/ctdb/tests/eventd/etc-ctdb/debug-script.sh
index 04618cf..47c75a7 100755
--- a/ctdb/tests/eventd/etc-ctdb/debug-script.sh
+++ b/ctdb/tests/eventd/etc-ctdb/debug-script.sh
@@ -8,7 +8,7 @@ case "$2" in
 	;;
 
 "verbosetimeout")
-	(pstree -p -a $1 ; ctdb-event status random $2) > "$log"
+	(pstree $1 ; ctdb-event status random $2) > "$log"
 	;;
 
 "verbosetimeout2")
diff --git a/ctdb/tests/eventd/eventd_022.sh b/ctdb/tests/eventd/eventd_022.sh
index b71f7c3..dc9455a 100755
--- a/ctdb/tests/eventd/eventd_022.sh
+++ b/ctdb/tests/eventd/eventd_022.sh
@@ -15,8 +15,7 @@ simple_test run 5 random verbosetimeout
 sleep 5
 
 ok <<EOF
-02.enabled.scri,PID $eventd_scriptdir/random/02.enabled.script verbosetimeout
-  \`-sleep,PID 99
+02.enabled.scri---sleep
 01.disabled          DISABLED  
 02.enabled           TIMEDOUT   DATETIME
   OUTPUT: Sleeping for 99 seconds
diff --git a/ctdb/tests/eventd/eventd_024.sh b/ctdb/tests/eventd/eventd_024.sh
index a76681e..10016a1 100755
--- a/ctdb/tests/eventd/eventd_024.sh
+++ b/ctdb/tests/eventd/eventd_024.sh
@@ -28,4 +28,4 @@ unit_test cat "${CTDB_BASE}/debug_script.log"
 pid=$(cat "${CTDB_BASE}/debug_script.log" | awk '{print $2}')
 
 ok_null
-unit_test pstree -p -a "$pid"
+unit_test pstree "$pid"
diff --git a/ctdb/tests/simple/90_debug_hung_script.sh b/ctdb/tests/simple/90_debug_hung_script.sh
index b605dc0..846188f 100755
--- a/ctdb/tests/simple/90_debug_hung_script.sh
+++ b/ctdb/tests/simple/90_debug_hung_script.sh
@@ -73,7 +73,7 @@ done <<EOF
 ===== Start of hung script debug for PID=".*", event="monitor" =====
 ===== End of hung script debug for PID=".*", event="monitor" =====
 pstree -p -a .*:
-00\\\\.test\\\\.script,.* ${ctdb_base}/events/legacy/00\\\\.test\\\\.script monitor
+00\\\\.test\\\\.script,.*
  *\`-sleep,.*
 ---- Stack trace of interesting process [0-9]*\\\\[sleep\\\\] ----
 [<[0-9a-f]*>] .*sleep+.*


-- 
Samba Shared Repository



More information about the samba-cvs mailing list