Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/133905/?format=api
http://patches.dpdk.org/api/patches/133905/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231106171601.160749-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": "<20231106171601.160749-5-juraj.linkes@pantheon.tech>", "list_archive_url": "https://inbox.dpdk.org/dev/20231106171601.160749-5-juraj.linkes@pantheon.tech", "date": "2023-11-06T17:15:42", "name": "[v5,04/23] dts: exceptions docstring update", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "74ebb9a58a1249cf29624c87dbc633a23a70f086", "submitter": { "id": 1626, "url": "http://patches.dpdk.org/api/people/1626/?format=api", "name": "Juraj Linkeš", "email": "juraj.linkes@pantheon.tech" }, "delegate": { "id": 2642, "url": "http://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231106171601.160749-5-juraj.linkes@pantheon.tech/mbox/", "series": [ { "id": 30173, "url": "http://patches.dpdk.org/api/series/30173/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30173", "date": "2023-11-06T17:15:38", "name": "dts: add dts api docs", "version": 5, "mbox": "http://patches.dpdk.org/series/30173/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/133905/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/133905/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 D6C24432BB;\n\tMon, 6 Nov 2023 18:16:41 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 60C9740E7C;\n\tMon, 6 Nov 2023 18:16:13 +0100 (CET)", "from mail-ej1-f53.google.com (mail-ej1-f53.google.com\n [209.85.218.53]) by mails.dpdk.org (Postfix) with ESMTP id BDF8D402F2\n for <dev@dpdk.org>; Mon, 6 Nov 2023 18:16:10 +0100 (CET)", "by mail-ej1-f53.google.com with SMTP id\n a640c23a62f3a-9d2e6c8b542so699624066b.0\n for <dev@dpdk.org>; Mon, 06 Nov 2023 09:16:10 -0800 (PST)", "from jlinkes-PT-Latitude-5530.. (ip-46.34.243.197.o2inet.sk.\n [46.34.243.197]) by smtp.gmail.com with ESMTPSA id\n s10-20020a170906354a00b009b947aacb4bsm47016eja.191.2023.11.06.09.16.09\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 06 Nov 2023 09:16:10 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=pantheon.tech; s=google; t=1699290970; x=1699895770; 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=1nf+Rn9xF8AJgKgVM5dfS3bAeJ3oXogtFzeJDmarYnY=;\n b=ZI6C8x/3t8tCiOESQdHrP/FkF4VMHPTNYt2p1uicww0XEBJxP3yxHqZiS9mBgFfHBW\n rxs7T6RcPVhB+qNv2gKmUxx0mq/RUPXUaXIzKuTG4loQsOKDDaU5u0LhwHs506MAtiu1\n MX8BgoA9XKasJ7sV8V+KHRXS4x1LEZxp6XeVuoiaEkYiMm56A5Lbz3Mi+zt+S6krOCOR\n yOftFhmBnT7l2UkTlyRfSSWPywbdCaiGL13kz2eEsxBv/vuLK35wm4DX1sk5gP9sJe6Z\n l5HvJjMzlf5vbcgdqb8A6vvt1pwH3sOwsG+C8Selb8MAdRJY/EbCzkHd0d4tY4FZggy8\n yW4A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1699290970; x=1699895770;\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=1nf+Rn9xF8AJgKgVM5dfS3bAeJ3oXogtFzeJDmarYnY=;\n b=UedESzxSO1RsXwNYn5I9yQLp2fF8lWxD5pMe/Ryzf8hyL4eGboIjur5SbvxQW93TYJ\n SuqSHObVRHjhP9b57SEibhL7O0Jya2IKTkReYI0fFQQ+KYjHFqiEO7qHNJ76bxXyfvay\n /3jVms2aB/5iAnsA4OVm1J+HXjMvgQAsxqjPwywrEDqXYXvV1VczrhlFXWdzK+aZMiGo\n Z3JkdEi7x2WZbHdUOw++TZgnpjqkn2zF4qIb6YTLTPDCokuIbeGwZMjVyaci4qoE2qUB\n JflcDYaT6ArmTwffdMpIJls8A03VCzm8DUjaeWDpNjT13PIsk0Ma7zgBj5HLUEp9FV5b\n vbPQ==", "X-Gm-Message-State": "AOJu0YxQys4vGXg+HaKb934KPI7UUuBK/Pi7X0eAGlCzzMKOZFFTuZOk\n rRXyMXjWD98V1JJ7h+GMDtv6sQ==", "X-Google-Smtp-Source": "\n AGHT+IGFmF1Uxj2Z2aVOmSSsJPDkthMIvEyMlP9XH8tE4jp2f6ZMpTgvCRbJVQowCrO8i5rxR0JTUg==", "X-Received": "by 2002:a17:907:807:b0:9c4:54c6:8030 with SMTP id\n wv7-20020a170907080700b009c454c68030mr14107279ejb.6.1699290970495;\n Mon, 06 Nov 2023 09:16:10 -0800 (PST)", "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "To": "thomas@monjalon.net, Honnappa.Nagarahalli@arm.com,\n bruce.richardson@intel.com, jspewock@iol.unh.edu, probb@iol.unh.edu,\n paul.szczepanek@arm.com, yoan.picchi@foss.arm.com", "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "Subject": "[PATCH v5 04/23] dts: exceptions docstring update", "Date": "Mon, 6 Nov 2023 18:15:42 +0100", "Message-Id": "<20231106171601.160749-5-juraj.linkes@pantheon.tech>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20231106171601.160749-1-juraj.linkes@pantheon.tech>", "References": "<20230831100407.59865-1-juraj.linkes@pantheon.tech>\n <20231106171601.160749-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 7489c03570..ee1562c672 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 exception 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,43 +96,53 @@ 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 (\n f\"Command {self.command} returned a non-zero exit code: \"\n f\"{self._command_return_code}\"\n@@ -118,35 +150,41 @@ def __str__(self) -> str:\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": [ "v5", "04/23" ] }{ "id": 133905, "url": "