commit 81dd19892c26979f3b1eded83510fc8ab7225ab5
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Fri May 22 13:45:59 2015 +0200
recipes: add mtu configuration to phase1 and phase2 tests
Recipes in phase1 and phase2 directories can now be run with user
specified MTU, for example:
lnst-ctl -A mtu=8000 recipes/regression_tests/phase1/3_vlans.xml
If it is not set the default MTU of 1500 bytes is used.
Version 2: removed the patch file
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
recipes/regression_tests/phase1/3_vlans.py | 12 ++++++++++++
recipes/regression_tests/phase1/3_vlans.xml | 1 +
.../phase1/3_vlans_over_active_backup_bond.xml | 1 +
.../regression_tests/phase1/3_vlans_over_bond.py | 12 ++++++++++++
.../phase1/3_vlans_over_round_robin_bond.xml | 1 +
.../regression_tests/phase1/active_backup_bond.xml | 1 +
.../phase1/active_backup_double_bond.xml | 1 +
recipes/regression_tests/phase1/bonding_test.py | 6 ++++++
recipes/regression_tests/phase1/ping_flood.xml | 1 +
.../regression_tests/phase1/round_robin_bond.xml | 1 +
.../phase1/round_robin_double_bond.xml | 1 +
recipes/regression_tests/phase1/simple_ping.py | 7 +++++++
.../phase2/3_vlans_over_active_backup_team.xml | 1 +
.../phase2/3_vlans_over_round_robin_team.xml | 1 +
.../regression_tests/phase2/3_vlans_over_team.py | 13 +++++++++++++
.../phase2/active_backup_double_team.xml | 1 +
.../regression_tests/phase2/active_backup_team.xml | 1 +
.../active_backup_team_vs_active_backup_bond.xml | 1 +
.../active_backup_team_vs_round_robin_bond.xml | 1 +
.../phase2/round_robin_double_team.xml | 1 +
.../regression_tests/phase2/round_robin_team.xml | 1 +
.../round_robin_team_vs_active_backup_bond.xml | 1 +
.../round_robin_team_vs_round_robin_bond.xml | 1 +
recipes/regression_tests/phase2/team_test.py | 7 +++++++
24 files changed, 75 insertions(+), 0 deletions(-)
---
diff --git a/recipes/regression_tests/phase1/3_vlans.py b/recipes/regression_tests/phase1/3_vlans.py
index a034870..7e79a9f 100644
--- a/recipes/regression_tests/phase1/3_vlans.py
+++ b/recipes/regression_tests/phase1/3_vlans.py
@@ -18,6 +18,18 @@ vlans = ["vlan10", "vlan20", "vlan30"]
offloads = ["gso", "gro", "tso"]
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+m1_phy1 = m1.get_interface("eth1")
+m1_phy1.set_mtu(mtu)
+m2_phy1 = m2.get_interface("eth1")
+m2_phy1.set_mtu(mtu)
+
+for vlan in vlans:
+ vlan_if1 = m1.get_interface(vlan)
+ vlan_if1.set_mtu(mtu)
+ vlan_if2 = m2.get_interface(vlan)
+ vlan_if2.set_mtu(mtu)
ctl.wait(15)
diff --git a/recipes/regression_tests/phase1/3_vlans.xml b/recipes/regression_tests/phase1/3_vlans.xml
index 2262b6d..ba0455c 100644
--- a/recipes/regression_tests/phase1/3_vlans.xml
+++ b/recipes/regression_tests/phase1/3_vlans.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
index a4ce2a6..60b2efd 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
+++ b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py b/recipes/regression_tests/phase1/3_vlans_over_bond.py
index 2db63cd..dde2359 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py
@@ -18,6 +18,18 @@ vlans = ["vlan10", "vlan20", "vlan30"]
offloads = ["gso", "gro", "tso"]
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+m1_bond = m1.get_interface("test_bond")
+m1_bond.set_mtu(mtu)
+m2_phy1 = m2.get_interface("eth1")
+m2_phy1.set_mtu(mtu)
+
+for vlan in vlans:
+ vlan_if1 = m1.get_interface(vlan)
+ vlan_if1.set_mtu(mtu)
+ vlan_if2 = m2.get_interface(vlan)
+ vlan_if2.set_mtu(mtu)
ctl.wait(15)
diff --git a/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
index d8b2f6a..1aa0149 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
+++ b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/active_backup_bond.xml b/recipes/regression_tests/phase1/active_backup_bond.xml
index 9121af7..596dec5 100644
--- a/recipes/regression_tests/phase1/active_backup_bond.xml
+++ b/recipes/regression_tests/phase1/active_backup_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/active_backup_double_bond.xml b/recipes/regression_tests/phase1/active_backup_double_bond.xml
index a3d89d9..dec15df 100644
--- a/recipes/regression_tests/phase1/active_backup_double_bond.xml
+++ b/recipes/regression_tests/phase1/active_backup_double_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/bonding_test.py b/recipes/regression_tests/phase1/bonding_test.py
index d0a18f4..d2d6378 100644
--- a/recipes/regression_tests/phase1/bonding_test.py
+++ b/recipes/regression_tests/phase1/bonding_test.py
@@ -18,6 +18,12 @@ m2.sync_resources(modules=["IcmpPing", "Icmp6Ping", "Netperf"])
offloads = ["tso", "gro", "gso"]
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+test_if1 = m1.get_interface("test_if")
+test_if1.set_mtu(mtu)
+test_if2 = m2.get_interface("test_if")
+test_if2.set_mtu(mtu)
ping_mod = ctl.get_module("IcmpPing",
options={
diff --git a/recipes/regression_tests/phase1/ping_flood.xml b/recipes/regression_tests/phase1/ping_flood.xml
index 3423a22..9409227 100644
--- a/recipes/regression_tests/phase1/ping_flood.xml
+++ b/recipes/regression_tests/phase1/ping_flood.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="machine1">
diff --git a/recipes/regression_tests/phase1/round_robin_bond.xml b/recipes/regression_tests/phase1/round_robin_bond.xml
index a33f2ca..516bf5b 100644
--- a/recipes/regression_tests/phase1/round_robin_bond.xml
+++ b/recipes/regression_tests/phase1/round_robin_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/round_robin_double_bond.xml b/recipes/regression_tests/phase1/round_robin_double_bond.xml
index c3313c6..51a871e 100644
--- a/recipes/regression_tests/phase1/round_robin_double_bond.xml
+++ b/recipes/regression_tests/phase1/round_robin_double_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/simple_ping.py b/recipes/regression_tests/phase1/simple_ping.py
index dc961d7..0882fed 100644
--- a/recipes/regression_tests/phase1/simple_ping.py
+++ b/recipes/regression_tests/phase1/simple_ping.py
@@ -25,6 +25,13 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
ctl.wait(15)
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+test_if1 = hostA.get_interface("testiface")
+test_if1.set_mtu(mtu)
+test_if2 = hostB.get_interface("testiface")
+test_if2.set_mtu(mtu)
+
if ipv in [ 'ipv6', 'both' ]:
hostA.run(ping_mod6)
diff --git a/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml b/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
index 12910fd..4d27752 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
+++ b/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml b/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
index aaab95e..d8115b5 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
+++ b/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py b/recipes/regression_tests/phase2/3_vlans_over_team.py
index 8be39b4..74b5a5a 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_team.py
+++ b/recipes/regression_tests/phase2/3_vlans_over_team.py
@@ -18,6 +18,19 @@ vlans = ["vlan10", "vlan20", "vlan30"]
offloads = ["gso", "gro", "tso"]
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+m1_team = m1.get_interface("test_if")
+m1_team.set_mtu(mtu)
+m2_phy1 = m2.get_interface("eth1")
+m2_phy1.set_mtu(mtu)
+
+for vlan in vlans:
+ vlan_if1 = m1.get_interface(vlan)
+ vlan_if1.set_mtu(mtu)
+ vlan_if2 = m2.get_interface(vlan)
+ vlan_if2.set_mtu(mtu)
+
ctl.wait(15)
diff --git a/recipes/regression_tests/phase2/active_backup_double_team.xml b/recipes/regression_tests/phase2/active_backup_double_team.xml
index f7b76c4..387937a 100644
--- a/recipes/regression_tests/phase2/active_backup_double_team.xml
+++ b/recipes/regression_tests/phase2/active_backup_double_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/active_backup_team.xml b/recipes/regression_tests/phase2/active_backup_team.xml
index ade4a4c..b798f5b 100644
--- a/recipes/regression_tests/phase2/active_backup_team.xml
+++ b/recipes/regression_tests/phase2/active_backup_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml b/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
index cf2359d..b1cdbfe 100644
--- a/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
+++ b/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml b/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
index 830ee74..6905721 100644
--- a/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
+++ b/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_double_team.xml b/recipes/regression_tests/phase2/round_robin_double_team.xml
index 0642acc..8fcedca 100644
--- a/recipes/regression_tests/phase2/round_robin_double_team.xml
+++ b/recipes/regression_tests/phase2/round_robin_double_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_team.xml b/recipes/regression_tests/phase2/round_robin_team.xml
index a3a1031..d9d277b 100644
--- a/recipes/regression_tests/phase2/round_robin_team.xml
+++ b/recipes/regression_tests/phase2/round_robin_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml b/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
index fae0d9f..76513da 100644
--- a/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
+++ b/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml b/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
index 3c406da..e91558c 100644
--- a/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
+++ b/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/team_test.py b/recipes/regression_tests/phase2/team_test.py
index 776589a..88cbb8c 100644
--- a/recipes/regression_tests/phase2/team_test.py
+++ b/recipes/regression_tests/phase2/team_test.py
@@ -17,6 +17,13 @@ m2.sync_resources(modules=["IcmpPing", "Icmp6Ping", "Netperf"])
offloads = ["tso", "gro", "gso"]
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+test_if1 = m1.get_interface("test_if")
+test_if1.set_mtu(mtu)
+test_if2 = m2.get_interface("test_if")
+test_if2.set_mtu(mtu)
+
ping_mod = ctl.get_module("IcmpPing",
options={