]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
testprogs: Fix shellcheck errors in common_test_fns.inc
authorAndreas Schneider <asn@samba.org>
Wed, 8 Jun 2022 12:55:28 +0000 (14:55 +0200)
committerPavel Filipensky <pfilipensky@samba.org>
Mon, 22 Aug 2022 14:20:36 +0000 (14:20 +0000)
common_test_fns.inc:13:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]

common_test_fns.inc:32:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]

common_test_fns.inc:53:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]

common_test_fns.inc:80:64: error: Double quote array expansions to avoid
re-splitting elements. [SC2068]

common_test_fns.inc:106:61: error: Double quote array expansions to
avoid re-splitting elements. [SC2068]

common_test_fns.inc:110:32: error: Double quote array expansions to
avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
testprogs/blackbox/common_test_fns.inc

index a25313054c001c25efb655b51607debef7f4df60..68465e1e61a0f6481e1661c57c2ab3611590459a 100755 (executable)
@@ -10,7 +10,7 @@ test_smbclient()
        shift
        shift
        subunit_start_test "$name"
-       output=$($VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" $@ 2>&1)
+       output=$($VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" "$@" 2>&1)
        status=$?
        if [ x$status = x0 ]; then
                subunit_pass_test "$name"
@@ -29,7 +29,7 @@ test_smbclient_expect_failure()
        shift
        shift
        subunit_start_test "$name"
-       output=$($VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" $@ 2>&1)
+       output=$($VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" "$@" 2>&1)
        status=$?
        if [ x$status = x0 ]; then
                printf '%s' "$output" | subunit_fail_test "$name"
@@ -50,7 +50,7 @@ test_rpcclient_grep()
        shift
        shift
        subunit_start_test "$name"
-       output=$($VALGRIND $rpcclient $CONFIGURATION "$srv" -c "$cmd" $@ 2>&1)
+       output=$($VALGRIND $rpcclient $CONFIGURATION "$srv" -c "$cmd" "$@" 2>&1)
        status=$?
        if [ x$status != x0 ]; then
                printf '%s' "$output" | subunit_fail_test "$name"
@@ -77,7 +77,7 @@ test_rpcclient_expect_failure_grep()
        shift
        shift
        subunit_start_test "$name"
-       output=$($VALGRIND $rpcclient $CONFIGURATION "$srv" -c "$cmd" $@ 2>&1)
+       output=$($VALGRIND $rpcclient $CONFIGURATION "$srv" -c "$cmd" "$@" 2>&1)
        status=$?
        if [ x$status = x0 ]; then
                printf '%s' "$output" | subunit_fail_test "$name"
@@ -103,11 +103,11 @@ kerberos_kinit()
        if [ "${kbase}" = "samba4kinit" ]; then
                kpassfile=$(mktemp)
                echo $password >${kpassfile}
-               $kinit_tool -c ${KRB5CCNAME} --password-file=${kpassfile} $@ $principal
+               $kinit_tool -c ${KRB5CCNAME} --password-file=${kpassfile} "$@" $principal
                status=$?
                rm -f ${kpassfile}
        else
-               echo $password | $kinit_tool $@ $principal
+               echo $password | $kinit_tool "$@" $principal
                status=$?
        fi
        return $status