Module Name:    src
Committed By:   jmmv
Date:           Tue Feb 26 15:23:19 UTC 2013

Modified Files:
        src/external/bsd/kyua-atf-compat/dist: atf-run.sh atf-run_test.sh

Log Message:
Cherry-pick upstream change 70aefdbe5b843d6b24b5a9b816e47f2fb026dde2:

Properly handle tabs when parsing config files

Backslashes within [] in a regexp don't have any meaning, so [ \t]
did not have the intended effect of being evaluated to a space and
a tab.  Fix this by writing an actual tab in the regexp.

Problem found by Valeriy E. Ushakov.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/kyua-atf-compat/dist/atf-run.sh
cvs rdiff -u -r1.1.1.1 -r1.2 \
    src/external/bsd/kyua-atf-compat/dist/atf-run_test.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/kyua-atf-compat/dist/atf-run.sh
diff -u src/external/bsd/kyua-atf-compat/dist/atf-run.sh:1.2 src/external/bsd/kyua-atf-compat/dist/atf-run.sh:1.3
--- src/external/bsd/kyua-atf-compat/dist/atf-run.sh:1.2	Mon Feb 25 18:49:51 2013
+++ src/external/bsd/kyua-atf-compat/dist/atf-run.sh	Tue Feb 26 15:23:19 2013
@@ -63,7 +63,7 @@ load_configs() {
         *) prefix="test_suites.$(basename "${file}" | sed -e 's,.conf$,,')." ;;
         esac
 
-        local ws='[ \t]*'
+        local ws='[ 	]*'  # That's a space and a tab.
         local name='[a-zA-Z][-_a-zA-Z0-9]*'
         local repl="--variable='${prefix}\\1=\\2'"
         local vars="$(grep "^${ws}${name}${ws}=" "${file}" | \

Index: src/external/bsd/kyua-atf-compat/dist/atf-run_test.sh
diff -u src/external/bsd/kyua-atf-compat/dist/atf-run_test.sh:1.1.1.1 src/external/bsd/kyua-atf-compat/dist/atf-run_test.sh:1.2
--- src/external/bsd/kyua-atf-compat/dist/atf-run_test.sh:1.1.1.1	Mon Feb 25 00:17:26 2013
+++ src/external/bsd/kyua-atf-compat/dist/atf-run_test.sh	Tue Feb 26 15:23:19 2013
@@ -144,13 +144,13 @@ config__priorities_body()
     create_atffile Atffile 'prop: test-suite = "irrelevant"' 'tp: helper'
 
     echo "Checking system-wide configuration only"
-    create_config system/common.conf 'unprivileged-user = "nobody"'
+    create_config system/common.conf '   unprivileged-user  =    "nobody"'
     atf_check -s exit:0 -o 'match:helper:config  ->  passed' -e ignore atf-run
     atf_check -s exit:0 -o 'inline:unprivileged-user = nobody\n' \
         cat config.out
 
     echo "Checking user-specific overrides"
-    create_config user/.atf/common.conf 'unprivileged-user = "root"'
+    create_config user/.atf/common.conf '	unprivileged-user =   "root"'
     atf_check -s exit:0 -o 'match:helper:config  ->  passed' -e ignore atf-run
     atf_check -s exit:0 -o 'inline:unprivileged-user = root\n' \
         cat config.out

Reply via email to