automatic DPDK test reports
 help / color / mirror / Atom feed
From: qemudev@loongson.cn
To: test-report@dpdk.org
Cc: Paul Szczepanek <paul.szczepanek@arm.com>, zhoumin@loongson.cn
Subject: |WARNING| pw156556-156557 [PATCH v1 1/2] dts: move testpmd into API
Date: Wed, 10 Sep 2025 22:52:32 +0800	[thread overview]
Message-ID: <202509101452.58AEqWWX3245451@localhost.localdomain> (raw)
In-Reply-To: <20250910152103.976383-2-paul.szczepanek@arm.com>

Test-Label: loongarch-compilation
Test-Status: WARNING
http://dpdk.org/patch/156556

_apply patch failure_

Submitter: Paul Szczepanek <paul.szczepanek@arm.com>
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 (?P<STRIP>on|off), "
                r"filter (?P<FILTER>on|off), "
                r"extend (?P<EXTEND>on|off), "
                r"qinq strip (?P<QINQ_STRIP>on|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


       reply	other threads:[~2025-09-10 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250910152103.976383-2-paul.szczepanek@arm.com>
2025-09-10 14:52 ` qemudev [this message]
2025-09-10 15:21 ` |WARNING| pw156556 " checkpatch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202509101452.58AEqWWX3245451@localhost.localdomain \
    --to=qemudev@loongson.cn \
    --cc=paul.szczepanek@arm.com \
    --cc=test-report@dpdk.org \
    --cc=zhoumin@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).