[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Fri May 5 21:45:02 UTC 2017


The branch, master has been updated
       via  0b1ba00 testprogs: Ignore escape characters when printing test name
      from  825d00d s4: torture: Remove the last talloc_autofree_context() from source4/torture/*.c

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


- Log -----------------------------------------------------------------
commit 0b1ba00b007802932d501dbb315616f6d5c4306f
Author: Christof Schmitt <cs at samba.org>
Date:   Fri May 5 01:10:56 2017 +0200

    testprogs: Ignore escape characters when printing test name
    
    Long story: This was triggered by the addition of the test_trust_ntlm.sh
    script in commits 3caca9b and 2de1994. test_trust_ntlm.sh creates a
    variable CREDS="$REALM\\$USERNAME%$PASSWORD" that is then used as part
    of the test name. subunit.sh uses echo to print the name that is then
    picked up by subunithelper.py. test_trust_ntlm.sh also uses /bin/sh as
    shell which can be a POSIX compliant shell like dash.
    
    This combination broke 'make test' for any username starting with the
    letter c. In this case CREDS contains the escape sequence \c that is
    defined to stop producing further output at this point. dash implements
    this feature and the echo in subunit.sh as a result skips the output
    after \c, including skipping the newline. This means that the data
    received by subunithelper.py contains the timestamp from the next line
    in the test name, which then breaks the testcase tracking.
    
    Fix this by replacing the echo in subunit.sh with a printf that does not
    trigger the special handling of escape characters.
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Fri May  5 23:44:16 CEST 2017 on sn-devel-144

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

Summary of changes:
 testprogs/blackbox/subunit.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/testprogs/blackbox/subunit.sh b/testprogs/blackbox/subunit.sh
index 5c81ce2..aca53f7 100755
--- a/testprogs/blackbox/subunit.sh
+++ b/testprogs/blackbox/subunit.sh
@@ -28,14 +28,14 @@ timestamp() {
 subunit_start_test () {
   # emit the current protocol start-marker for test $1
   timestamp
-  echo "test: $1"
+  printf 'test: %s\n' "$1"
 }
 
 
 subunit_pass_test () {
   # emit the current protocol test passed marker for test $1
   timestamp
-  echo "success: $1"
+  printf 'success: %s\n' "$1"
 }
 
 # This is just a hack as we have some broken scripts
@@ -48,7 +48,7 @@ subunit_fail_test () {
   # we use stdin because the failure message can be arbitrarily long, and this
   # makes it convenient to write in scripts (using <<END syntax.
   timestamp
-  echo "failure: $1 ["
+  printf 'failure: %s [\n' "$1"
   cat -
   echo "]"
 }
@@ -60,7 +60,7 @@ subunit_error_test () {
   # we use stdin because the failure message can be arbitrarily long, and this
   # makes it convenient to write in scripts (using <<END syntax.
   timestamp
-  echo "error: $1 ["
+  printf 'error: %s [\n' "$1"
   cat -
   echo "]"
 }
@@ -70,7 +70,7 @@ subunit_skip_test () {
   # the error text.
   # we use stdin because the failure message can be arbitrarily long, and this
   # makes it convenient to write in scripts (using <<END syntax.
-  echo "skip: $1 ["
+  printf 'skip: %s [\n' "$1"
   cat -
   echo "]"
 }


-- 
Samba Shared Repository



More information about the samba-cvs mailing list