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 09040454F5 for ; Tue, 25 Jun 2024 23:21:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8F2D42708; Tue, 25 Jun 2024 23:21:33 +0200 (CEST) Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mails.dpdk.org (Postfix) with ESMTP id 4E3DE40677 for ; Tue, 25 Jun 2024 23:21:31 +0200 (CEST) Received: from loongson.cn (unknown [192.168.100.1]) by gateway (Coremail) with SMTP id _____8CxcPDXNHtmYggKAA--.40874S3; Wed, 26 Jun 2024 05:21:28 +0800 (CST) Received: from localhost.localdomain (unknown [192.168.100.1]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxhsXWNHtmwRIxAA--.40804S3; Wed, 26 Jun 2024 05:21:26 +0800 (CST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.15.2/8.15.2) with ESMTPS id 45PKqoT32979543 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 26 Jun 2024 04:52:50 +0800 Received: (from root@localhost) by localhost.localdomain (8.15.2/8.15.2/Submit) id 45PKqnEK2979542; Wed, 26 Jun 2024 04:52:49 +0800 Date: Wed, 26 Jun 2024 04:52:49 +0800 From: qemudev@loongson.cn Message-Id: <202406252052.45PKqnEK2979542@localhost.localdomain> Content-Type: text/plain; charset="utf-8" Subject: |WARNING| pw141747 [PATCH v2 1/1] dts: Remove XML-RPC server for Scapy TG and instead use PythonShell In-Reply-To: <20240625211114.886-2-jspewock@iol.unh.edu> References: <20240625211114.886-2-jspewock@iol.unh.edu> To: test-report@dpdk.org Cc: jspewock@iol.unh.edu, zhoumin@loongson.cn X-CM-TRANSID: AQAAf8AxhsXWNHtmwRIxAA--.40804S3 Authentication-Results: localhost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I8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14 v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07jUa9-UUUUU= 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/141747 _apply patch failure_ Submitter: Jeremy Spewock Date: Tue, 25 Jun 2024 17:11:14 -0400 DPDK git baseline: Repo:dpdk Branch: main CommitID: 9ab7baa5c14b1ba928c09bda4734827d6d367d6b Apply patch set 141747 failed: Checking patch dts/framework/remote_session/interactive_shell.py... Hunk #1 succeeded at 25 (offset -4 lines). error: while searching for: start_on_init: bool = True, app_params: Params = Params(), name: str | None = None, ) -> None: """Create an SSH channel during initialization. Args: node: The node on which to run start the interactive shell. privileged: Enables the shell to run as superuser. error: patch failed: dts/framework/remote_session/interactive_shell.py:74 error: dts/framework/remote_session/interactive_shell.py: patch does not apply Checking patch dts/framework/testbed_model/traffic_generator/__init__.py... Checking patch dts/framework/testbed_model/traffic_generator/scapy.py... error: while searching for: A traffic generator used for functional testing, implemented with `the Scapy library `_. The traffic generator uses an XML-RPC server to run Scapy on the remote TG node. The traffic generator uses the :mod:`xmlrpc.server` module to run an XML-RPC server in an interactive remote Python SSH session. The communication with the server is facilitated with a local server proxy from the :mod:`xmlrpc.client` module. """ import inspect import marshal import time import types import xmlrpc.client from xmlrpc.server import SimpleXMLRPCServer import scapy.all # type: ignore[import-untyped] from scapy.layers.l2 import Ether # type: ignore[import-untyped] from scapy.packet import Packet # type: ignore[import-untyped] from framework.config import OS, ScapyTrafficGeneratorConfig from framework.remote_session.python_shell import PythonShell from framework.settings import SETTINGS from framework.testbed_model.node import Node from framework.testbed_model.port import Port from .capturing_traffic_generator import ( CapturingTrafficGenerator, PacketFilteringConfig, _get_default_capture_name, ) """ ========= BEGIN RPC FUNCTIONS ========= All of the functions in this section are intended to be exported to a python shell which runs a scapy RPC server. These functions are made available via that RPC server to the packet generator. To add a new function to the RPC server, first write the function in this section. Then, if you need any imports, make sure to add them to SCAPY_RPC_SERVER_IMPORTS as well. After that, add the function to the list in EXPORTED_FUNCTIONS. Note that kwargs (keyword arguments) do not work via xmlrpc, so you may need to construct wrapper functions around many scapy types. """ """ Add the line needed to import something in a normal python environment as an entry to this array. It will be imported before any functions are sent to the server. """ SCAPY_RPC_SERVER_IMPORTS = [ "from scapy.all import *", "import xmlrpc", "import sys", "from xmlrpc.server import SimpleXMLRPCServer", "import marshal", "import pickle", "import types", "import time", ] def scapy_send_packets_and_capture( xmlrpc_packets: list[xmlrpc.client.Binary], send_iface: str, recv_iface: str, duration: float, sniff_filter: str, ) -> list[bytes]: """The RPC function to send and capture packets. This function is meant to be executed on the remote TG node via the server proxy. Args: xmlrpc_packets: The packets to send. These need to be converted to :class:`~xmlrpc.client.Binary` objects before sending to the remote server. send_iface: The logical name of the egress interface. recv_iface: The logical name of the ingress interface. duration: Capture for this amount of time, in seconds. Returns: A list of bytes. Each item in the list represents one packet, which needs to be converted back upon transfer from the remote node. """ scapy_packets = [scapy.all.Packet(packet.data) for packet in xmlrpc_packets] sniffer = scapy.all.AsyncSniffer( iface=recv_iface, store=True, started_callback=lambda *args: scapy.all.sendp(scapy_packets, iface=send_iface), filter=sniff_filter, ) sniffer.start() time.sleep(duration) return [scapy_packet.build() for scapy_packet in sniffer.stop(join=True)] def scapy_send_packets(xmlrpc_packets: list[xmlrpc.client.Binary], send_iface: str) -> None: """The RPC function to send packets. This function is meant to be executed on the remote TG node via the server proxy. It only sends `xmlrpc_packets`, without capturing them. Args: xmlrpc_packets: The packets to send. These need to be converted to :class:`~xmlrpc.client.Binary` objects before sending to the remote server. send_iface: The logical name of the egress interface. """ scapy_packets = [scapy.all.Packet(packet.data) for packet in xmlrpc_packets] scapy.all error: patch failed: dts/framework/testbed_model/traffic_generator/scapy.py:6 error: dts/framework/testbed_model/traffic_generator/scapy.py: patch does not apply Checking patch dts/framework/testbed_model/traffic_generator/traffic_generator.py... Checking patch dts/framework/utils.py...