diff mbox series

[COMMITTED,1/1] tst_test.sh: Quote function parameter

Message ID 20180612141137.11690-1-pvorel@suse.cz
State Accepted
Delegated to: Petr Vorel
Headers show
Series [COMMITTED,1/1] tst_test.sh: Quote function parameter | expand

Commit Message

Petr Vorel June 12, 2018, 2:11 p.m. UTC
As following patches shows the need to use function with parameter [1],
quotes are needed.

[1] http://lists.linux.it/pipermail/ltp/2018-May/008147.html

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Sorry, I overlooked it in your patch.
---
 testcases/lib/tst_test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Li Wang June 12, 2018, 2:28 p.m. UTC | #1
On Tue, Jun 12, 2018 at 10:11 PM, Petr Vorel <pvorel@suse.cz> wrote:

> As following patches shows the need to use function with parameter [1],
> quotes are needed.
>
> [1] http://lists.linux.it/pipermail/ltp/2018-May/008147.html
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
>

​ACK.
​


> ---
> Sorry, I overlooked it in your patch.
>

​You shouldn't say sorry, that's my careless to made it. :)
​


> ---
>  testcases/lib/tst_test.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
> index 0c98d5a75..d27b4afd6 100644
> --- a/testcases/lib/tst_test.sh
> +++ b/testcases/lib/tst_test.sh
> @@ -156,7 +156,7 @@ EXPECT_FAIL()
>
>  TST_RETRY_FN_EXP_BACKOFF()
>  {
> -       local tst_fun=$1
> +       local tst_fun="$1"
>         local tst_exp=$2
>         local tst_sec=$(expr $3 \* 1000000)
>         local tst_delay=1
> --
> 2.16.3
>
>
diff mbox series

Patch

diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
index 0c98d5a75..d27b4afd6 100644
--- a/testcases/lib/tst_test.sh
+++ b/testcases/lib/tst_test.sh
@@ -156,7 +156,7 @@  EXPECT_FAIL()
 
 TST_RETRY_FN_EXP_BACKOFF()
 {
-	local tst_fun=$1
+	local tst_fun="$1"
 	local tst_exp=$2
 	local tst_sec=$(expr $3 \* 1000000)
 	local tst_delay=1