Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/139238/?format=api
http://patches.dpdk.org/api/patches/139238/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240412111136.3470304-3-luca.vizzarro@arm.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20240412111136.3470304-3-luca.vizzarro@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20240412111136.3470304-3-luca.vizzarro@arm.com", "date": "2024-04-12T11:11:33", "name": "[2/5] dts: skip first line of send_command output", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2de9eb86134340f5a72d4c6e0de63935e5490f61", "submitter": { "id": 3197, "url": "http://patches.dpdk.org/api/people/3197/?format=api", "name": "Luca Vizzarro", "email": "luca.vizzarro@arm.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240412111136.3470304-3-luca.vizzarro@arm.com/mbox/", "series": [ { "id": 31729, "url": "http://patches.dpdk.org/api/series/31729/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31729", "date": "2024-04-12T11:11:31", "name": "dts: testpmd show port info/stats", "version": 1, "mbox": "http://patches.dpdk.org/series/31729/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/139238/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/139238/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 8CB3C43E51;\n\tFri, 12 Apr 2024 13:12:03 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D3A7D406BA;\n\tFri, 12 Apr 2024 13:11:55 +0200 (CEST)", "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 0E8D1400D6\n for <dev@dpdk.org>; Fri, 12 Apr 2024 13:11:55 +0200 (CEST)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B4772339;\n Fri, 12 Apr 2024 04:12:23 -0700 (PDT)", "from localhost.localdomain (unknown [10.57.19.212])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 176973F766;\n Fri, 12 Apr 2024 04:11:52 -0700 (PDT)" ], "From": "Luca Vizzarro <luca.vizzarro@arm.com>", "To": "dev@dpdk.org", "Cc": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>,\n Jeremy Spewock <jspewock@iol.unh.edu>, Luca Vizzarro <luca.vizzarro@arm.com>,\n Paul Szczepanek <paul.szczepanek@arm.com>,\n Jack Bond-Preston <jack.bond-preston@arm.com>", "Subject": "[PATCH 2/5] dts: skip first line of send_command output", "Date": "Fri, 12 Apr 2024 12:11:33 +0100", "Message-Id": "<20240412111136.3470304-3-luca.vizzarro@arm.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20240412111136.3470304-1-luca.vizzarro@arm.com>", "References": "<20240412111136.3470304-1-luca.vizzarro@arm.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "The first line of the InteractiveShell send_command method is generally\nthe command input field. This sometimes is unwanted, therefore this\ncommit enables the possibility of omitting the first line from the\nreturned output.\n\nSigned-off-by: Luca Vizzarro <luca.vizzarro@arm.com>\nReviewed-by: Paul Szczepanek <paul.szczepanek@arm.com>\nReviewed-by: Jack Bond-Preston <jack.bond-preston@arm.com>\n---\n dts/framework/remote_session/interactive_shell.py | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)", "diff": "diff --git a/dts/framework/remote_session/interactive_shell.py b/dts/framework/remote_session/interactive_shell.py\nindex 8a9bf96ea9..e290a083e9 100644\n--- a/dts/framework/remote_session/interactive_shell.py\n+++ b/dts/framework/remote_session/interactive_shell.py\n@@ -105,7 +105,9 @@ def _start_application(self, get_privileged_command: Callable[[str], str] | None\n start_command = get_privileged_command(start_command)\n self.send_command(start_command)\n \n- def send_command(self, command: str, prompt: str | None = None) -> str:\n+ def send_command(\n+ self, command: str, prompt: str | None = None, skip_first_line: bool = False\n+ ) -> str:\n \"\"\"Send `command` and get all output before the expected ending string.\n \n Lines that expect input are not included in the stdout buffer, so they cannot\n@@ -121,6 +123,7 @@ def send_command(self, command: str, prompt: str | None = None) -> str:\n command: The command to send.\n prompt: After sending the command, `send_command` will be expecting this string.\n If :data:`None`, will use the class's default prompt.\n+ skip_first_line: Skip the first line when capturing the output.\n \n Returns:\n All output in the buffer before expected string.\n@@ -132,6 +135,9 @@ def send_command(self, command: str, prompt: str | None = None) -> str:\n self._stdin.flush()\n out: str = \"\"\n for line in self._stdout:\n+ if skip_first_line:\n+ skip_first_line = False\n+ continue\n if prompt in line and not line.rstrip().endswith(\n command.rstrip()\n ): # ignore line that sent command\n", "prefixes": [ "2/5" ] }{ "id": 139238, "url": "