All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Gongyi <zhaogongyi@huawei.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] tst_res: Replace tst_res with tst_brk for shell testcases
Date: Tue, 13 Apr 2021 19:35:49 +0800	[thread overview]
Message-ID: <20210413113549.3604-1-zhaogongyi@huawei.com> (raw)

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

For those:
	testcases/commands/lsmod/lsmod01.sh
        testcases/network/virt/sit01.sh

Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---
v1->v2:remove the modification of ima_measurements.sh
---
 testcases/commands/lsmod/lsmod01.sh | 3 +--
 testcases/network/virt/sit01.sh     | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

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

 		module_inserted=1
diff --git a/testcases/network/virt/sit01.sh b/testcases/network/virt/sit01.sh
index 4ecc1f8c0..27fa0ee77 100755
--- a/testcases/network/virt/sit01.sh
+++ b/testcases/network/virt/sit01.sh
@@ -11,7 +11,7 @@ virt_type="sit"

 do_setup()
 {
-	[ -n "$TST_IPV6" ] && tst_res TBROK "invalid option '-6' for sit tunnel"
+	[ -n "$TST_IPV6" ] && tst_brk TBROK "invalid option '-6' for sit tunnel"

 	virt_lib_setup

--
2.17.1


             reply	other threads:[~2021-04-13 11:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 11:35 Zhao Gongyi [this message]
2021-04-28 19:24 ` [LTP] [PATCH v2] tst_res: Replace tst_res with tst_brk for shell testcases Petr Vorel
2021-04-29  2:32 zhaogongyi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210413113549.3604-1-zhaogongyi@huawei.com \
    --to=zhaogongyi@huawei.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.