From 6d95f8c983efc3da613cf591dc4070c3560a9d41 Mon Sep 17 00:00:00 2001 From: Tianyu Li Date: Fri, 25 Feb 2022 05:51:10 +0000 Subject: tests: fix test failure with parrallel test Several test cases re-use the same test class name, which leads to test error when do parrallel test with TEST_JOBS=16, change the test class names to unique values. Type: fix Signed-off-by: Tianyu Li Change-Id: Iefc01d40a25ebd60533baf3a2dc98a537437e8e9 --- test/test_ip6.py | 52 +++++++++++++++++----------------- test/test_ipip.py | 10 +++---- test/test_l2bd_learnlimit_bdenabled.py | 10 +++---- test/test_l2bd_learnlimit_enabled.py | 10 +++---- test/test_srv6_ad.py | 10 +++---- test/test_srv6_ad_flow.py | 10 +++---- test/test_srv6_as.py | 10 +++---- 7 files changed, 56 insertions(+), 56 deletions(-) (limited to 'test') diff --git a/test/test_ip6.py b/test/test_ip6.py index 2e972db5dd3..3c79496d991 100644 --- a/test/test_ip6.py +++ b/test/test_ip6.py @@ -1754,19 +1754,19 @@ class IPv6NDProxyTest(TestIPv6ND): self.assertTrue(rx[0].haslayer(ICMPv6ND_NS)) -class TestIPNull(VppTestCase): +class TestIP6Null(VppTestCase): """ IPv6 routes via NULL """ @classmethod def setUpClass(cls): - super(TestIPNull, cls).setUpClass() + super(TestIP6Null, cls).setUpClass() @classmethod def tearDownClass(cls): - super(TestIPNull, cls).tearDownClass() + super(TestIP6Null, cls).tearDownClass() def setUp(self): - super(TestIPNull, self).setUp() + super(TestIP6Null, self).setUp() # create 2 pg interfaces self.create_pg_interfaces(range(1)) @@ -1777,7 +1777,7 @@ class TestIPNull(VppTestCase): i.resolve_ndp() def tearDown(self): - super(TestIPNull, self).tearDown() + super(TestIP6Null, self).tearDown() for i in self.pg_interfaces: i.unconfig_ip6() i.admin_down() @@ -1835,19 +1835,19 @@ class TestIPNull(VppTestCase): self.assertEqual(icmp.code, 1) -class TestIPDisabled(VppTestCase): +class TestIP6Disabled(VppTestCase): """ IPv6 disabled """ @classmethod def setUpClass(cls): - super(TestIPDisabled, cls).setUpClass() + super(TestIP6Disabled, cls).setUpClass() @classmethod def tearDownClass(cls): - super(TestIPDisabled, cls).tearDownClass() + super(TestIP6Disabled, cls).tearDownClass() def setUp(self): - super(TestIPDisabled, self).setUp() + super(TestIP6Disabled, self).setUp() # create 2 pg interfaces self.create_pg_interfaces(range(2)) @@ -1861,7 +1861,7 @@ class TestIPDisabled(VppTestCase): self.pg1.admin_up() def tearDown(self): - super(TestIPDisabled, self).tearDown() + super(TestIP6Disabled, self).tearDown() for i in self.pg_interfaces: i.unconfig_ip4() i.admin_down() @@ -2440,19 +2440,19 @@ class TestIP6PuntHandoff(IP6PuntSetup, VppTestCase): ip_punt_redirect.remove_vpp_config() -class TestIPDeag(VppTestCase): +class TestIP6Deag(VppTestCase): """ IPv6 Deaggregate Routes """ @classmethod def setUpClass(cls): - super(TestIPDeag, cls).setUpClass() + super(TestIP6Deag, cls).setUpClass() @classmethod def tearDownClass(cls): - super(TestIPDeag, cls).tearDownClass() + super(TestIP6Deag, cls).tearDownClass() def setUp(self): - super(TestIPDeag, self).setUp() + super(TestIP6Deag, self).setUp() self.create_pg_interfaces(range(3)) @@ -2462,7 +2462,7 @@ class TestIPDeag(VppTestCase): i.resolve_ndp() def tearDown(self): - super(TestIPDeag, self).tearDown() + super(TestIP6Deag, self).tearDown() for i in self.pg_interfaces: i.unconfig_ip6() i.admin_down() @@ -2659,19 +2659,19 @@ class TestIP6Input(VppTestCase): self.pg_start() -class TestIPReplace(VppTestCase): +class TestIP6Replace(VppTestCase): """ IPv6 Table Replace """ @classmethod def setUpClass(cls): - super(TestIPReplace, cls).setUpClass() + super(TestIP6Replace, cls).setUpClass() @classmethod def tearDownClass(cls): - super(TestIPReplace, cls).tearDownClass() + super(TestIP6Replace, cls).tearDownClass() def setUp(self): - super(TestIPReplace, self).setUp() + super(TestIP6Replace, self).setUp() self.create_pg_interfaces(range(4)) @@ -2687,7 +2687,7 @@ class TestIPReplace(VppTestCase): table_id += 1 def tearDown(self): - super(TestIPReplace, self).tearDown() + super(TestIP6Replace, self).tearDown() for i in self.pg_interfaces: i.admin_down() i.unconfig_ip6() @@ -2800,19 +2800,19 @@ class TestIPReplace(VppTestCase): self.assertEqual(len(t.mdump()), 5) -class TestIP6Replace(VppTestCase): - """ IPv4 Interface Address Replace """ +class TestIP6AddrReplace(VppTestCase): + """ IPv6 Interface Address Replace """ @classmethod def setUpClass(cls): - super(TestIP6Replace, cls).setUpClass() + super(TestIP6AddrReplace, cls).setUpClass() @classmethod def tearDownClass(cls): - super(TestIP6Replace, cls).tearDownClass() + super(TestIP6AddrReplace, cls).tearDownClass() def setUp(self): - super(TestIP6Replace, self).setUp() + super(TestIP6AddrReplace, self).setUp() self.create_pg_interfaces(range(4)) @@ -2820,7 +2820,7 @@ class TestIP6Replace(VppTestCase): i.admin_up() def tearDown(self): - super(TestIP6Replace, self).tearDown() + super(TestIP6AddrReplace, self).tearDown() for i in self.pg_interfaces: i.admin_down() diff --git a/test/test_ipip.py b/test/test_ipip.py index 8e16c80f05f..b1ea57d7e12 100644 --- a/test/test_ipip.py +++ b/test/test_ipip.py @@ -1222,21 +1222,21 @@ class TestIPIP6(VppTestCase): return 'x' * len -class TestMPLS(VppTestCase): +class TestIPIPMPLS(VppTestCase): """ MPLS Test Case """ @classmethod def setUpClass(cls): - super(TestMPLS, cls).setUpClass() + super(TestIPIPMPLS, cls).setUpClass() cls.create_pg_interfaces(range(2)) cls.interfaces = list(cls.pg_interfaces) @classmethod def tearDownClass(cls): - super(TestMPLS, cls).tearDownClass() + super(TestIPIPMPLS, cls).tearDownClass() def setUp(self): - super(TestMPLS, self).setUp() + super(TestIPIPMPLS, self).setUp() for i in self.interfaces: i.admin_up() i.config_ip4() @@ -1246,7 +1246,7 @@ class TestMPLS(VppTestCase): i.resolve_ndp() def tearDown(self): - super(TestMPLS, self).tearDown() + super(TestIPIPMPLS, self).tearDown() for i in self.pg_interfaces: i.unconfig_ip4() diff --git a/test/test_l2bd_learnlimit_bdenabled.py b/test/test_l2bd_learnlimit_bdenabled.py index fdbc3507eeb..63dc5d10542 100644 --- a/test/test_l2bd_learnlimit_bdenabled.py +++ b/test/test_l2bd_learnlimit_bdenabled.py @@ -11,17 +11,17 @@ from framework import VppTestCase, VppTestRunner from util import Host, ppp -class TestL2LearnLimit(VppTestCase): +class TestL2LearnLimitBdEnable(VppTestCase): """ L2 Bridge Domain Learn limit Test Case """ @classmethod def setUpClass(self): - super(TestL2LearnLimit, self).setUpClass() + super(TestL2LearnLimitBdEnable, self).setUpClass() self.create_pg_interfaces(range(3)) @classmethod def tearDownClass(cls): - super(TestL2LearnLimit, cls).tearDownClass() + super(TestL2LearnLimitBdEnable, cls).tearDownClass() def create_hosts(self, pg_if, n_hosts_per_if, subnet): """ @@ -97,7 +97,7 @@ class TestL2LearnLimit(VppTestCase): self.vapi.bridge_domain_add_del(is_add=0, bd_id=3) def setUp(self): - super(TestL2LearnLimit, self).setUp() + super(TestL2LearnLimitBdEnable, self).setUp() self.vapi.bridge_domain_add_del(bd_id=1) self.vapi.bridge_domain_add_del(bd_id=2) @@ -108,7 +108,7 @@ class TestL2LearnLimit(VppTestCase): self.pg_interfaces[1].sw_if_index, bd_id=2) def tearDown(self): - super(TestL2LearnLimit, self).tearDown() + super(TestL2LearnLimitBdEnable, self).tearDown() self.vapi.sw_interface_set_l2_bridge( rx_sw_if_index=self.pg_interfaces[0].sw_if_index, bd_id=1, enable=0) diff --git a/test/test_l2bd_learnlimit_enabled.py b/test/test_l2bd_learnlimit_enabled.py index 906ae14b0bf..5fcd54cb8f2 100644 --- a/test/test_l2bd_learnlimit_enabled.py +++ b/test/test_l2bd_learnlimit_enabled.py @@ -11,17 +11,17 @@ from framework import VppTestCase, VppTestRunner from util import Host, ppp -class TestL2LearnLimit(VppTestCase): +class TestL2LearnLimitEnable(VppTestCase): """ L2 Global Learn limit Test Case """ @classmethod def setUpClass(self): - super(TestL2LearnLimit, self).setUpClass() + super(TestL2LearnLimitEnable, self).setUpClass() self.create_pg_interfaces(range(3)) @classmethod def tearDownClass(cls): - super(TestL2LearnLimit, cls).tearDownClass() + super(TestL2LearnLimitEnable, cls).tearDownClass() def create_hosts(self, pg_if, n_hosts_per_if, subnet): """ @@ -85,7 +85,7 @@ class TestL2LearnLimit(VppTestCase): self.assertEqual(len(lfs2), 0) def setUp(self): - super(TestL2LearnLimit, self).setUp() + super(TestL2LearnLimitEnable, self).setUp() self.vapi.bridge_domain_add_del(bd_id=1) self.vapi.bridge_domain_add_del(bd_id=2) @@ -96,7 +96,7 @@ class TestL2LearnLimit(VppTestCase): self.pg_interfaces[1].sw_if_index, bd_id=2) def tearDown(self): - super(TestL2LearnLimit, self).tearDown() + super(TestL2LearnLimitEnable, self).tearDown() self.vapi.sw_interface_set_l2_bridge( rx_sw_if_index=self.pg_interfaces[0].sw_if_index, bd_id=1, enable=0) diff --git a/test/test_srv6_ad.py b/test/test_srv6_ad.py index 2627df32aa9..dad7c186a93 100644 --- a/test/test_srv6_ad.py +++ b/test/test_srv6_ad.py @@ -19,21 +19,21 @@ from scapy.layers.inet import IP, UDP from util import ppp -class TestSRv6(VppTestCase): +class TestSRv6Ad(VppTestCase): """ SRv6 Dynamic Proxy plugin Test Case """ @classmethod def setUpClass(self): - super(TestSRv6, self).setUpClass() + super(TestSRv6Ad, self).setUpClass() @classmethod def tearDownClass(cls): - super(TestSRv6, cls).tearDownClass() + super(TestSRv6Ad, cls).tearDownClass() def setUp(self): """ Perform test setup before each test case. """ - super(TestSRv6, self).setUp() + super(TestSRv6Ad, self).setUp() # packet sizes, inclusive L2 overhead self.pg_packet_sizes = [64, 512, 1518, 9018] @@ -46,7 +46,7 @@ class TestSRv6(VppTestCase): """ self.teardown_interfaces() - super(TestSRv6, self).tearDown() + super(TestSRv6Ad, self).tearDown() def configure_interface(self, interface, diff --git a/test/test_srv6_ad_flow.py b/test/test_srv6_ad_flow.py index f5452089a79..6b4ec19a31b 100644 --- a/test/test_srv6_ad_flow.py +++ b/test/test_srv6_ad_flow.py @@ -17,21 +17,21 @@ from scapy.layers.inet import IP, UDP from util import ppp -class TestSRv6(VppTestCase): +class TestSRv6AdFlow(VppTestCase): """ SRv6 Flow-based Dynamic Proxy plugin Test Case """ @classmethod def setUpClass(self): - super(TestSRv6, self).setUpClass() + super(TestSRv6AdFlow, self).setUpClass() @classmethod def tearDownClass(cls): - super(TestSRv6, cls).tearDownClass() + super(TestSRv6AdFlow, cls).tearDownClass() def setUp(self): """ Perform test setup before each test case. """ - super(TestSRv6, self).setUp() + super(TestSRv6AdFlow, self).setUp() # packet sizes, inclusive L2 overhead self.pg_packet_sizes = [64, 512, 1518, 9018] @@ -44,7 +44,7 @@ class TestSRv6(VppTestCase): """ self.teardown_interfaces() - super(TestSRv6, self).tearDown() + super(TestSRv6AdFlow, self).tearDown() def configure_interface(self, interface, diff --git a/test/test_srv6_as.py b/test/test_srv6_as.py index eec44e31ee5..947633e7fab 100644 --- a/test/test_srv6_as.py +++ b/test/test_srv6_as.py @@ -18,21 +18,21 @@ from scapy.layers.inet import IP, UDP from util import ppp -class TestSRv6(VppTestCase): +class TestSRv6As(VppTestCase): """ SRv6 Static Proxy plugin Test Case """ @classmethod def setUpClass(self): - super(TestSRv6, self).setUpClass() + super(TestSRv6As, self).setUpClass() @classmethod def tearDownClass(cls): - super(TestSRv6, cls).tearDownClass() + super(TestSRv6As, cls).tearDownClass() def setUp(self): """ Perform test setup before each test case. """ - super(TestSRv6, self).setUp() + super(TestSRv6As, self).setUp() # packet sizes, inclusive L2 overhead self.pg_packet_sizes = [64, 512, 1518, 9018] @@ -45,7 +45,7 @@ class TestSRv6(VppTestCase): """ self.teardown_interfaces() - super(TestSRv6, self).tearDown() + super(TestSRv6As, self).tearDown() def configure_interface(self, interface, -- cgit 1.2.3-korg