summaryrefslogtreecommitdiffstats
path: root/test/test_span.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_span.py')
-rw-r--r--test/test_span.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/test_span.py b/test/test_span.py
index e42fbd77be9..41507092259 100644
--- a/test/test_span.py
+++ b/test/test_span.py
@@ -85,8 +85,7 @@ class TestSpan(VppTestCase):
pkts = []
for i in range(0, TestSpan.pkts_per_burst):
dst_if = self.flows[src_if][0]
- pkt_info = self.create_packet_info(
- src_if.sw_if_index, dst_if.sw_if_index)
+ pkt_info = self.create_packet_info(src_if, dst_if)
payload = self.info_to_payload(pkt_info)
p = (Ether(dst=src_if.local_mac, src=src_if.remote_mac) /
IP(src=src_if.remote_ip4, dst=dst_if.remote_ip4) /
@@ -184,9 +183,11 @@ class TestSpan(VppTestCase):
# Verify packets outgoing packet streams on mirrored interface (pg2)
self.logger.info("Verifying capture on interfaces %s and %s" %
(self.pg1.name, self.pg2.name))
- self.verify_capture(self.pg1,
- self.pg1.get_capture(),
- self.pg2.get_capture())
+ pg2_expected = self.get_packet_count_for_if_idx(self.pg1.sw_if_index)
+ self.verify_capture(
+ self.pg1,
+ self.pg1.get_capture(),
+ self.pg2.get_capture(pg2_expected))
if __name__ == '__main__':