(
self,
traffic_type=0,
ip_type=0,
proto=-1,
ports=0,
frags=False,
pkt_raw=True,
etype=-1,
)
| 447 | self.pg_start() |
| 448 | |
| 449 | def run_verify_test( |
| 450 | self, |
| 451 | traffic_type=0, |
| 452 | ip_type=0, |
| 453 | proto=-1, |
| 454 | ports=0, |
| 455 | frags=False, |
| 456 | pkt_raw=True, |
| 457 | etype=-1, |
| 458 | ): |
| 459 | # Test |
| 460 | # Create incoming packet streams for packet-generator interfaces |
| 461 | pkts_cnt = 0 |
| 462 | for i in self.pg_interfaces: |
| 463 | if self.flows.__contains__(i): |
| 464 | pkts = self.create_stream( |
| 465 | i, |
| 466 | self.pg_if_packet_sizes, |
| 467 | traffic_type, |
| 468 | ip_type, |
| 469 | proto, |
| 470 | ports, |
| 471 | frags, |
| 472 | pkt_raw, |
| 473 | etype, |
| 474 | ) |
| 475 | if len(pkts) > 0: |
| 476 | i.add_stream(pkts) |
| 477 | pkts_cnt += len(pkts) |
| 478 | |
| 479 | # Enable packet capture and start packet sendingself.IPV |
| 480 | self.pg_enable_capture(self.pg_interfaces) |
| 481 | self.pg_start() |
| 482 | self.logger.info("sent packets count: %d" % pkts_cnt) |
| 483 | |
| 484 | # Verify |
| 485 | # Verify outgoing packet streams per packet-generator interface |
| 486 | for src_if in self.pg_interfaces: |
| 487 | if self.flows.__contains__(src_if): |
| 488 | for dst_if in self.flows[src_if]: |
| 489 | capture = dst_if.get_capture(pkts_cnt) |
| 490 | self.logger.info("Verifying capture on interface %s" % dst_if.name) |
| 491 | self.verify_capture(dst_if, capture, traffic_type, ip_type, etype) |
| 492 | |
| 493 | def run_verify_negat_test( |
| 494 | self, traffic_type=0, ip_type=0, proto=-1, ports=0, frags=False, etype=-1 |
no test coverage detected