[LTP] [RFC PATCH v6 5/7] network/if-updown: Restore IP in cleanup function
Petr Vorel
pvorel@suse.cz
Fri Apr 6 14:31:16 CEST 2018
While this is not visible due current test content in runtest file
(net_stress.interface), where other tests reset the settings, it is
needed as it break if-mtu-change on IPv6:
if-mtu-change 1 TINFO: set MTU to 1280 1/2
if-mtu-change 1 TFAIL: tst_ping IPv6 iface fd00:1:1:1::2, msg_size 1: fail
Test with runtest file:
if4-updown if-updown
if6-mtu-change if-mtu-change -6
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/network/stress/interface/if-updown | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/testcases/network/stress/interface/if-updown b/testcases/network/stress/interface/if-updown
index 264331adb..45cf0feaf 100644
--- a/testcases/network/stress/interface/if-updown
+++ b/testcases/network/stress/interface/if-updown
@@ -19,12 +19,18 @@
TST_TOTAL=2
-TST_CLEANUP="netstress_cleanup"
+TST_CLEANUP="do_cleanup"
. test_net_stress.sh
CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IF_UPDOWN_TIMES / 20))}
+do_cleanup()
+{
+ netstress_cleanup
+ restore_ipaddr
+}
+
test_body()
{
local cmd_type=$1
--
2.16.2
More information about the ltp
mailing list