The current implementation of the vlan isolation test is not accurate.
In particular for the VlansRecipe, VlansOverBondRecipe and VlansOverTeamRecipe,
where under certain conditions (e.g. rp_filter=2 or IPv6) the vlans are
expected to be reachable.
Before we find a better way to test this I removed the relevant PingEndpoints
in these tests.
I kept the similar test in virtual tests because in these topologies
the test makes sense. The virtual guests are isolated at the hypervisor
level and must not be be able to access the other network.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Recipes/ENRT/VlansOverBondRecipe.py | 10 ++++------
lnst/Recipes/ENRT/VlansOverTeamRecipe.py | 10 ++++------
lnst/Recipes/ENRT/VlansRecipe.py | 21 +++++++++------------
3 files changed, 17 insertions(+), 24 deletions(-)
diff --git a/lnst/Recipes/ENRT/VlansOverBondRecipe.py
b/lnst/Recipes/ENRT/VlansOverBondRecipe.py
index 45c3e185..7ca8d63d 100644
--- a/lnst/Recipes/ENRT/VlansOverBondRecipe.py
+++ b/lnst/Recipes/ENRT/VlansOverBondRecipe.py
@@ -129,12 +129,10 @@ class VlansOverBondRecipe(VlanPingEvaluatorMixin,
def generate_ping_endpoints(self, config):
host1, host2 = self.matched.host1, self.matched.host2
- result = []
- for src in [host1.vlan0, host1.vlan1, host1.vlan2]:
- for dst in [host2.vlan0, host2.vlan1, host2.vlan2]:
- result += [PingEndpoints(src, dst,
- reachable=(src.vlan_id == dst.vlan_id))]
- return result
+
+ return [PingEndpoints(host1.vlan0, host2.vlan0),
+ PingEndpoints(host1.vlan1, host2.vlan1),
+ PingEndpoints(host1.vlan2, host2.vlan2)]
def generate_perf_endpoints(self, config):
return [(self.matched.host1.vlan0, self.matched.host2.vlan0)]
diff --git a/lnst/Recipes/ENRT/VlansOverTeamRecipe.py
b/lnst/Recipes/ENRT/VlansOverTeamRecipe.py
index 5ef430bf..cc00c3cd 100644
--- a/lnst/Recipes/ENRT/VlansOverTeamRecipe.py
+++ b/lnst/Recipes/ENRT/VlansOverTeamRecipe.py
@@ -127,12 +127,10 @@ class VlansOverTeamRecipe(VlanPingEvaluatorMixin,
def generate_ping_endpoints(self, config):
host1, host2 = self.matched.host1, self.matched.host2
- result = []
- for src in [host1.vlan0, host1.vlan1, host1.vlan2]:
- for dst in [host2.vlan0, host2.vlan1, host2.vlan2]:
- result += [PingEndpoints(src, dst,
- reachable=(src.vlan_id == dst.vlan_id))]
- return result
+
+ return [PingEndpoints(host1.vlan0, host2.vlan0),
+ PingEndpoints(host1.vlan1, host2.vlan1),
+ PingEndpoints(host1.vlan2, host2.vlan2)]
def generate_perf_endpoints(self, config):
return [(self.matched.host1.vlan0, self.matched.host2.vlan0)]
diff --git a/lnst/Recipes/ENRT/VlansRecipe.py b/lnst/Recipes/ENRT/VlansRecipe.py
index eef60ef1..1f822451 100644
--- a/lnst/Recipes/ENRT/VlansRecipe.py
+++ b/lnst/Recipes/ENRT/VlansRecipe.py
@@ -145,22 +145,19 @@ class VlansRecipe(VlanPingEvaluatorMixin,
def generate_ping_endpoints(self, config):
"""
- The ping endpoints for this recipe are all combinations of the VLAN
- tunnel endpoints of the hosts. Depending on the VLAN id match of each
- tunnel endpoint combination the *reachable* flag is set.
+ The ping endpoints for this recipe are the matching VLAN tunnel
+ endpoints of the hosts.
Returned as::
-
- # list of PingEndpoints with the following pattern
- [PingEndpoints(src, dst, reachable=(src.vlan_id == dst.vlan_id)), ...]
+ [PingEndpoints(host1.vlan0, host2.vlan0),
+ PingEndpoints(host1.vlan1, host2.vlan1),
+ PingEndpoints(host1.vlan2, host2.vlan2)]
"""
host1, host2 = self.matched.host1, self.matched.host2
- result = []
- for src in [host1.vlan0, host1.vlan1, host1.vlan2]:
- for dst in [host2.vlan0, host2.vlan1, host2.vlan2]:
- result += [PingEndpoints(src, dst,
- reachable=(src.vlan_id == dst.vlan_id))]
- return result
+
+ return [PingEndpoints(host1.vlan0, host2.vlan0),
+ PingEndpoints(host1.vlan1, host2.vlan1),
+ PingEndpoints(host1.vlan2, host2.vlan2)]
def generate_perf_endpoints(self, config):
"""
--
2.21.1