X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_l2bd_arp_term.py;h=e72a42e1165ec60b2b6f7bb87fa24c0a159faf39;hb=ead1e536d66d83b546528c32e2112085a97c8e13;hp=9a14d1db55e533160963355c237e866718c18d3e;hpb=7f9b7f9f492d1748d8ba025b3a713058fdb1943d;p=vpp.git diff --git a/test/test_l2bd_arp_term.py b/test/test_l2bd_arp_term.py index 9a14d1db55e..e72a42e1165 100644 --- a/test/test_l2bd_arp_term.py +++ b/test/test_l2bd_arp_term.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ L2BD ARP term Test """ import unittest @@ -67,15 +67,22 @@ class TestL2bdArpTerm(VppTestCase): Show various debug prints after each test. """ super(TestL2bdArpTerm, self).tearDown() - if not self.vpp_dead: - self.logger.info(self.vapi.ppcli("show l2fib verbose")) + + def show_commands_at_teardown(self): + self.logger.info(self.vapi.ppcli("show l2fib verbose")) + # many tests delete bridge-domain 1 as the last task. don't output + # the details of a non-existent bridge-domain. + if self.vapi.l2_fib_table_dump(bd_id=1): self.logger.info(self.vapi.ppcli("show bridge-domain 1 detail")) def add_del_arp_term_hosts(self, entries, bd_id=1, is_add=1, is_ipv6=0): for e in entries: ip = e.ip4 if is_ipv6 == 0 else e.ip6 - self.vapi.bd_ip_mac_add_del(bd_id=bd_id, is_add=is_add, ip=ip, - mac=e.mac) + self.vapi.bd_ip_mac_add_del(is_add=is_add, + entry={ + 'bd_id': bd_id, + 'ip': ip, + 'mac': e.mac}) @classmethod def mac_list(cls, b6_range): @@ -460,7 +467,7 @@ class TestL2bdArpTerm(VppTestCase): """ L2BD ND term - send duplicate ns, verify suppression """ dst_host = self.ip6_host(50, 50, "00:00:11:22:33:44") - macs = self.mac_list(range(10, 11)) + macs = self.mac_list(range(16, 17)) hosts = self.ip6_hosts(5, 1, macs) reqs = self.ns_reqs_dst(hosts, dst_host) * 5 self.bd_swifs(1)[0].add_stream(reqs)