<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>On 08/25/2017 02:44 AM, Petr Vorel wrote:</tt><tt><br>
</tt>
<blockquote type="cite"
cite="mid:20170824234436.18145-3-pvorel@suse.cz">
<pre wrap="">+ use it in interface stress tests
test_net_stress.sh:
* test_net_stress.sh library is intended to be used throughout all
stress tests reduce duplicity and use code from test_net.sh where
possible instead of legacy scripts in testcases/network/stress/ns-tools/.
* TCID set automatically from basename.
* Add "unused network" related variables. So far used only IPv4 ones.
* Functions from if-lib.sh moved and (and some renamed) to
test_net_stress.sh as they are going to be reused in other tests (not
just interface stress tests).
Interfaces stress tests:
* Interfaces tests use test_net_stress.sh.
* Remove restore_ipaddr from cleanup functions as these functions would
break netns testing with RTNETLINK errors. Use them just in setup during
if-mtu-change where are really needed.
</pre>
</blockquote>
<tt><br>
</tt><tt>...</tt><tt><br>
<br>
<blockquote type="cite">
<pre wrap="">diff --git a/testcases/network/stress/interface/if-mtu-change b/testcases/network/stress/interface/if-mtu-change
index 637fa6389..03e6ba9d6 100644
--- a/testcases/network/stress/interface/if-mtu-change
+++ b/testcases/network/stress/interface/if-mtu-change
@@ -18,9 +18,6 @@
# Author: Mitsuru Chinen <a class="moz-txt-link-rfc2396E" href="mailto:mitch@jp.ibm.com"><mitch@jp.ibm.com></a>
TST_TOTAL=2
-TCID=if-mtu-change
-
-. if-lib.sh
TST_CLEANUP="do_cleanup"
@@ -33,9 +30,12 @@ CHANGE6_VALUES="1280 1445 1335 1390 1500 1280 1500 1280 1335 1500"
[ "$TST_IPV6" ] && CHANGE_VALUES=$CHANGE6_VALUES
saved_mtu=
+. test_net_stress.sh
+
+</pre>
</blockquote>
</tt><tt><tt><br>
</tt>TST_IPV6 not defined in this case, sourced the library before
the usage of this variable.<br>
<br>
</tt><tt><br>
</tt>
<blockquote type="cite"
cite="mid:20170824234436.18145-3-pvorel@suse.cz">
<pre wrap="">+
+# Prefix of the Multicast Address
+MCAST_IPV4_ADDR_PREFIX="224.10"
+# Multicast Address
+MCAST_IPV4_ADDR="${MCAST_IPV4_ADDR_PREFIX}.10.1"
+
+LINK_TOTAL=$(echo $LHOST_HWADDRS | wc -w)
+RHOST_LINK_TOTAL=$(echo $RHOST_HWADDRS | wc -w)
+[ $LINK_TOTAL -ne $RHOST_LINK_TOTAL ] && \
+ tst_brkm TBROK "the number of element in LHOST_HWADDRS differs from RHOST_HWADDRS" \
+ "($LINK_TOTAL vs. $RHOST_LINK_TOTAL," \
+ "LHOST_HWADDRS: '$LHOST_HWADDRS' RHOST_HWADDRS: '$RHOST_HWADDRS')"</pre>
</blockquote>
<tt><br>
</tt><tt>Didn't find the place where you need these variables. Are
you going to</tt><tt><br>
</tt><tt>use them somewhere or they are here just for checking
network configuration?</tt><tt><br>
</tt><tt><br>
</tt><tt>I've removed them and applied the patch.</tt><tt><br>
</tt><tt><br>
</tt><tt>Thanks,</tt><tt><br>
</tt><tt>Alexey</tt><tt><br>
</tt><tt><br>
</tt>
</body>
</html>