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 0863146EBD for ; Wed, 10 Sep 2025 17:29:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 033C4402C2; Wed, 10 Sep 2025 17:29:16 +0200 (CEST) Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mails.dpdk.org (Postfix) with ESMTP id 439D5402C2 for ; Wed, 10 Sep 2025 17:29:14 +0200 (CEST) Received: from loongson.cn (unknown [10.40.64.71]) by gateway (Coremail) with SMTP id _____8AxB9FEmcFomNkIAA--.18766S3; Wed, 10 Sep 2025 23:29:09 +0800 (CST) Received: from localhost.localdomain (unknown [10.40.64.71]) by front1 (Coremail) with SMTP id qMiowJAxT+ZBmcFoAjqMAA--.51385S3; Wed, 10 Sep 2025 23:29:05 +0800 (CST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.15.2/8.15.2) with ESMTPS id 58AEqW7f3245452 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 10 Sep 2025 22:52:32 +0800 Received: (from root@localhost) by localhost.localdomain (8.15.2/8.15.2/Submit) id 58AEqWWX3245451; Wed, 10 Sep 2025 22:52:32 +0800 Date: Wed, 10 Sep 2025 22:52:32 +0800 From: qemudev@loongson.cn Message-Id: <202509101452.58AEqWWX3245451@localhost.localdomain> Content-Type: text/plain; charset="utf-8" Subject: |WARNING| pw156556-156557 [PATCH v1 1/2] dts: move testpmd into API In-Reply-To: <20250910152103.976383-2-paul.szczepanek@arm.com> References: <20250910152103.976383-2-paul.szczepanek@arm.com> To: test-report@dpdk.org Cc: Paul Szczepanek , zhoumin@loongson.cn X-CM-TRANSID: qMiowJAxT+ZBmcFoAjqMAA--.51385S3 X-CM-SenderInfo: pthp3vthy6z05rqj20fqof0/1tb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v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU7c_-DUUUU 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: loongarch-compilation Test-Status: WARNING http://dpdk.org/patch/156556 _apply patch failure_ Submitter: Paul Szczepanek Date: Wed, 10 Sep 2025 16:21:02 +0100 DPDK git baseline: Repo:dpdk Branch: main CommitID: f41d2db45d8a23c3315929c190d098154732a1ce Apply patch set 156556-156557 failed: Checking patch doc/api/dts/api.capabilities.rst... Checking patch doc/api/dts/api.rst... Checking patch doc/api/dts/api.testpmd.config.rst... Checking patch doc/api/dts/api.testpmd.rst... Checking patch doc/api/dts/api.testpmd.types.rst... Checking patch doc/api/dts/framework.params.rst... Checking patch doc/api/dts/framework.params.testpmd.rst... Checking patch doc/api/dts/framework.remote_session.rst... Hunk #1 succeeded at 18 (offset 1 line). Checking patch doc/api/dts/framework.remote_session.testpmd_shell.rst... Checking patch doc/api/dts/index.rst... Checking patch doc/guides/tools/dts.rst... error: while searching for: that class in one's testsuite implementation. It is also acceptable to import and instantiate classes for various DPDK applications. For instance, writing a testsuite for a simple packet forwarding operation would involve importing the DTS TestPmdShell class, instantiating TestPmdShell, calling TestPmdShell's start() method, and then sending traffic via one of the traffic transmitting functions exposed in the Testsuite class. Test Case Verification error: patch failed: doc/guides/tools/dts.rst:447 error: doc/guides/tools/dts.rst: patch does not apply Checking patch dts/api/__init__.py... Checking patch dts/api/capabilities.py... Checking patch dts/api/testpmd/__init__.py... Checking patch dts/framework/params/testpmd.py => dts/api/testpmd/config.py... Checking patch dts/api/testpmd/types.py... Checking patch dts/framework/config/__init__.py... Checking patch dts/framework/params/eal.py... Checking patch dts/framework/params/types.py... Checking patch dts/framework/remote_session/__init__.py... error: while searching for: The interactive sessions open an interactive shell which is continuously open, allowing it to send and receive data within that particular shell. """ from framework.config.node import NodeConfiguration from framework.logger import DTSLogger from .interactive_remote_session import InteractiveRemoteSession from .remote_session import RemoteSession def create_remote_session( node_config: NodeConfiguration, name: str, logger: DTSLogger ) -> RemoteSession: """Factory for non-interactive remote sessions. The function returns an SSH session, but will be extended if support for other protocols is added. Args: node_config: The test run configuration of the node to connect to. name: The name of the session. logger: The logger instance this session will use. Returns: The SSH remote session. """ return RemoteSession(node_config, name, logger) def create_interactive_session( node_config: NodeConfiguration, logger: DTSLogger ) -> InteractiveRemoteSession: """Factory for interactive remote sessions. The function returns an interactive SSH session, but will be extended if support for other protocols is added. Args: node_config: The test run configuration of the node to connect to. logger: The logger instance this session will use. Returns: The interactive SSH remote session. """ return InteractiveRemoteSession(node_config, logger) error: patch failed: dts/framework/remote_session/__init__.py:11 error: dts/framework/remote_session/__init__.py: patch does not apply Checking patch dts/framework/remote_session/testpmd_shell.py... error: while searching for: # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2023 University of New Hampshire # Copyright(c) 2023 PANTHEON.tech s.r.o. # Copyright(c) 2024 Arm Limited """Testpmd interactive shell. Typical usage example in a TestSuite:: testpmd_shell = TestPmdShell(self.sut_node) devices = testpmd_shell.get_devices() for device in devices: print(device) testpmd_shell.close() """ import functools import re import time from collections.abc import Callable, MutableSet from dataclasses import dataclass, field from enum import Flag, auto from os import environ from pathlib import PurePath from typing import TYPE_CHECKING, Any, ClassVar, Concatenate, Literal, ParamSpec, Tuple, TypeAlias from framework.context import get_ctx from framework.remote_session.interactive_shell import only_active from framework.testbed_model.topology import TopologyType if TYPE_CHECKING or environ.get("DTS_DOC_BUILD"): from enum import Enum as NoAliasEnum else: from aenum import NoAliasEnum from typing_extensions import Self, Unpack from framework.exception import InteractiveCommandExecutionError, InternalError from framework.params.testpmd import PortTopology, SimpleForwardingModes, TestPmdParams from framework.params.types import TestPmdParamsDict from framework.parser import ParserFn, TextParser from framework.remote_session.dpdk_shell import DPDKShell from framework.settings import SETTINGS from framework.utils import REGEX_FOR_MAC_ADDRESS, StrEnum P = ParamSpec("P") TestPmdShellMethod = Callable[Concatenate["TestPmdShell", P], Any] TestPmdShellCapabilityMethod: TypeAlias = Callable[ ["TestPmdShell", MutableSet["NicCapability"], MutableSet["NicCapability"]], None ] TestPmdShellDecorator: TypeAlias = Callable[[TestPmdShellMethod], TestPmdShellMethod] TestPmdShellNicCapability = tuple[TestPmdShellCapabilityMethod, TestPmdShellDecorator | None] class TestPmdDevice: """The data of a device that testpmd can recognize. Attributes: pci_address: The PCI address of the device. """ pci_address: str def __init__(self, pci_address_line: str) -> None: """Initialize the device from the testpmd output line string. Args: pci_address_line: A line of testpmd output that contains a device. """ self.pci_address = pci_address_line.strip().split(": ")[1].strip() def __str__(self) -> str: """The PCI address captures what the device is.""" return self.pci_address class VLANOffloadFlag(Flag): """Flag representing the VLAN offload settings of a NIC port.""" #: STRIP = auto() #: FILTER = auto() #: EXTEND = auto() #: QINQ_STRIP = auto() @classmethod def from_str_dict(cls, d: dict[str, str]) -> Self: """Makes an instance from a dict containing the flag member names with an "on" value. Args: d: A dictionary containing the flag members as keys and any string value. Returns: A new instance of the flag. """ flag = cls(0) for name in cls.__members__: if d.get(name) == "on": flag |= cls[name] return flag @classmethod def make_parser(cls) -> ParserFn: """Makes a parser function. Returns: ParserFn: A dictionary for the `dataclasses.field` metadata argument containing a parser function that makes an instance of this flag from text. """ return TextParser.wrap( TextParser.find( r"VLAN offload:\s+" r"strip (?Pon|off), " r"filter (?Pon|off), " r"extend (?Pon|off), " r"qinq strip (?Pon|off)", re.MULTILINE, named=True, ), cls.from_str_dict, ) class ChecksumOffloadOptions(Flag): """Flag representing checksum hardware offload layer options.""" #: ip = auto() #: udp = auto() #: tcp = a error: patch failed: dts/framework/remote_session/testpmd_shell.py:1 error: dts/framework/remote_session/testpmd_shell.py: patch does not apply Checking patch dts/framework/testbed_model/capability.py... error: while searching for: from abc import ABC, abstractmethod from collections.abc import MutableSet from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Callable, ClassVar, Protocol from typing_extensions import Self from framework.exception import ConfigurationError, InternalError, SkippedTestException from framework.logger import get_dts_logger from framework.remote_session.testpmd_shell import ( NicCapability, TestPmdShell, TestPmdShellCapabilityMethod, TestPmdShellDecorator, TestPmdShellMethod, ) from framework.testbed_model.node import Node from framework.testbed_model.port import DriverKind from .topology import Topology, TopologyType if TYPE_CHECKING: from framework.test_suite import TestCase class Capability(ABC): """The base class for various capabilities. error: patch failed: dts/framework/testbed_model/capability.py:50 error: dts/framework/testbed_model/capability.py: patch does not apply Checking patch dts/framework/testbed_model/linux_session.py... Checking patch dts/framework/testbed_model/os_session.py... Checking patch dts/framework/testbed_model/topology.py... error: while searching for: from collections import defaultdict from collections.abc import Iterator from dataclasses import dataclass from enum import Enum from typing import NamedTuple from typing_extensions import Self from framework.exception import ConfigurationError, InternalError from framework.testbed_model.node import Node, NodeIdentifier from .port import DriverKind, Port, PortConfig class TopologyType(int, Enum): """Supported topology types.""" #: A topology with no Traffic Generator. no_link = 0 #: A topology with one physical link between the SUT node and the TG node. one_link = 1 #: A topology with two physical links between the Sut node and the TG node. two_links = 2 @classmethod def default(cls) -> "TopologyType": """The default topology required by test cases if not specified otherwise.""" return cls.two_links class PortLink(NamedTuple): """The physical, cabled connection between the ports.""" error: patch failed: dts/framework/testbed_model/topology.py:11 error: dts/framework/testbed_model/topology.py: patch does not apply