Skip to contentSkip to conversation

commands/lsmod01.sh: Replace tst_res with tst_brk

PATCH New Zhao Gongyi 2 participants 3 messages Apr 29, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 commands/lsmod01.sh: Replace tst_res with tst_brk

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

---
v2->v3: split into two separate commits

 testcases/commands/lsmod/lsmod01.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/commands/lsmod/lsmod01.sh +1 -1
index 2e044c718..4ed91eca5 100755
@@ -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
 

--
2.17.1

#1 lore raw

PATCH v3 1/1 commands/lsmod01.sh: Replace tst_res with tst_brk

Hi,

Quoted 14 lines

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

---
v2->v3: split into two separate commits

 testcases/commands/lsmod/lsmod01.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/commands/lsmod/lsmod01.sh +0 -0
index 2e044c718..4ed91eca5 100755

testcases/commands/lsmod/lsmod01.sh setup() · line 27

Quoted 6 lines
testcases/commands/lsmod/lsmod01.sh +1 -1
@@ -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.

Kind regards,
Petr

#2 lore raw

PATCH v3 1/1 commands/lsmod01.sh: Replace tst_res with tst_brk

In reply to Zhao Gongyi

Hi,

testcases/commands/lsmod/lsmod01.sh setup() · line 26

Quoted 7 lines

+++ b/testcases/commands/lsmod/lsmod01.sh

testcases/commands/lsmod/lsmod01.sh +1 -1
@@ -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

Quoted 2 lines
(quoted diff) +0 -0
 			return
 		fi