* [LTP] [PATCH 1/1] tst_test.sh: Add default trap to INT
@ 2018-06-14 10:04 Petr Vorel
2018-07-26 7:37 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2018-06-14 10:04 UTC (permalink / raw)
To: ltp
+ remove it's definition from network stress tests already
converted to the new API.
Trap function can be overwritten in tests, if needed.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/lib/tst_test.sh | 3 +++
testcases/network/stress/interface/if4-addr-change | 2 --
testcases/network/stress/ns-tools/tst_net_stress.sh | 1 -
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
index d27b4afd6..a8585bafd 100644
--- a/testcases/lib/tst_test.sh
+++ b/testcases/lib/tst_test.sh
@@ -32,6 +32,9 @@ export TST_TMPDIR_RHOST=0
. tst_ansi_color.sh
+# default trap function
+trap "tst_brk TBROK 'test interrupted'" INT
+
_tst_do_exit()
{
local ret=0
diff --git a/testcases/network/stress/interface/if4-addr-change b/testcases/network/stress/interface/if4-addr-change
index 8ed3ce3a8..5ab67751e 100644
--- a/testcases/network/stress/interface/if4-addr-change
+++ b/testcases/network/stress/interface/if4-addr-change
@@ -34,8 +34,6 @@ do_cleanup()
tst_wait_ipv6_dad
}
-trap "tst_brk TBROK 'test interrupted'" INT
-
test_body()
{
local cnt=0
diff --git a/testcases/network/stress/ns-tools/tst_net_stress.sh b/testcases/network/stress/ns-tools/tst_net_stress.sh
index e5c2672a3..2a9120e11 100644
--- a/testcases/network/stress/ns-tools/tst_net_stress.sh
+++ b/testcases/network/stress/ns-tools/tst_net_stress.sh
@@ -40,7 +40,6 @@ netstress_setup()
{
TST_NEEDS_ROOT=1
tst_check_cmds pgrep pkill
- trap "tst_brk TBROK 'test interrupted'" INT
}
# Cleanup for tests using netstress.
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH 1/1] tst_test.sh: Add default trap to INT
2018-06-14 10:04 [LTP] [PATCH 1/1] tst_test.sh: Add default trap to INT Petr Vorel
@ 2018-07-26 7:37 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2018-07-26 7:37 UTC (permalink / raw)
To: ltp
Hi,
> + remove it's definition from network stress tests already
> converted to the new API.
> Trap function can be overwritten in tests, if needed.
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> testcases/lib/tst_test.sh | 3 +++
> testcases/network/stress/interface/if4-addr-change | 2 --
> testcases/network/stress/ns-tools/tst_net_stress.sh | 1 -
> 3 files changed, 3 insertions(+), 3 deletions(-)
Pushed.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-26 7:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-14 10:04 [LTP] [PATCH 1/1] tst_test.sh: Add default trap to INT Petr Vorel
2018-07-26 7:37 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox