From acad0adc2977ca26df44e5b22d8b8e991177af71 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 13 Mar 2017 17:30:37 +0100 Subject: [PATCH] testprogs: Correctly expand shell parameters The old behaviour is: for var in $* do echo "$var" done And you get this: $ sh test.sh 1 2 '3 4' 1 2 3 4 Changing it to: for var in "$@" do echo "$var" done will correctly expand to: $ sh test.sh 1 2 '3 4' 1 2 3 4 Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Mar 15 05:26:17 CET 2017 on sn-devel-144 --- testprogs/blackbox/subunit.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testprogs/blackbox/subunit.sh b/testprogs/blackbox/subunit.sh index 0791d775d27..5c81ce20a11 100755 --- a/testprogs/blackbox/subunit.sh +++ b/testprogs/blackbox/subunit.sh @@ -78,7 +78,7 @@ subunit_skip_test () { testit () { name="$1" shift - cmdline="$*" + cmdline="$@" subunit_start_test "$name" output=`$cmdline 2>&1` status=$? @@ -93,7 +93,7 @@ testit () { testit_expect_failure () { name="$1" shift - cmdline="$*" + cmdline="$@" subunit_start_test "$name" output=`$cmdline 2>&1` status=$? -- 2.47.3