commit ddbf66615e23b3edc4fdb71aa212640e80263759
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Fri May 22 13:34:13 2015 +0200
recipes: remove offload configuration for ping tests between different vlans
For ICMP/ICMP6 ping tests between different vlans that are deemed to fail,
we don't need to iterate over offload turning on and off. This is also to
speed up the regression tests.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
recipes/regression_tests/phase1/3_vlans.py | 26 ++++++-----------
.../regression_tests/phase1/3_vlans_over_bond.py | 28 ++++++-------------
.../regression_tests/phase2/3_vlans_over_team.py | 29 ++++++-------------
3 files changed, 27 insertions(+), 56 deletions(-)
---
diff --git a/recipes/regression_tests/phase1/3_vlans.py
b/recipes/regression_tests/phase1/3_vlans.py
index 3ead92f..a034870 100644
--- a/recipes/regression_tests/phase1/3_vlans.py
+++ b/recipes/regression_tests/phase1/3_vlans.py
@@ -96,10 +96,10 @@ for vlan1 in vlans:
"-L %s -6" % m2.get_ip(vlan1,
1)
})
- for offload in offloads:
+ if vlan1 == vlan2:
# These tests should pass
# Ping between same VLANs
- if vlan1 == vlan2:
+ for offload in offloads:
for state in ["off", "on"]:
# Offload setup
m1.run("ethtool -K %s %s %s" %
(m1.get_devname("eth1"),
@@ -128,19 +128,11 @@ for vlan1 in vlans:
m2.run(netperf_cli_udp6, timeout=70)
srv_proc.intr()
- # These tests should fail
- # Ping across different VLAN
- elif vlan1 != vlan2:
- for state in ["off", "on"]:
- # Offload setup
- m1.run("ethtool -K %s %s %s" %
(m1.get_devname("eth1"),
- offload, state))
- m2.run("ethtool -K %s %s %s" %
(m2.get_devname("eth1"),
- offload, state))
+ # These tests should fail
+ # Ping across different VLAN
+ else:
+ if ipv in [ 'ipv4', 'both' ]:
+ m1.run(ping_mod, expect="fail")
- if ipv in [ 'ipv4', 'both' ]:
- # Ping test
- m1.run(ping_mod, expect="fail")
-
- if ipv in [ 'ipv6', 'both' ]:
- m1.run(ping_mod6, expect="fail")
+ if ipv in [ 'ipv6', 'both' ]:
+ m1.run(ping_mod6, expect="fail")
diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py
b/recipes/regression_tests/phase1/3_vlans_over_bond.py
index f793ed6..2db63cd 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py
@@ -96,10 +96,10 @@ for vlan1 in vlans:
"-L %s -6" % m2.get_ip(vlan1,
1)
})
- for offload in offloads:
+ if vlan1 == vlan2:
# These tests should pass
# Ping between same VLANs
- if vlan1 == vlan2:
+ for offload in offloads:
for state in ["off", "on"]:
# Offload setup
m1.run("ethtool -K %s %s %s" %
(m1.get_devname("eth1"),
@@ -130,21 +130,11 @@ for vlan1 in vlans:
m2.run(netperf_cli_udp6, timeout=70)
srv_proc.intr()
- # These tests should fail
- # Ping across different VLAN
- elif vlan1 != vlan2:
- for state in ["off", "on"]:
- # 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))
+ # These tests should fail
+ # Ping across different VLAN
+ else:
+ if ipv in [ 'ipv4', 'both' ]:
+ m1.run(ping_mod, expect="fail")
- if ipv in [ 'ipv4', 'both' ]:
- # Ping test
- m1.run(ping_mod, expect="fail")
-
- if ipv in [ 'ipv6', 'both' ]:
- m1.run(ping_mod6, expect="fail")
+ if ipv in [ 'ipv6', 'both' ]:
+ m1.run(ping_mod6, expect="fail")
diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py
b/recipes/regression_tests/phase2/3_vlans_over_team.py
index 96d1be2..8be39b4 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_team.py
+++ b/recipes/regression_tests/phase2/3_vlans_over_team.py
@@ -95,10 +95,10 @@ for vlan1 in vlans:
"-L %s -6" % m2.get_ip(vlan1, 1)
})
- for offload in offloads:
+ if vlan1 == vlan2:
# These tests should pass
# Ping between same VLANs
- if vlan1 == vlan2:
+ for offload in offloads:
for state in ["off", "on"]:
# Offload setup
m1.run("ethtool -K %s %s %s" %
(m1.get_devname("eth1"),
@@ -131,22 +131,11 @@ for vlan1 in vlans:
m2.run(netperf_cli_udp6, timeout=70)
srv_proc.intr()
- # These tests should fail
- # Ping across different VLAN
- elif vlan1 != vlan2:
- for state in ["off", "on"]:
- # 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))
- m1.run("ethtool -K %s %s %s" %
(m1.get_devname("eth3"),
- offload, state))
- m2.run("ethtool -K %s %s %s" %
(m2.get_devname("eth1"),
- offload, state))
- # Ping test
- if ipv in [ 'ipv4', 'both' ]:
- m1.run(ping_mod, expect="fail")
+ # These tests should fail
+ # Ping across different VLAN
+ else:
+ if ipv in [ 'ipv4', 'both' ]:
+ m1.run(ping_mod, expect="fail")
- if ipv in [ 'ipv6', 'both' ]:
- m1.run(ping_mod6, expect="fail")
+ if ipv in [ 'ipv6', 'both' ]:
+ m1.run(ping_mod6, expect="fail")