From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6DC1842E9B for ; Mon, 17 Jul 2023 13:31:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 683DC410D7; Mon, 17 Jul 2023 13:31:04 +0200 (CEST) Received: from mail-pl1-f228.google.com (mail-pl1-f228.google.com [209.85.214.228]) by mails.dpdk.org (Postfix) with ESMTP id F1B16410D7 for ; Mon, 17 Jul 2023 13:31:02 +0200 (CEST) Received: by mail-pl1-f228.google.com with SMTP id d9443c01a7336-1bb119be881so28179625ad.3 for ; Mon, 17 Jul 2023 04:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1689593462; x=1692185462; h=cc:to:from:subject:message-id:date:from:to:cc:subject:date :message-id:reply-to; bh=Kom4b5VEbPHwwqHw+vafI4s/uPqNXrWba+XKgYeM368=; b=frdI6pWxfCvF4DLAi83uK4Bdf6ym/HzKOICyNRPk3Ob+pmBh1MZzEAECX902gY1gGC YZ/Z5UkxJnNkfKZ31O4FgUe5OTB3Zn+veHYUQFc6SSz59vA9CE4WaDHTDmesgc+I5AJr It38JnQ7Qxsd/NIXeEsVUeDCcFDXyEdplTf9M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689593462; x=1692185462; h=cc:to:from:subject:message-id:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kom4b5VEbPHwwqHw+vafI4s/uPqNXrWba+XKgYeM368=; b=fs7L89p9Ju4697To2tlorEbZ7KTGNR1J7sVvbCFu8QaN+PJB2bmFn9p0vqCX/PspTk MyeUepRXR7AfKWPSSE6wRLG2Ga7EAkHAqqNSQ1hRtPgtuskN/+6nqEVpjjvVtv2AVfpQ KxO2M3wuEeFO74rzFLh5KgT5EZUiMiDAj8WfiCTQ19/pkoD/SAeZasPJ0BAWb8WqOOmE b23mq8RskBrylOMZnSpN44JpJntZmuBaA2Lvr1J15q0FdjDPqueh1op4YxK4rKQXXUSU vP2RVORYUFDLU5kOYAlhoHY/l6QAdh2kfNsHfKN2LXMnPnKafRIWmZEsXyENgvQC8zON t7DQ== X-Gm-Message-State: ABy/qLbbEtZ3EBAo4qKGwYlZfNBSWXZFT5+3LdcnKxjTX3DNRJRQqgdJ dYijMbeEYAI7x0g+iuMWAkeL1ym1g7ra3ZffITU4NxcH/ja5al9sRFiA7w== X-Google-Smtp-Source: APBJJlF+jh6ewZ4UuYG0b7TOCkaGGfnfkANXjrOMLOYqNfjWUWnm+v66BGIYtf2GYIHrDukIKr67AsFhfP9+ X-Received: by 2002:a17:902:c3c6:b0:1b8:1c9e:444e with SMTP id j6-20020a170902c3c600b001b81c9e444emr11963138plj.25.1689593462170; Mon, 17 Jul 2023 04:31:02 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id ij9-20020a170902ab4900b001b8bd585f69sm1525923plb.30.2023.07.17.04.31.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2023 04:31:02 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Date: Mon, 17 Jul 2023 04:31:02 -0700 (PDT) Message-ID: <64b52676.170a0220.198b4.626bSMTPIN_ADDED_MISSING@mx.google.com> Received: from [172.21.0.2] (unknown [172.18.0.240]) by postal.iol.unh.edu (Postfix) with ESMTP id 6F7AE605246B; Mon, 17 Jul 2023 07:31:01 -0400 (EDT) Subject: |WARNING| pw129572-129577 [PATCH] [v2, 6/6] dts: add basic UDP test case From: dpdklab@iol.unh.edu To: test-report@dpdk.org Cc: dpdk-test-reports@iol.unh.edu Content-Type: text/plain X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: test-report-bounces@dpdk.org Test-Label: iol-testing Test-Status: WARNING http://dpdk.org/patch/129572 _apply patch failure_ Submitter: Juraj Linkes Date: Monday, July 17 2023 11:07:09 Applied on: CommitID:655eb37b18b1b0dc4d106acdf0dfedde01cfb224 Apply patch set 129572-129577 failed: Checking patch dts/conf.yaml... error: while searching for: skip_smoke_tests: false # optional flag that allow you to skip smoke tests test_suites: - hello_world system_under_test: node_name: "SUT 1" vdevs: # optional; if removed, vdevs won't be used in the execution - "crypto_openssl" nodes: - name: "SUT 1" hostname: sut1.change.me.localhost error: patch failed: dts/conf.yaml:13 error: while searching for: os_driver: i40e peer_node: "TG 1" peer_pci: "0000:00:08.1" error: patch failed: dts/conf.yaml:40 Checking patch dts/framework/config/__init__.py... error: while searching for: from dataclasses import dataclass from enum import Enum, auto, unique from pathlib import PurePath from typing import Any, TypedDict import warlock # type: ignore import yaml error: patch failed: dts/framework/config/__init__.py:13 Hunk #2 succeeded at 54 (offset -1 lines). error: while searching for: def from_dict(node: str, d: dict) -> "PortConfig": return PortConfig(node=node, **d) @dataclass(slots=True, frozen=True) class NodeConfiguration: error: patch failed: dts/framework/config/__init__.py:79 error: while searching for: os: OS lcores: str use_first_core: bool memory_channels: int hugepages: HugepageConfiguration | None ports: list[PortConfig] @staticmethod def from_dict(d: dict) -> "NodeConfiguration": hugepage_config = d.get("hugepages") if hugepage_config: if "force_first_numa" not in hugepage_config: hugepage_config["force_first_numa"] = False hugepage_config = HugepageConfiguration(**hugepage_config) common_config = { "name": d["name"], "hostname": d["hostname"], error: patch failed: dts/framework/config/__init__.py:90 error: while searching for: "os": OS(d["os"]), "lcores": d.get("lcores", "1"), "use_first_core": d.get("use_first_core", False), "memory_channels": d.get("memory_channels", 1), "hugepages": hugepage_config, "ports": [PortConfig.from_dict(d["name"], port) for port in d["ports"]], } return NodeConfiguration(**common_config) @dataclass(slots=True, frozen=True) error: patch failed: dts/framework/config/__init__.py:110 error: while searching for: perf: bool func: bool test_suites: list[TestSuiteConfig] system_under_test: NodeConfiguration vdevs: list[str] skip_smoke_tests: bool @staticmethod def from_dict(d: dict, node_map: dict) -> "ExecutionConfiguration": build_targets: list[BuildTargetConfiguration] = list( map(BuildTargetConfiguration.from_dict, d["build_targets"]) ) test_suites: list[TestSuiteConfig] = list( map(TestSuiteConfig.from_dict, d["test_suites"]) ) sut_name = d["system_under_test"]["node_name"] skip_smoke_tests = d.get("skip_smoke_tests", False) assert sut_name in node_map, f"Unknown SUT {sut_name} in execution {d}" vdevs = ( d["system_under_test"]["vdevs"] if "vdevs" in d["system_under_test"] else [] ) return ExecutionConfiguration( build_targets=build_targets, error: patch failed: dts/framework/config/__init__.py:194 error: while searching for: func=d["func"], skip_smoke_tests=skip_smoke_tests, test_suites=test_suites, system_under_test=node_map[sut_name], vdevs=vdevs, ) error: patch failed: dts/framework/config/__init__.py:218 Hunk #8 succeeded at 182 (offset -112 lines). Checking patch dts/framework/config/conf_yaml_schema.json... error: while searching for: "amount" ] }, "pci_address": { "type": "string", "pattern": "^[\\da-fA-F]{4}:[\\da-fA-F]{2}:[\\da-fA-F]{2}.\\d:?\\w*$" error: patch failed: dts/framework/config/conf_yaml_schema.json:164 error: while searching for: ] }, "minimum": 1 } }, "additionalProperties": false, error: patch failed: dts/framework/config/conf_yaml_schema.json:286 error: while searching for: "description": "Optional field that allows you to skip smoke testing", "type": "boolean" }, "system_under_test": { "type":"object", "properties": { "node_name": { error: patch failed: dts/framework/config/conf_yaml_schema.json:336 error: while searching for: "required": [ "node_name" ] } }, "additionalProperties": false, error: patch failed: dts/framework/config/conf_yaml_schema.json:353 Hunk #5 succeeded at 221 (offset -164 lines). Checking patch dts/framework/dts.py... Hunk #1 succeeded at 32 (offset -6 lines). error: while searching for: Run the given execution. This involves running the execution setup as well as running all build targets in the given execution. """ dts_logger.info(f"Running execution with SUT '{execution.system_under_test.name}'.") execution_result = result.add_execution(sut_node.config, sut_node.node_info) try: error: patch failed: dts/framework/dts.py:87 Checking patch dts/framework/testbed_model/node.py... Hunk #1 succeeded at 47 (offset -1 lines). Hunk #2 succeeded at 57 (offset -1 lines). Checking patch dts/framework/testbed_model/sut_node.py... error: while searching for: BuildTargetConfiguration, BuildTargetInfo, InteractiveApp, NodeConfiguration, NodeInfo, ) from framework.remote_session import ( CommandResult, error: patch failed: dts/framework/testbed_model/sut_node.py:13 Hunk #2 succeeded at 24 (offset -59 lines). error: while searching for: _node_info: NodeInfo | None _compiler_version: str | None def __init__(self, node_config: NodeConfiguration): super(SutNode, self).__init__(node_config) self._dpdk_prefix_list = [] self._build_target_config = None error: patch failed: dts/framework/testbed_model/sut_node.py:95 error: while searching for: self._dpdk_version = None self._node_info = None self._compiler_version = None @property def _remote_dpdk_dir(self) -> PurePath: error: patch failed: dts/framework/testbed_model/sut_node.py:110 Applying patch dts/conf.yaml with 2 rejects... Rejected hunk #1. Rejected hunk #2. Applying patch dts/framework/config/__init__.py with 6 rejects... Rejected hunk #1. Hunk #2 applied cleanly. Rejected hunk #3. Rejected hunk #4. Rejected hunk #5. Rejected hunk #6. Rejected hunk #7. Hunk #8 applied cleanly. Applying patch dts/framework/config/conf_yaml_schema.json with 4 rejects... Rejected hunk #1. Rejected hunk #2. Rejected hunk #3. Rejected hunk #4. Hunk #5 applied cleanly. Applying patch dts/framework/dts.py with 1 reject... Hunk #1 applied cleanly. Rejected hunk #2. Applied patch dts/framework/testbed_model/node.py cleanly. Applying patch dts/framework/testbed_model/sut_node.py with 3 rejects... Rejected hunk #1. Hunk #2 applied cleanly. Rejected hunk #3. Rejected hunk #4. hint: Use 'git am --show-current-patch' to see the failed patch diff a/dts/conf.yaml b/dts/conf.yaml (rejected hunks) @@ -13,10 +13,11 @@ executions: skip_smoke_tests: false # optional flag that allow you to skip smoke tests test_suites: - hello_world - system_under_test: + system_under_test_node: node_name: "SUT 1" vdevs: # optional; if removed, vdevs won't be used in the execution - "crypto_openssl" + traffic_generator_node: "TG 1" nodes: - name: "SUT 1" hostname: sut1.change.me.localhost @@ -40,3 +41,26 @@ nodes: os_driver: i40e peer_node: "TG 1" peer_pci: "0000:00:08.1" + - name: "TG 1" + hostname: tg1.change.me.localhost + user: dtsuser + arch: x86_64 + os: linux + lcores: "" + ports: + - pci: "0000:00:08.0" + os_driver_for_dpdk: rdma + os_driver: rdma + peer_node: "SUT 1" + peer_pci: "0000:00:08.0" + - pci: "0000:00:08.1" + os_driver_for_dpdk: rdma + os_driver: rdma + peer_node: "SUT 1" + peer_pci: "0000:00:08.1" + use_first_core: false + hugepages: # optional; if removed, will use system hugepage configuration + amount: 256 + force_first_numa: false + traffic_generator: + type: SCAPY diff a/dts/framework/config/__init__.py b/dts/framework/config/__init__.py (rejected hunks) @@ -13,7 +13,7 @@ from dataclasses import dataclass from enum import Enum, auto, unique from pathlib import PurePath -from typing import Any, TypedDict +from typing import Any, TypedDict, Union import warlock # type: ignore import yaml @@ -79,6 +84,29 @@ class PortConfig: def from_dict(node: str, d: dict) -> "PortConfig": return PortConfig(node=node, **d) + def __str__(self) -> str: + return f"Port {self.pci} on node {self.node}" + + +@dataclass(slots=True, frozen=True) +class TrafficGeneratorConfig: + traffic_generator_type: TrafficGeneratorType + + @staticmethod + def from_dict(d: dict): + # This looks useless now, but is designed to allow expansion to traffic + # generators that require more configuration later. + match TrafficGeneratorType(d["type"]): + case TrafficGeneratorType.SCAPY: + return ScapyTrafficGeneratorConfig( + traffic_generator_type=TrafficGeneratorType.SCAPY + ) + + +@dataclass(slots=True, frozen=True) +class ScapyTrafficGeneratorConfig(TrafficGeneratorConfig): + pass + @dataclass(slots=True, frozen=True) class NodeConfiguration: @@ -90,17 +118,17 @@ class NodeConfiguration: os: OS lcores: str use_first_core: bool - memory_channels: int hugepages: HugepageConfiguration | None ports: list[PortConfig] @staticmethod - def from_dict(d: dict) -> "NodeConfiguration": + def from_dict(d: dict) -> Union["SutNodeConfiguration", "TGNodeConfiguration"]: hugepage_config = d.get("hugepages") if hugepage_config: if "force_first_numa" not in hugepage_config: hugepage_config["force_first_numa"] = False hugepage_config = HugepageConfiguration(**hugepage_config) + common_config = { "name": d["name"], "hostname": d["hostname"], @@ -110,12 +138,31 @@ def from_dict(d: dict) -> "NodeConfiguration": "os": OS(d["os"]), "lcores": d.get("lcores", "1"), "use_first_core": d.get("use_first_core", False), - "memory_channels": d.get("memory_channels", 1), "hugepages": hugepage_config, "ports": [PortConfig.from_dict(d["name"], port) for port in d["ports"]], } - return NodeConfiguration(**common_config) + if "traffic_generator" in d: + return TGNodeConfiguration( + traffic_generator=TrafficGeneratorConfig.from_dict( + d["traffic_generator"] + ), + **common_config, + ) + else: + return SutNodeConfiguration( + memory_channels=d.get("memory_channels", 1), **common_config + ) + + +@dataclass(slots=True, frozen=True) +class SutNodeConfiguration(NodeConfiguration): + memory_channels: int + + +@dataclass(slots=True, frozen=True) +class TGNodeConfiguration(NodeConfiguration): + traffic_generator: ScapyTrafficGeneratorConfig @dataclass(slots=True, frozen=True) @@ -194,23 +241,40 @@ class ExecutionConfiguration: perf: bool func: bool test_suites: list[TestSuiteConfig] - system_under_test: NodeConfiguration + system_under_test_node: SutNodeConfiguration + traffic_generator_node: TGNodeConfiguration vdevs: list[str] skip_smoke_tests: bool @staticmethod - def from_dict(d: dict, node_map: dict) -> "ExecutionConfiguration": + def from_dict( + d: dict, node_map: dict[str, Union[SutNodeConfiguration | TGNodeConfiguration]] + ) -> "ExecutionConfiguration": build_targets: list[BuildTargetConfiguration] = list( map(BuildTargetConfiguration.from_dict, d["build_targets"]) ) test_suites: list[TestSuiteConfig] = list( map(TestSuiteConfig.from_dict, d["test_suites"]) ) - sut_name = d["system_under_test"]["node_name"] + sut_name = d["system_under_test_node"]["node_name"] skip_smoke_tests = d.get("skip_smoke_tests", False) assert sut_name in node_map, f"Unknown SUT {sut_name} in execution {d}" + system_under_test_node = node_map[sut_name] + assert isinstance( + system_under_test_node, SutNodeConfiguration + ), f"Invalid SUT configuration {system_under_test_node}" + + tg_name = d["traffic_generator_node"] + assert tg_name in node_map, f"Unknown TG {tg_name} in execution {d}" + traffic_generator_node = node_map[tg_name] + assert isinstance( + traffic_generator_node, TGNodeConfiguration + ), f"Invalid TG configuration {traffic_generator_node}" + vdevs = ( - d["system_under_test"]["vdevs"] if "vdevs" in d["system_under_test"] else [] + d["system_under_test_node"]["vdevs"] + if "vdevs" in d["system_under_test_node"] + else [] ) return ExecutionConfiguration( build_targets=build_targets, @@ -218,7 +282,8 @@ def from_dict(d: dict, node_map: dict) -> "ExecutionConfiguration": func=d["func"], skip_smoke_tests=skip_smoke_tests, test_suites=test_suites, - system_under_test=node_map[sut_name], + system_under_test_node=system_under_test_node, + traffic_generator_node=traffic_generator_node, vdevs=vdevs, ) diff a/dts/framework/config/conf_yaml_schema.json b/dts/framework/config/conf_yaml_schema.json (rejected hunks) @@ -164,6 +164,11 @@ "amount" ] }, + "mac_address": { + "type": "string", + "description": "A MAC address", + "pattern": "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" + }, "pci_address": { "type": "string", "pattern": "^[\\da-fA-F]{4}:[\\da-fA-F]{2}:[\\da-fA-F]{2}.\\d:?\\w*$" @@ -286,6 +291,22 @@ ] }, "minimum": 1 + }, + "traffic_generator": { + "oneOf": [ + { + "type": "object", + "description": "Scapy traffic generator. Used for functional testing.", + "properties": { + "type": { + "type": "string", + "enum": [ + "SCAPY" + ] + } + } + } + ] } }, "additionalProperties": false, @@ -336,7 +357,7 @@ "description": "Optional field that allows you to skip smoke testing", "type": "boolean" }, - "system_under_test": { + "system_under_test_node": { "type":"object", "properties": { "node_name": { @@ -353,6 +374,9 @@ "required": [ "node_name" ] + }, + "traffic_generator_node": { + "$ref": "#/definitions/node_name" } }, "additionalProperties": false, diff a/dts/framework/dts.py b/dts/framework/dts.py (rejected hunks) @@ -87,7 +87,9 @@ def _run_execution( Run the given execution. This involves running the execution setup as well as running all build targets in the given execution. """ - dts_logger.info(f"Running execution with SUT '{execution.system_under_test.name}'.") + dts_logger.info( + f"Running execution with SUT '{execution.system_under_test_node.name}'." + ) execution_result = result.add_execution(sut_node.config, sut_node.node_info) try: diff a/dts/framework/testbed_model/sut_node.py b/dts/framework/testbed_model/sut_node.py (rejected hunks) @@ -13,8 +13,8 @@ BuildTargetConfiguration, BuildTargetInfo, InteractiveApp, - NodeConfiguration, NodeInfo, + SutNodeConfiguration, ) from framework.remote_session import ( CommandResult, @@ -95,7 +96,7 @@ class SutNode(Node): _node_info: NodeInfo | None _compiler_version: str | None - def __init__(self, node_config: NodeConfiguration): + def __init__(self, node_config: SutNodeConfiguration): super(SutNode, self).__init__(node_config) self._dpdk_prefix_list = [] self._build_target_config = None @@ -110,6 +111,7 @@ def __init__(self, node_config: NodeConfiguration): self._dpdk_version = None self._node_info = None self._compiler_version = None + self._logger.info(f"Created node: {self.name}") @property def _remote_dpdk_dir(self) -> PurePath: Checking patch doc/guides/tools/dts.rst... Checking patch dts/framework/dts.py... error: dts/framework/dts.py: does not match index Checking patch dts/framework/remote_session/linux_session.py... Checking patch dts/framework/remote_session/os_session.py... error: while searching for: from framework.remote_session.remote import InteractiveShell, TestPmdShell from framework.settings import SETTINGS from framework.testbed_model import LogicalCore from framework.utils import MesonArgs from .remote import ( error: patch failed: dts/framework/remote_session/os_session.py:12 error: while searching for: """ Collect information about the node """ error: patch failed: dts/framework/remote_session/os_session.py:255 Checking patch dts/framework/test_suite.py... Hunk #1 succeeded at 15 (offset -5 lines). Hunk #2 succeeded at 45 (offset -6 lines). Checking patch dts/framework/testbed_model/__init__.py... Checking patch dts/framework/testbed_model/capturing_traffic_generator.py... Checking patch dts/framework/testbed_model/hw/port.py... Checking patch dts/framework/testbed_model/node.py... error: dts/framework/testbed_model/node.py: does not match index Checking patch dts/framework/testbed_model/scapy.py... Checking patch dts/framework/testbed_model/tg_node.py... Checking patch dts/framework/testbed_model/traffic_generator.py... Checking patch dts/framework/utils.py... Hunk #3 succeeded at 64 (offset -3 lines). Applied patch doc/guides/tools/dts.rst cleanly. Applied patch dts/framework/remote_session/linux_session.py cleanly. Applying patch dts/framework/remote_session/os_session.py with 2 rejects... Rejected hunk #1. Rejected hunk #2. Applied patch dts/framework/test_suite.py cleanly. Applied patch dts/framework/testbed_model/__init__.py cleanly. Applied patch dts/framework/testbed_model/capturing_traffic_generator.py cleanly. Applied patch dts/framework/testbed_model/hw/port.py cleanly. Applied patch dts/framework/testbed_model/scapy.py cleanly. Applied patch dts/framework/testbed_model/tg_node.py cleanly. Applied patch dts/framework/testbed_model/traffic_generator.py cleanly. Applied patch dts/framework/utils.py cleanly. hint: Use 'git am --show-current-patch' to see the failed patch diff a/dts/framework/remote_session/os_session.py b/dts/framework/remote_session/os_session.py (rejected hunks) @@ -12,6 +12,7 @@ from framework.remote_session.remote import InteractiveShell, TestPmdShell from framework.settings import SETTINGS from framework.testbed_model import LogicalCore +from framework.testbed_model.hw.port import Port from framework.utils import MesonArgs from .remote import ( @@ -255,3 +256,17 @@ def get_node_info(self) -> NodeInfo: """ Collect information about the node """ + + @abstractmethod + def update_ports(self, ports: list[Port]) -> None: + """ + Get additional information about ports: + Logical name (e.g. enp7s0) if applicable + Mac address + """ + + @abstractmethod + def configure_port_state(self, port: Port, enable: bool) -> None: + """ + Enable/disable port. + """ Checking patch dts/framework/config/__init__.py... error: dts/framework/config/__init__.py: does not match index Checking patch dts/framework/remote_session/__init__.py... error: while searching for: from framework.logger import DTSLOG from .linux_session import LinuxSession from .os_session import OSSession from .remote import ( CommandResult, InteractiveRemoteSession, error: patch failed: dts/framework/remote_session/__init__.py:17 Checking patch dts/framework/remote_session/os_session.py... error: while searching for: from abc import ABC, abstractmethod from collections.abc import Iterable from pathlib import PurePath from typing import Union from framework.config import Architecture, InteractiveApp, NodeConfiguration, NodeInfo from framework.logger import DTSLOG from framework.remote_session.remote import InteractiveShell, TestPmdShell from framework.settings import SETTINGS from framework.testbed_model import LogicalCore from framework.testbed_model.hw.port import Port error: patch failed: dts/framework/remote_session/os_session.py:5 error: while searching for: create_remote_session, ) class OSSession(ABC): """ error: patch failed: dts/framework/remote_session/os_session.py:23 error: while searching for: def create_interactive_shell( self, shell_type: InteractiveApp, path_to_app: PurePath, eal_parameters: str, timeout: float, ) -> Union[InteractiveShell, TestPmdShell]: """ See "create_interactive_shell" in SutNode """ match (shell_type): case InteractiveApp.testpmd: return TestPmdShell( self.interactive_session.session, self._logger, path_to_app, timeout=timeout, eal_flags=eal_parameters, ) case _: self._logger.info( f"Unhandled app type {shell_type.name}, defaulting to shell." ) return InteractiveShell( self.interactive_session.session, self._logger, path_to_app, timeout ) @abstractmethod def _get_privileged_command(self, command: str) -> str: error: patch failed: dts/framework/remote_session/os_session.py:81 Checking patch dts/framework/remote_session/remote/interactive_shell.py... error: dts/framework/remote_session/remote/interactive_shell.py: does not exist in index Checking patch dts/framework/remote_session/remote/python_shell.py... Checking patch dts/framework/remote_session/remote/testpmd_shell.py... error: dts/framework/remote_session/remote/testpmd_shell.py: does not exist in index Checking patch dts/framework/testbed_model/node.py... error: dts/framework/testbed_model/node.py: does not match index Checking patch dts/framework/testbed_model/sut_node.py... error: dts/framework/testbed_model/sut_node.py: does not match index Checking patch dts/tests/TestSuite_smoke_tests.py... error: dts/tests/TestSuite_smoke_tests.py: does not exist in index Applying patch dts/framework/remote_session/__init__.py with 1 reject... Rejected hunk #1. Applying patch dts/framework/remote_session/os_session.py with 3 rejects... Rejected hunk #1. Rejected hunk #2. Rejected hunk #3. Applied patch dts/framework/remote_session/remote/python_shell.py cleanly. hint: Use 'git am --show-current-patch' to see the failed patch diff a/dts/framework/remote_session/__init__.py b/dts/framework/remote_session/__init__.py (rejected hunks) @@ -17,7 +17,7 @@ from framework.logger import DTSLOG from .linux_session import LinuxSession -from .os_session import OSSession +from .os_session import InteractiveShellType, OSSession from .remote import ( CommandResult, InteractiveRemoteSession, diff a/dts/framework/remote_session/os_session.py b/dts/framework/remote_session/os_session.py (rejected hunks) @@ -5,11 +5,11 @@ from abc import ABC, abstractmethod from collections.abc import Iterable from pathlib import PurePath -from typing import Union +from typing import Type, TypeVar -from framework.config import Architecture, InteractiveApp, NodeConfiguration, NodeInfo +from framework.config import Architecture, NodeConfiguration, NodeInfo from framework.logger import DTSLOG -from framework.remote_session.remote import InteractiveShell, TestPmdShell +from framework.remote_session.remote import InteractiveShell from framework.settings import SETTINGS from framework.testbed_model import LogicalCore from framework.testbed_model.hw.port import Port @@ -23,6 +23,8 @@ create_remote_session, ) +InteractiveShellType = TypeVar("InteractiveShellType", bound=InteractiveShell) + class OSSession(ABC): """ @@ -81,30 +83,26 @@ def send_command( def create_interactive_shell( self, - shell_type: InteractiveApp, - path_to_app: PurePath, + shell_cls: Type[InteractiveShellType], eal_parameters: str, timeout: float, - ) -> Union[InteractiveShell, TestPmdShell]: + privileged: bool, + ) -> InteractiveShellType: """ See "create_interactive_shell" in SutNode """ - match (shell_type): - case InteractiveApp.testpmd: - return TestPmdShell( - self.interactive_session.session, - self._logger, - path_to_app, - timeout=timeout, - eal_flags=eal_parameters, - ) - case _: - self._logger.info( - f"Unhandled app type {shell_type.name}, defaulting to shell." - ) - return InteractiveShell( - self.interactive_session.session, self._logger, path_to_app, timeout - ) + app_command = ( + self._get_privileged_command(str(shell_cls.path)) + if privileged + else str(shell_cls.path) + ) + return shell_cls( + self.interactive_session.session, + self._logger, + app_command, + eal_parameters, + timeout, + ) @abstractmethod def _get_privileged_command(self, command: str) -> str: Checking patch dts/framework/remote_session/__init__.py... error: while searching for: CommandResult, InteractiveRemoteSession, InteractiveShell, RemoteSession, SSHSession, TestPmdDevice, error: patch failed: dts/framework/remote_session/__init__.py:22 Checking patch dts/framework/remote_session/remote/__init__.py... error: while searching for: from .interactive_remote_session import InteractiveRemoteSession from .interactive_shell import InteractiveShell from .remote_session import CommandResult, RemoteSession from .ssh_session import SSHSession from .testpmd_shell import TestPmdDevice, TestPmdShell error: patch failed: dts/framework/remote_session/remote/__init__.py:9 Checking patch dts/framework/testbed_model/scapy.py... error: dts/framework/testbed_model/scapy.py: does not exist in index Applying patch dts/framework/remote_session/__init__.py with 1 reject... Rejected hunk #1. Applying patch dts/framework/remote_session/remote/__init__.py with 1 reject... Rejected hunk #1. hint: Use 'git am --show-current-patch' to see the failed patch diff a/dts/framework/remote_session/__init__.py b/dts/framework/remote_session/__init__.py (rejected hunks) @@ -22,6 +22,7 @@ CommandResult, InteractiveRemoteSession, InteractiveShell, + PythonShell, RemoteSession, SSHSession, TestPmdDevice, diff a/dts/framework/remote_session/remote/__init__.py b/dts/framework/remote_session/remote/__init__.py (rejected hunks) @@ -9,6 +9,7 @@ from .interactive_remote_session import InteractiveRemoteSession from .interactive_shell import InteractiveShell +from .python_shell import PythonShell from .remote_session import CommandResult, RemoteSession from .ssh_session import SSHSession from .testpmd_shell import TestPmdDevice, TestPmdShell Checking patch dts/conf.yaml... error: while searching for: skip_smoke_tests: false # optional flag that allow you to skip smoke tests test_suites: - hello_world system_under_test_node: node_name: "SUT 1" vdevs: # optional; if removed, vdevs won't be used in the execution error: patch failed: dts/conf.yaml:13 Checking patch dts/framework/config/conf_yaml_schema.json... error: dts/framework/config/conf_yaml_schema.json: does not match index Checking patch dts/framework/remote_session/linux_session.py... error: dts/framework/remote_session/linux_session.py: does not match index Checking patch dts/framework/remote_session/os_session.py... error: while searching for: from abc import ABC, abstractmethod from collections.abc import Iterable from pathlib import PurePath from typing import Type, TypeVar from framework.config import Architecture, NodeConfiguration, NodeInfo from framework.logger import DTSLOG error: patch failed: dts/framework/remote_session/os_session.py:4 error: while searching for: """ Enable/disable port. """ error: patch failed: dts/framework/remote_session/os_session.py:268 Checking patch dts/framework/test_suite.py... error: dts/framework/test_suite.py: does not match index Checking patch dts/framework/testbed_model/node.py... error: dts/framework/testbed_model/node.py: does not match index Checking patch dts/framework/testbed_model/sut_node.py... error: dts/framework/testbed_model/sut_node.py: does not match index Checking patch dts/tests/TestSuite_os_udp.py... Applying patch dts/conf.yaml with 1 reject... Rejected hunk #1. Applying patch dts/framework/remote_session/os_session.py with 2 rejects... Rejected hunk #1. Rejected hunk #2. Applied patch dts/tests/TestSuite_os_udp.py cleanly. hint: Use 'git am --show-current-patch' to see the failed patch diff a/dts/conf.yaml b/dts/conf.yaml (rejected hunks) @@ -13,6 +13,7 @@ executions: skip_smoke_tests: false # optional flag that allow you to skip smoke tests test_suites: - hello_world + - os_udp system_under_test_node: node_name: "SUT 1" vdevs: # optional; if removed, vdevs won't be used in the execution diff a/dts/framework/remote_session/os_session.py b/dts/framework/remote_session/os_session.py (rejected hunks) @@ -4,8 +4,9 @@ from abc import ABC, abstractmethod from collections.abc import Iterable +from ipaddress import IPv4Interface, IPv6Interface from pathlib import PurePath -from typing import Type, TypeVar +from typing import Type, TypeVar, Union from framework.config import Architecture, NodeConfiguration, NodeInfo from framework.logger import DTSLOG @@ -268,3 +269,20 @@ def configure_port_state(self, port: Port, enable: bool) -> None: """ Enable/disable port. """ + + @abstractmethod + def configure_port_ip_address( + self, + address: Union[IPv4Interface, IPv6Interface], + port: Port, + delete: bool, + ) -> None: + """ + Configure (add or delete) an IP address of the input port. + """ + + @abstractmethod + def configure_ipv4_forwarding(self, enable: bool) -> None: + """ + Enable IPv4 forwarding in the underlying OS. + """ https://lab.dpdk.org/results/dashboard/patchsets/27082/ UNH-IOL DPDK Community Lab