Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/kyua-atf-compat/dist Cherry-pick upstream chang...
details: https://anonhg.NetBSD.org/src/rev/b4a0eac4ba04
branches: trunk
changeset: 785140:b4a0eac4ba04
user: jmmv <jmmv%NetBSD.org@localhost>
date: Tue Feb 26 15:23:19 2013 +0000
description:
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.
diffstat:
external/bsd/kyua-atf-compat/dist/atf-run.sh | 2 +-
external/bsd/kyua-atf-compat/dist/atf-run_test.sh | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 8fd11ef788e1 -r b4a0eac4ba04 external/bsd/kyua-atf-compat/dist/atf-run.sh
--- a/external/bsd/kyua-atf-compat/dist/atf-run.sh Tue Feb 26 11:06:23 2013 +0000
+++ b/external/bsd/kyua-atf-compat/dist/atf-run.sh Tue Feb 26 15:23:19 2013 +0000
@@ -63,7 +63,7 @@
*) 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}" | \
diff -r 8fd11ef788e1 -r b4a0eac4ba04 external/bsd/kyua-atf-compat/dist/atf-run_test.sh
--- a/external/bsd/kyua-atf-compat/dist/atf-run_test.sh Tue Feb 26 11:06:23 2013 +0000
+++ b/external/bsd/kyua-atf-compat/dist/atf-run_test.sh Tue Feb 26 15:23:19 2013 +0000
@@ -144,13 +144,13 @@
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
Home |
Main Index |
Thread Index |
Old Index