vlib: add virtual time support

Type: feature

Change-Id: Iabd76558e9c72ed8286cfeeb1fbaa4fde4832a90
Signed-off-by: Benoît Ganne <bganne@cisco.com>
This commit is contained in:
Benoît Ganne
2021-08-20 09:18:31 +02:00
committed by Damjan Marion
parent f33979ba88
commit 56eccdbaa9
14 changed files with 157 additions and 75 deletions
+3 -4
View File
@@ -486,7 +486,7 @@ class TestL2fib(VppTestCase):
self.vapi.want_l2_macs_events()
self.learn_hosts(bd1, hosts)
self.sleep(1)
self.virtual_sleep(1)
self.logger.info(self.vapi.ppcli("show l2fib"))
evs = self.vapi.collect_events()
action = VppEnum.vl_api_mac_event_action_t.MAC_EVENT_ACTION_API_ADD
@@ -509,7 +509,7 @@ class TestL2fib(VppTestCase):
self.sleep(1)
self.learn_hosts(bd1, hosts)
self.sleep(1)
self.virtual_sleep(1)
self.logger.info(self.vapi.ppcli("show l2fib"))
evs = self.vapi.collect_events()
action = VppEnum.vl_api_mac_event_action_t.MAC_EVENT_ACTION_API_ADD
@@ -560,7 +560,7 @@ class TestL2fib(VppTestCase):
self.sleep(1)
self.learn_hosts(bd1, hosts)
self.sleep(1)
self.virtual_sleep(1)
self.logger.info(self.vapi.ppcli("show l2fib"))
evs = self.vapi.collect_events()
self.vapi.want_l2_macs_events2(enable_disable=0)
@@ -577,6 +577,5 @@ class TestL2fib(VppTestCase):
self.assertLess(len(e), ev_macs * 10)
self.assertEqual(len(learned_macs ^ macs), 0)
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)