Best Python code snippet using lisa_python
dpdksuite.py
Source:dpdksuite.py
...505 def verify_dpdk_send_receive_failsafe(506 self, environment: Environment, log: Logger, variables: Dict[str, Any]507 ) -> None:508 try:509 verify_dpdk_send_receive(environment, log, variables, "failsafe")510 except UnsupportedPackageVersionException as err:511 raise SkippedException(err)512 @TestCaseMetadata(513 description="""514 Tests a basic sender/receiver setup for direct netvsc pmd setup.515 Sender sends the packets, receiver receives them.516 We check both to make sure the received traffic is within the expected517 order-of-magnitude.518 """,519 priority=2,520 requirement=simple_requirement(521 min_core_count=8,522 min_nic_count=2,523 network_interface=Sriov(),524 min_count=2,525 unsupported_features=[Gpu, Infiniband],526 supported_features=[IsolatedResource],527 ),528 )529 def verify_dpdk_send_receive_netvsc(530 self, environment: Environment, log: Logger, variables: Dict[str, Any]531 ) -> None:532 try:533 verify_dpdk_send_receive(environment, log, variables, "netvsc")534 except UnsupportedPackageVersionException as err:535 raise SkippedException(err)536 @TestCaseMetadata(537 description="""538 UIO basic functionality test.539 - Bind interface to uio_hv_generic540 - check that sysfs entry is created541 - unbind542 - check that the driver is unloaded.543 - rebind to original driver544 """,545 priority=2,546 requirement=simple_requirement(547 min_nic_count=2,...
dpdkutil.py
Source:dpdkutil.py
...349 )350 assert_that(tx_pps).described_as(351 f"TX-PPS ({tx_pps}) should have been greater than 2^20 (~1m) PPS."352 ).is_greater_than(2**20)353def verify_dpdk_send_receive(354 environment: Environment,355 log: Logger,356 variables: Dict[str, Any],357 pmd: str,358 use_max_nics: bool = False,359 use_service_cores: int = 1,360) -> Tuple[DpdkTestResources, DpdkTestResources]:361 # helpful to have the public ips labeled for debugging362 external_ips = []363 for node in environment.nodes.list():364 if isinstance(node, RemoteNode):365 external_ips += node.connection_info[366 constants.ENVIRONMENTS_NODES_REMOTE_ADDRESS367 ]...
dpdkperf.py
Source:dpdkperf.py
...330 use_max_nics=use_max_nics,331 use_service_cores=service_cores,332 )333 else:334 send_kit, receive_kit = verify_dpdk_send_receive(335 environment,336 log,337 variables,338 pmd,339 use_max_nics=use_max_nics,340 use_service_cores=service_cores,341 )342 except UnsupportedPackageVersionException as err:343 raise SkippedException(err)344 # gather the performance data into message format345 result_messages = self._create_pps_performance_results(346 send_kit, receive_kit, test_result, f"perf_dpdk_{pmd}"347 )348 # pass result messages to notifier...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!