diff mbox series

[v3] commands/lsmod01.sh: Replace tst_res with tst_brk

Message ID 20210429020922.24085-1-zhaogongyi@huawei.com
State Accepted
Headers show
Series [v3] commands/lsmod01.sh: Replace tst_res with tst_brk | expand

Commit Message

Zhao Gongyi April 29, 2021, 2:09 a.m. UTC
We need replace tst_res with tst_brk to terminate the test immediately since
there is no sence to go on.

Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---
v2->v3: split into two separate commits
 testcases/commands/lsmod/lsmod01.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.17.1

Comments

Petr Vorel April 29, 2021, 6:52 a.m. UTC | #1
Hi,

> We need replace tst_res with tst_brk to terminate the test immediately since
> there is no sence to go on.

> Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
> ---
> v2->v3: split into two separate commits
>  testcases/commands/lsmod/lsmod01.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/testcases/commands/lsmod/lsmod01.sh b/testcases/commands/lsmod/lsmod01.sh
> index 2e044c718..4ed91eca5 100755
> --- a/testcases/commands/lsmod/lsmod01.sh
> +++ b/testcases/commands/lsmod/lsmod01.sh
> @@ -23,7 +23,7 @@ setup()
>  		tst_require_cmds insmod
>  		insmod "$TST_MODPATH"
>  		if [ $? -ne 0 ]; then
> -			tst_res TBROK "insmod failed"
> +			tst_brk TBROK "insmod failed"
>  			return
There does not need to be return (in cleanup function tst_brk just prints
warning and continues, but elsewhere it just quits).

I'll fix that during merge.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr
Petr Vorel April 29, 2021, 5:12 p.m. UTC | #2
Hi,

> +++ b/testcases/commands/lsmod/lsmod01.sh
> @@ -23,7 +23,7 @@ setup()
>  		tst_require_cmds insmod
>  		insmod "$TST_MODPATH"
>  		if [ $? -ne 0 ]; then
> -			tst_res TBROK "insmod failed"
> +			tst_brk TBROK "insmod failed"
I replace whole block with ROD and merged. Thanks!

Kind regards,
Petr

>  			return
>  		fi
diff mbox series

Patch

diff --git a/testcases/commands/lsmod/lsmod01.sh b/testcases/commands/lsmod/lsmod01.sh
index 2e044c718..4ed91eca5 100755
--- a/testcases/commands/lsmod/lsmod01.sh
+++ b/testcases/commands/lsmod/lsmod01.sh
@@ -23,7 +23,7 @@  setup()
 		tst_require_cmds insmod
 		insmod "$TST_MODPATH"
 		if [ $? -ne 0 ]; then
-			tst_res TBROK "insmod failed"
+			tst_brk TBROK "insmod failed"
 			return
 		fi