From ea87ba4b0be72df958166bdf8d9d5116f60bc68e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 3 Jan 2021 11:09:04 +0100 Subject: Partial Revert "interfaces: T3114: Fix VLAN-aware bridge setting failure" This reverts parts of commit c4048b2047f693436b38196632cddf65beb67a86 because when tear-downing config session entire interface paths are removed with non test related interface (all dummy interfaces) this breaks e.g. remote connections when connected to one of the dummy interface IP addresses for management. --- smoketest/scripts/cli/test_interfaces_bridge.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/smoketest/scripts/cli/test_interfaces_bridge.py b/smoketest/scripts/cli/test_interfaces_bridge.py index 04a117edf..21800e508 100755 --- a/smoketest/scripts/cli/test_interfaces_bridge.py +++ b/smoketest/scripts/cli/test_interfaces_bridge.py @@ -46,20 +46,10 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest): if not '.' in tmp: self._members.append(tmp) - self.session.set(['interfaces','dummy','dum0']) - self.session.set(['interfaces','dummy','dum1']) - self.session.set(['interfaces','bonding','bond1','member','interface','dum0']) - self.session.set(['interfaces','bonding','bond1','member','interface','dum1']) - self._members.append('bond1') - self._options['br0'] = [] for member in self._members: self._options['br0'].append(f'member interface {member}') - def tearDown(self): - self.session.delete(['interfaces','bonding']) - self.session.delete(['interfaces','dummy']) - super().tearDown() def test_add_remove_bridge_member(self): # Add member interfaces to bridge and set STP cost/priority @@ -123,14 +113,10 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest): self.assertEqual(int(flags), 1) # Execute the program to obtain status information - json_data = cmd('bridge -j vlan show', shell=True) - vlan_filter_status = None - vlan_filter_status = json.loads(json_data) - if vlan_filter_status is not None: for interface_status in vlan_filter_status: ifname = interface_status['ifname'] @@ -164,11 +150,7 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest): else: self.assertTrue(False) - - - # check member interfaces are added on the bridge - for interface in self._interfaces: bridge_members = [] for tmp in glob(f'/sys/class/net/{interface}/lower_*'): @@ -205,7 +187,6 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest): self.session.delete(['interfaces', 'ethernet', 'eth0', 'vif', '400']) self.session.commit() - if __name__ == '__main__': unittest.main(verbosity=2) -- cgit v1.2.3