Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/134570/?format=api
http://patches.dpdk.org/api/patches/134570/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231123151344.162812-5-juraj.linkes@pantheon.tech/", "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": "<20231123151344.162812-5-juraj.linkes@pantheon.tech>", "list_archive_url": "https://inbox.dpdk.org/dev/20231123151344.162812-5-juraj.linkes@pantheon.tech", "date": "2023-11-23T15:13:27", "name": "[v8,04/21] dts: exceptions docstring update", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a97e00ecfa8d43fb144581445dc107281b10b376", "submitter": { "id": 1626, "url": "http://patches.dpdk.org/api/people/1626/?format=api", "name": "Juraj Linkeš", "email": "juraj.linkes@pantheon.tech" }, "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/20231123151344.162812-5-juraj.linkes@pantheon.tech/mbox/", "series": [ { "id": 30375, "url": "http://patches.dpdk.org/api/series/30375/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30375", "date": "2023-11-23T15:13:23", "name": "dts: docstrings update", "version": 8, "mbox": "http://patches.dpdk.org/series/30375/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/134570/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/134570/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 1F948433AC;\n\tThu, 23 Nov 2023 16:14:27 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 56EB242FD1;\n\tThu, 23 Nov 2023 16:13:56 +0100 (CET)", "from mail-lf1-f51.google.com (mail-lf1-f51.google.com\n [209.85.167.51]) by mails.dpdk.org (Postfix) with ESMTP id 10E7942FAF\n for <dev@dpdk.org>; Thu, 23 Nov 2023 16:13:52 +0100 (CET)", "by mail-lf1-f51.google.com with SMTP id\n 2adb3069b0e04-507cee17b00so1239879e87.2\n for <dev@dpdk.org>; Thu, 23 Nov 2023 07:13:52 -0800 (PST)", "from jlinkes-PT-Latitude-5530.. ([84.245.121.10])\n by smtp.gmail.com with ESMTPSA id\n q4-20020adfea04000000b003296b488961sm1870143wrm.31.2023.11.23.07.13.50\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 23 Nov 2023 07:13:51 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=pantheon.tech; s=google; t=1700752431; x=1701357231; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=wjMjWbqHGp5MGkpbw1QW6JBQYnzdCysgXfdMDvK6Qbg=;\n b=u7Uz4LO6UgQh9QsrHerUP7zjcyuBzUJColCWgRn9DbzVj4chyPXAsziDI/pxLlv8i6\n 9sZQgoUrIFRyKjGbN5d0mjd1SLPht70hNqyhvv5a2ouG3Yp8jnUlJt4ZsJcCPkthgbyg\n glF9pw5Y9PxR4hxCuFAC3rCSXcSS+9jytgpKHwuv3jnRAn12Kmkp9IRnLN8cLAwIx3sk\n JZU3q+XNPc5Erx19VhQig0tWBYeN5RLObGCDzBO3fJ/DFOc6nQU9GIPNojc9gbzadc66\n zHZzkqJ5L6X8bZCtdDEftqd/DVxGxPFEA5O4kfrIKsf35u4YVlnrBj4weW1inGo0pPFZ\n EgDg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1700752431; x=1701357231;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=wjMjWbqHGp5MGkpbw1QW6JBQYnzdCysgXfdMDvK6Qbg=;\n b=XMVSToAKbtLWTR6GRzPTV64wFPC1nupFN18HaaLTvOs1gWrl4H7+JBjQw1Q6MRLxWM\n zvptTcWbhGJUO+N4TiYM2vZ+sFp2QbsnFwjBSWViy1Ge3Y4F3Wtz/7/2fHqMPc6uhPjQ\n CdS62Cal0Y+xyZQr47CeqefSwFIGsKxv9iUUTwXnS7lei4yXNst7vZpUZettszpUqq/c\n cKLLGQ/yZN6WTcsU7ju+zzwC91akTSJ2T1lrwbZzBY/gHpqAu63FSn8AZwd8JvLhoDmf\n aCGPwHITwyg+e/XqIGm3LVUYqHiRbqtjBsVMbZ8u19WbNdw6O4aK+G9Ng/JM/PHjPtUl\n 3Z1g==", "X-Gm-Message-State": "AOJu0YwqF7Rcuhd3pMz51Z3oNE1K+r6p/d2OYvKj5SxK9mMB0XCauTf9\n Ip/39qqGnU3iHDwzVJ0e3K0ijg==", "X-Google-Smtp-Source": "\n AGHT+IEdqBEP7lh+V6RVzciuZ3R7Uwr6dAqF20xfoXx6hzXPsOSUQtMsO9kLQ9MH4QE1hWf01t2ziQ==", "X-Received": "by 2002:a05:6512:3b0a:b0:50a:aa72:27eb with SMTP id\n f10-20020a0565123b0a00b0050aaa7227ebmr5021308lfv.41.1700752431476;\n Thu, 23 Nov 2023 07:13:51 -0800 (PST)", "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "To": "thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu,\n probb@iol.unh.edu, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com,\n Luca.Vizzarro@arm.com", "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "Subject": "[PATCH v8 04/21] dts: exceptions docstring update", "Date": "Thu, 23 Nov 2023 16:13:27 +0100", "Message-Id": "<20231123151344.162812-5-juraj.linkes@pantheon.tech>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20231123151344.162812-1-juraj.linkes@pantheon.tech>", "References": "<20231115130959.39420-1-juraj.linkes@pantheon.tech>\n <20231123151344.162812-1-juraj.linkes@pantheon.tech>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "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": "Format according to the Google format and PEP257, with slight\ndeviations.\n\nSigned-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\n---\n dts/framework/__init__.py | 12 ++++-\n dts/framework/exception.py | 106 +++++++++++++++++++++++++------------\n 2 files changed, 83 insertions(+), 35 deletions(-)", "diff": "diff --git a/dts/framework/__init__.py b/dts/framework/__init__.py\nindex d551ad4bf0..662e6ccad2 100644\n--- a/dts/framework/__init__.py\n+++ b/dts/framework/__init__.py\n@@ -1,3 +1,13 @@\n # SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2022 PANTHEON.tech s.r.o.\n+# Copyright(c) 2022-2023 PANTHEON.tech s.r.o.\n # Copyright(c) 2022 University of New Hampshire\n+\n+\"\"\"Libraries and utilities for running DPDK Test Suite (DTS).\n+\n+The various modules in the DTS framework offer:\n+\n+* Connections to nodes, both interactive and non-interactive,\n+* A straightforward way to add support for different operating systems of remote nodes,\n+* Test suite setup, execution and teardown, along with test case setup, execution and teardown,\n+* Pre-test suite setup and post-test suite teardown.\n+\"\"\"\ndiff --git a/dts/framework/exception.py b/dts/framework/exception.py\nindex 151e4d3aa9..658eee2c38 100644\n--- a/dts/framework/exception.py\n+++ b/dts/framework/exception.py\n@@ -3,8 +3,10 @@\n # Copyright(c) 2022-2023 PANTHEON.tech s.r.o.\n # Copyright(c) 2022-2023 University of New Hampshire\n \n-\"\"\"\n-User-defined exceptions used across the framework.\n+\"\"\"DTS exceptions.\n+\n+The exceptions all have different severities expressed as an integer.\n+The highest severity of all raised exceptions is used as the exit code of DTS.\n \"\"\"\n \n from enum import IntEnum, unique\n@@ -13,59 +15,79 @@\n \n @unique\n class ErrorSeverity(IntEnum):\n- \"\"\"\n- The severity of errors that occur during DTS execution.\n+ \"\"\"The severity of errors that occur during DTS execution.\n+\n All exceptions are caught and the most severe error is used as return code.\n \"\"\"\n \n+ #:\n NO_ERR = 0\n+ #:\n GENERIC_ERR = 1\n+ #:\n CONFIG_ERR = 2\n+ #:\n REMOTE_CMD_EXEC_ERR = 3\n+ #:\n SSH_ERR = 4\n+ #:\n DPDK_BUILD_ERR = 10\n+ #:\n TESTCASE_VERIFY_ERR = 20\n+ #:\n BLOCKING_TESTSUITE_ERR = 25\n \n \n class DTSError(Exception):\n- \"\"\"\n- The base exception from which all DTS exceptions are derived.\n- Stores error severity.\n+ \"\"\"The base exception from which all DTS exceptions are subclassed.\n+\n+ Do not use this exception, only use subclassed exceptions.\n \"\"\"\n \n+ #:\n severity: ClassVar[ErrorSeverity] = ErrorSeverity.GENERIC_ERR\n \n \n class SSHTimeoutError(DTSError):\n- \"\"\"\n- Command execution timeout.\n- \"\"\"\n+ \"\"\"The SSH execution of a command timed out.\"\"\"\n \n+ #:\n severity: ClassVar[ErrorSeverity] = ErrorSeverity.SSH_ERR\n _command: str\n \n def __init__(self, command: str):\n+ \"\"\"Define the meaning of the first argument.\n+\n+ Args:\n+ command: The executed command.\n+ \"\"\"\n self._command = command\n \n def __str__(self) -> str:\n- return f\"TIMEOUT on {self._command}\"\n+ \"\"\"Add some context to the string representation.\"\"\"\n+ return f\"{self._command} execution timed out.\"\n \n \n class SSHConnectionError(DTSError):\n- \"\"\"\n- SSH connection error.\n- \"\"\"\n+ \"\"\"An unsuccessful SSH connection.\"\"\"\n \n+ #:\n severity: ClassVar[ErrorSeverity] = ErrorSeverity.SSH_ERR\n _host: str\n _errors: list[str]\n \n def __init__(self, host: str, errors: list[str] | None = None):\n+ \"\"\"Define the meaning of the first two arguments.\n+\n+ Args:\n+ host: The hostname to which we're trying to connect.\n+ errors: Any errors that occurred during the connection attempt.\n+ \"\"\"\n self._host = host\n self._errors = [] if errors is None else errors\n \n def __str__(self) -> str:\n+ \"\"\"Include the errors in the string representation.\"\"\"\n message = f\"Error trying to connect with {self._host}.\"\n if self._errors:\n message += f\" Errors encountered while retrying: {', '.join(self._errors)}\"\n@@ -74,76 +96,92 @@ def __str__(self) -> str:\n \n \n class SSHSessionDeadError(DTSError):\n- \"\"\"\n- SSH session is not alive.\n- It can no longer be used.\n- \"\"\"\n+ \"\"\"The SSH session is no longer alive.\"\"\"\n \n+ #:\n severity: ClassVar[ErrorSeverity] = ErrorSeverity.SSH_ERR\n _host: str\n \n def __init__(self, host: str):\n+ \"\"\"Define the meaning of the first argument.\n+\n+ Args:\n+ host: The hostname of the disconnected node.\n+ \"\"\"\n self._host = host\n \n def __str__(self) -> str:\n- return f\"SSH session with {self._host} has died\"\n+ \"\"\"Add some context to the string representation.\"\"\"\n+ return f\"SSH session with {self._host} has died.\"\n \n \n class ConfigurationError(DTSError):\n- \"\"\"\n- Raised when an invalid configuration is encountered.\n- \"\"\"\n+ \"\"\"An invalid configuration.\"\"\"\n \n+ #:\n severity: ClassVar[ErrorSeverity] = ErrorSeverity.CONFIG_ERR\n \n \n class RemoteCommandExecutionError(DTSError):\n- \"\"\"\n- Raised when a command executed on a Node returns a non-zero exit status.\n- \"\"\"\n+ \"\"\"An unsuccessful execution of a remote command.\"\"\"\n \n+ #:\n severity: ClassVar[ErrorSeverity] = ErrorSeverity.REMOTE_CMD_EXEC_ERR\n+ #: The executed command.\n command: str\n _command_return_code: int\n \n def __init__(self, command: str, command_return_code: int):\n+ \"\"\"Define the meaning of the first two arguments.\n+\n+ Args:\n+ command: The executed command.\n+ command_return_code: The return code of the executed command.\n+ \"\"\"\n self.command = command\n self._command_return_code = command_return_code\n \n def __str__(self) -> str:\n+ \"\"\"Include both the command and return code in the string representation.\"\"\"\n return f\"Command {self.command} returned a non-zero exit code: {self._command_return_code}\"\n \n \n class RemoteDirectoryExistsError(DTSError):\n- \"\"\"\n- Raised when a remote directory to be created already exists.\n- \"\"\"\n+ \"\"\"A directory that exists on a remote node.\"\"\"\n \n+ #:\n severity: ClassVar[ErrorSeverity] = ErrorSeverity.REMOTE_CMD_EXEC_ERR\n \n \n class DPDKBuildError(DTSError):\n- \"\"\"\n- Raised when DPDK build fails for any reason.\n- \"\"\"\n+ \"\"\"A DPDK build failure.\"\"\"\n \n+ #:\n severity: ClassVar[ErrorSeverity] = ErrorSeverity.DPDK_BUILD_ERR\n \n \n class TestCaseVerifyError(DTSError):\n- \"\"\"\n- Used in test cases to verify the expected behavior.\n- \"\"\"\n+ \"\"\"A test case failure.\"\"\"\n \n+ #:\n severity: ClassVar[ErrorSeverity] = ErrorSeverity.TESTCASE_VERIFY_ERR\n \n \n class BlockingTestSuiteError(DTSError):\n+ \"\"\"A failure in a blocking test suite.\"\"\"\n+\n+ #:\n severity: ClassVar[ErrorSeverity] = ErrorSeverity.BLOCKING_TESTSUITE_ERR\n _suite_name: str\n \n def __init__(self, suite_name: str) -> None:\n+ \"\"\"Define the meaning of the first argument.\n+\n+ Args:\n+ suite_name: The blocking test suite.\n+ \"\"\"\n self._suite_name = suite_name\n \n def __str__(self) -> str:\n+ \"\"\"Add some context to the string representation.\"\"\"\n return f\"Blocking suite {self._suite_name} failed.\"\n", "prefixes": [ "v8", "04/21" ] }{ "id": 134570, "url": "