X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_bond.py;h=27da15c5ab5148ad56bd4dcbdfa7fecd8610e5be;hb=6ed154f779c765f38b61ed84349bd539287dd02b;hp=eb43281719e2b5d6d84710cafa027bcb2e7591ae;hpb=e63325e3ca03c847963863446345e6c80a2c0cfd;p=vpp.git diff --git a/test/test_bond.py b/test/test_bond.py index eb43281719e..27da15c5ab5 100644 --- a/test/test_bond.py +++ b/test/test_bond.py @@ -32,13 +32,18 @@ class TestBondInterface(VppTestCase): for i in cls.pg_interfaces: i.admin_up() + @classmethod + def tearDownClass(cls): + super(TestBondInterface, cls).tearDownClass() + def setUp(self): super(TestBondInterface, self).setUp() def tearDown(self): super(TestBondInterface, self).tearDown() - if not self.vpp_dead: - self.logger.info(self.vapi.ppcli("show interface")) + + def show_commands_at_teardown(self): + self.logger.info(self.vapi.ppcli("show interface")) def test_bond_traffic(self): """ Bond traffic test """ @@ -61,6 +66,7 @@ class TestBondInterface(VppTestCase): bond0 = VppBondInterface(self, mode=3, lb=1, + numa_only=0, use_custom_mac=1, mac_address=mac) bond0.add_vpp_config() @@ -80,13 +86,9 @@ class TestBondInterface(VppTestCase): # enslave pg0 and pg1 to BondEthernet0 self.logger.info("bond enslave interface pg0 to BondEthernet0") - bond0.enslave_vpp_bond_interface(sw_if_index=self.pg0.sw_if_index, - is_passive=0, - is_long_timeout=0) + bond0.enslave_vpp_bond_interface(sw_if_index=self.pg0.sw_if_index) self.logger.info("bond enslave interface pg1 to BondEthernet0") - bond0.enslave_vpp_bond_interface(sw_if_index=self.pg1.sw_if_index, - is_passive=0, - is_long_timeout=0) + bond0.enslave_vpp_bond_interface(sw_if_index=self.pg1.sw_if_index) # verify both slaves in BondEthernet0 if_dump = self.vapi.sw_interface_slave_dump(bond0.sw_if_index) @@ -270,5 +272,6 @@ class TestBondInterface(VppTestCase): if_dump = self.vapi.sw_interface_bond_dump() self.assertFalse(bond0.is_interface_config_in_dump(if_dump)) + if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)