commit 2975e5f524e0ff43dc0791283b6bb4dbfe92ffb0
Author: Jiri Prochazka <jprochaz(a)redhat.com>
Date: Tue Nov 25 12:47:50 2014 +0100
Tests from phase1 renamed
Tests renamed to avoid confusion with team tests from phase2. Now bond tests have
_bond suffix, and team tests will have _team suffix
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
...ADME => 3_vlans_over_active_backup_bond.README} | 2 +-
...kup.xml => 3_vlans_over_active_backup_bond.xml} | 2 +-
.../regression_tests/phase1/3_vlans_over_bond.py | 94 ++++++++++++++++++++
...README => 3_vlans_over_round_robin_bond.README} | 2 +-
...robin.xml => 3_vlans_over_round_robin_bond.xml} | 2 +-
...ive_backup.README => active_backup_bond.README} | 0
.../{active_backup.xml => active_backup_bond.xml} | 0
...{round_robin.README => round_robin_bond.README} | 0
.../{round_robin.xml => round_robin_bond.xml} | 2 +
..._bridge_2_vlans_over_active_backup_bond.README} | 0
...ual_bridge_2_vlans_over_active_backup_bond.xml} | 0
...al_bridge_2_vlans_over_round_robin_bond.README} | 0
...rtual_bridge_2_vlans_over_round_robin_bond.xml} | 0
13 files changed, 100 insertions(+), 4 deletions(-)
---
diff --git a/recipes/regression_tests/phase1/3_vlans_over_active_backup.README
b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.README
similarity index 99%
rename from recipes/regression_tests/phase1/3_vlans_over_active_backup.README
rename to recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.README
index e20fcb0..20a571c 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_active_backup.README
+++ b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.README
@@ -38,7 +38,7 @@ Host #2 description:
Two ethernet devices, in active-backup bond mode
3 VLANs on bond interface
Test name:
- 3_vlans.py
+ 3_vlans_over_bond.py
Test description:
Ping:
+ count: 100
diff --git a/recipes/regression_tests/phase1/3_vlans_over_active_backup.xml
b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
similarity index 98%
rename from recipes/regression_tests/phase1/3_vlans_over_active_backup.xml
rename to recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
index 705e77c..d125971 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_active_backup.xml
+++ b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
@@ -92,5 +92,5 @@
</host>
</network>
- <task python="3_vlans.py" />
+ <task python="3_vlans_over_bond.py" />
</lnstrecipe>
diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py
b/recipes/regression_tests/phase1/3_vlans_over_bond.py
new file mode 100644
index 0000000..6c6f398
--- /dev/null
+++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py
@@ -0,0 +1,94 @@
+from lnst.Controller.Task import ctl
+
+# ------
+# SETUP
+# ------
+
+m1 = ctl.get_host("testmachine1")
+m2 = ctl.get_host("testmachine2")
+
+m1.sync_resources(modules=["IcmpPing", "Netperf"])
+m2.sync_resources(modules=["IcmpPing", "Netperf"])
+
+# ------
+# TESTS
+# ------
+
+vlans = ["vlan10", "vlan20", "vlan30"]
+offloads = ["gso", "gro", "tso"]
+
+for vlan1 in vlans:
+ for vlan2 in vlans:
+ ping_mod = ctl.get_module("IcmpPing",
+ options={
+ "addr" : m2.get_ip(vlan2),
+ "count" : 100,
+ "iface" : m1.get_devname(vlan1),
+ "interval" : 0.1
+ })
+ netperf_srv = ctl.get_module("Netperf",
+ options={
+ "role" : "server",
+ "bind" : m1.get_ip(vlan1),
+ })
+ netperf_cli_tcp = ctl.get_module("Netperf",
+ options={
+ "role" : "client",
+ "netperf_server" :
+ m1.get_ip(vlan1),
+ "duration" : 60,
+ "testname" :
"TCP_STREAM",
+ "netperf_opts" :
+ "-L %s" % m2.get_ip(vlan1)
+ })
+ netperf_cli_udp = ctl.get_module("Netperf",
+ options={
+ "role" : "client",
+ "netperf_server" :
+ m1.get_ip(vlan1),
+ "duration" : 60,
+ "testname" :
"UDP_STREAM",
+ "netperf_opts" :
+ "-L %s" % m2.get_ip(vlan1)
+ })
+ for offload in offloads:
+ # These tests should pass
+ # Ping between same VLANs
+ if vlan1 == vlan2:
+ for state in ["on", "off"]:
+ # Offload setup
+ m1.run("ethtool -K %s %s %s" %
(m1.get_devname("eth1"),
+ offload, state))
+ m1.run("ethtool -K %s %s %s" %
(m1.get_devname("eth2"),
+ offload, state))
+ m2.run("ethtool -K %s %s %s" %
(m2.get_devname("eth1"),
+ offload, state))
+ m2.run("ethtool -K %s %s %s" %
(m2.get_devname("eth2"),
+ offload, state))
+
+ # Ping test
+ m1.run(ping_mod)
+
+ # Netperf test (both TCP and UDP)
+ srv_proc = m1.run(netperf_srv, bg=True)
+ ctl.wait(2)
+ m2.run(netperf_cli_tcp, timeout=65)
+ m2.run(netperf_cli_udp, timeout=65)
+ srv_proc.intr()
+
+ # These tests should fail
+ # Ping across different VLAN
+ elif vlan1 != vlan2:
+ for state in ["on", "off"]:
+ # Offload setup
+ m1.run("ethtool -K %s %s %s" %
(m1.get_devname("eth1"),
+ offload, state))
+ m1.run("ethtool -K %s %s %s" %
(m1.get_devname("eth2"),
+ offload, state))
+ m2.run("ethtool -K %s %s %s" %
(m2.get_devname("eth1"),
+ offload, state))
+ m2.run("ethtool -K %s %s %s" %
(m2.get_devname("eth2"),
+ offload, state))
+
+ # Ping test
+ m1.run(ping_mod, expect="fail")
diff --git a/recipes/regression_tests/phase1/3_vlans_over_round_robin.README
b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.README
similarity index 99%
rename from recipes/regression_tests/phase1/3_vlans_over_round_robin.README
rename to recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.README
index dbf53eb..5fe192d 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_round_robin.README
+++ b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.README
@@ -38,7 +38,7 @@ Host #2 description:
Two ethernet devices, in round-robin bond mode
3 VLANs on bond interface
Test name:
- 3_vlans.py
+ 3_vlans_over_bond.py
Test description:
Ping:
+ count: 100
diff --git a/recipes/regression_tests/phase1/3_vlans_over_round_robin.xml
b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
similarity index 98%
rename from recipes/regression_tests/phase1/3_vlans_over_round_robin.xml
rename to recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
index 89f01c6..2d4aac3 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_round_robin.xml
+++ b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
@@ -92,5 +92,5 @@
</host>
</network>
- <task python="3_vlans.py" />
+ <task python="3_vlans_over_bond.py" />
</lnstrecipe>
diff --git a/recipes/regression_tests/phase1/active_backup.README
b/recipes/regression_tests/phase1/active_backup_bond.README
similarity index 100%
rename from recipes/regression_tests/phase1/active_backup.README
rename to recipes/regression_tests/phase1/active_backup_bond.README
diff --git a/recipes/regression_tests/phase1/active_backup.xml
b/recipes/regression_tests/phase1/active_backup_bond.xml
similarity index 100%
rename from recipes/regression_tests/phase1/active_backup.xml
rename to recipes/regression_tests/phase1/active_backup_bond.xml
diff --git a/recipes/regression_tests/phase1/round_robin.README
b/recipes/regression_tests/phase1/round_robin_bond.README
similarity index 100%
rename from recipes/regression_tests/phase1/round_robin.README
rename to recipes/regression_tests/phase1/round_robin_bond.README
diff --git a/recipes/regression_tests/phase1/round_robin.xml
b/recipes/regression_tests/phase1/round_robin_bond.xml
similarity index 99%
rename from recipes/regression_tests/phase1/round_robin.xml
rename to recipes/regression_tests/phase1/round_robin_bond.xml
index 728dfa4..237cced 100644
--- a/recipes/regression_tests/phase1/round_robin.xml
+++ b/recipes/regression_tests/phase1/round_robin_bond.xml
@@ -32,3 +32,5 @@
<task python="bonding_test.py" />
</lnstrecipe>
+
+
diff --git
a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup.README
b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.README
similarity index 100%
rename from
recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup.README
rename to
recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.README
diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup.xml
b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.xml
similarity index 100%
rename from recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup.xml
rename to
recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.xml
diff --git
a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_round_robin.README
b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_round_robin_bond.README
similarity index 100%
rename from
recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_round_robin.README
rename to
recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_round_robin_bond.README
diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_round_robin.xml
b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_round_robin_bond.xml
similarity index 100%
rename from recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_round_robin.xml
rename to
recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_round_robin_bond.xml