get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/121291/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 121291,
    "url": "https://patches.dpdk.org/api/patches/121291/?format=api",
    "web_url": "https://patches.dpdk.org/project/dts/patch/20221222094637.23135-1-weiyuanx.li@intel.com/",
    "project": {
        "id": 3,
        "url": "https://patches.dpdk.org/api/projects/3/?format=api",
        "name": "DTS",
        "link_name": "dts",
        "list_id": "dts.dpdk.org",
        "list_email": "dts@dpdk.org",
        "web_url": "",
        "scm_url": "git://dpdk.org/tools/dts",
        "webscm_url": "http://git.dpdk.org/tools/dts/",
        "list_archive_url": "https://inbox.dpdk.org/dts",
        "list_archive_url_format": "https://inbox.dpdk.org/dts/{}",
        "commit_url_format": ""
    },
    "msgid": "<20221222094637.23135-1-weiyuanx.li@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20221222094637.23135-1-weiyuanx.li@intel.com",
    "date": "2022-12-22T09:46:36",
    "name": "[V5,1/2] tests/meson_tests: modify meson_tests suite to support test config parameter",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "feb5c84d208d0df6e084865d8c908105a71e0c34",
    "submitter": {
        "id": 2477,
        "url": "https://patches.dpdk.org/api/people/2477/?format=api",
        "name": "Weiyuan Li",
        "email": "weiyuanx.li@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dts/patch/20221222094637.23135-1-weiyuanx.li@intel.com/mbox/",
    "series": [
        {
            "id": 26248,
            "url": "https://patches.dpdk.org/api/series/26248/?format=api",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=26248",
            "date": "2022-12-22T09:46:36",
            "name": "[V5,1/2] tests/meson_tests: modify meson_tests suite to support test config parameter",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/26248/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/121291/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/121291/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dts-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 9340BA034C;\n\tThu, 22 Dec 2022 10:46:43 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 682C740698;\n\tThu, 22 Dec 2022 10:46:43 +0100 (CET)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 81DC7400D7\n for <dts@dpdk.org>; Thu, 22 Dec 2022 10:46:41 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Dec 2022 01:46:40 -0800",
            "from unknown (HELO localhost.localdomain) ([10.239.252.248])\n by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Dec 2022 01:46:38 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1671702401; x=1703238401;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=vQDZ5FsK1R91MvFBdfOITGjfO5DhbwbZeLKjHDIcMfc=;\n b=TcflnnWBf++ZRMJCz46z+i05pSoQAscnMPL6wDmVDEj9anKeAL4xuvHN\n LeWdROaX+mqi9/pVSc79lJ2uGoLbKXacRSpYbNUsflqtJSdbmSzctYR4f\n rCDMZASRhjeptkxuqaVR0ZsmJf6SSDl8ODaraIICwcyfb00/EuNar/911\n 4G9n4Savx6GPxmsxuwLuaXkMjS/k3EL3UccOujhdShIxZ4xbwCySDRJ/e\n MMFiI0ZaJ4+puYfL+gbKktbAed8jgghrdYpbpzy6NsMsr2gZQfIdoSewR\n Zg0jJeZeVQkwaln591VHLQ5ovcSvCSLFCQdbs0gRYyPndk8F9aSzKDYj4 Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10568\"; a=\"299759779\"",
            "E=Sophos;i=\"5.96,265,1665471600\"; d=\"scan'208\";a=\"299759779\"",
            "E=McAfee;i=\"6500,9779,10568\"; a=\"684132820\"",
            "E=Sophos;i=\"5.96,265,1665471600\"; d=\"scan'208\";a=\"684132820\""
        ],
        "From": "Weiyuan Li <weiyuanx.li@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Weiyuan Li <weiyuanx.li@intel.com>,\n\tYu Jiang <yux.jiang@intel.com>",
        "Subject": "[dts][PATCH V5 1/2] tests/meson_tests: modify meson_tests suite to\n support test config parameter",
        "Date": "Thu, 22 Dec 2022 17:46:36 +0800",
        "Message-Id": "<20221222094637.23135-1-weiyuanx.li@intel.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dts@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "test suite reviews and discussions <dts.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dts/>",
        "List-Post": "<mailto:dts@dpdk.org>",
        "List-Help": "<mailto:dts-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dts-bounces@dpdk.org"
    },
    "content": "Modify meson_tests suite to support test config (TIMEOUT_MULTIPLIER, TEST_ARGS etc.) in conf/meson_tests.cfg.\n\nSigned-off-by: Weiyuan Li <weiyuanx.li@intel.com>\n---\nTested-by: Yu Jiang <yux.jiang@intel.com>\n\nv2:\n-modify profile parameter descriptions and configuration items.\nv3:\n-modify configuration file comments.\n-the modification script uses the framework API to read the\nconfiguration file.\n-modify the log to the temporary directory.\nv4:\n-test script meson_param method optimization.\nv5:\n-Optimize the copy method and use the framework API.\n\n tests/TestSuite_meson_tests.py | 62 ++++++++++++++--------------------\n 1 file changed, 26 insertions(+), 36 deletions(-)",
    "diff": "diff --git a/tests/TestSuite_meson_tests.py b/tests/TestSuite_meson_tests.py\nindex ee95fffa..42fd37af 100644\n--- a/tests/TestSuite_meson_tests.py\n+++ b/tests/TestSuite_meson_tests.py\n@@ -66,7 +66,6 @@ class TestMesonTests(TestCase):\n         skip = []\n         timeout = []\n         failed = []\n-\n         self.verify(\n             bool(self.meson_auto_test),\n             f\"Test failed the meson no test results were obtained.\",\n@@ -99,24 +98,19 @@ class TestMesonTests(TestCase):\n                 sub_timeout = \"[\" + \",\".join(timeout) + \"] sub case time out. \"\n             self.verify(False, f\"Test failed. {sub_fail}{sub_timeout}\")\n \n-    def check_scp_file_valid_between_dut(self):\n-        out = self.tester.send_command(\n-            f\"scp root@{self.dut_ip}:/root/{self.dut_pathlog} {self.base_output}\",\n-            timeout=15,\n+    def meson_param(self, case_name):\n+        return (\n+            self.get_suite_cfg().get(case_name, \"\")\n+            + \" \"\n+            + self.get_suite_cfg().get(\"param\", \"\")\n         )\n-        if \"Are you sure you want to continue connecting\" in out:\n-            out = self.tester.send_command(\"yes\", timeout=20)\n-        for item in range(30):\n-            if \"password\" in out:\n-                self.tester.send_command(self.dut.get_password(), timeout=20)\n-                break\n \n-        out = self.tester.send_command(\n-            f\"ls -l {self.base_output}/{self.dut_pathlog}\", \"# \"\n-        )\n-        self.verify(\n-            \"No such file or directory\" not in out, \"No test result log was obtained!\"\n-        )\n+    def copy_file_from_dut(self):\n+        if os.path.exists(os.path.join(self.base_output, self.dut_pathlog)):\n+            os.remove(os.path.join(self.base_output, self.dut_pathlog))\n+\n+        src_pathlog = f\"~/tmp/{self.dut_pathlog}\"\n+        self.dut.session.copy_file_from(src_pathlog, self.base_output)\n \n     def insmod_kni(self):\n         out = self.dut.send_expect(\"lsmod | grep rte_kni\", \"# \")\n@@ -141,68 +135,64 @@ class TestMesonTests(TestCase):\n         self.check_sub_case()\n \n     def test_fasts(self):\n+        param = self.meson_param(\"fast-tests\")\n         # init file name\n         self.dut_pathlog = \"fast-test.log\"\n         self.delete_exists_files()\n         self.insmod_kni()\n         # config test case list in conf/meson_tests.cfg\n-        caselist = self.get_suite_cfg()[\"fast-tests\"]\n-        cmds = f'meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:fast-tests {caselist} -t {self.ratio} --test-args=\"-c 0xff\" |tee /root/{self.dut_pathlog}'\n+        cmds = f\"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:fast-tests {param} |tee ~/tmp/{self.dut_pathlog}\"\n         out = self.dut.send_expect(cmds, \"# \", self.execute_wait_time)\n         self.logger.info(out)\n-        self.check_scp_file_valid_between_dut()\n+        self.copy_file_from_dut()\n         self.check_meson_test_result()\n \n     def test_driver(self):\n+        param = self.meson_param(\"driver-tests\")\n         # init file name\n         self.dut_pathlog = \"driver-test.log\"\n         self.delete_exists_files()\n-        # config test case list in conf/meson_tests.cfg\n-        caselist = self.get_suite_cfg()[\"driver-tests\"]\n-        cmds = f'meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:driver-tests {caselist} -t {self.ratio} --test-args=\"-c 0xff\" |tee /root/{self.dut_pathlog}'\n+        cmds = f\"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:driver-tests {param} |tee ~/tmp/{self.dut_pathlog}\"\n         out = self.dut.send_expect(cmds, \"# \", self.execute_wait_time)\n         self.logger.info(out)\n-        self.check_scp_file_valid_between_dut()\n+        self.copy_file_from_dut()\n         self.check_meson_test_result()\n \n     def test_debug(self):\n+        param = self.meson_param(\"debug-tests\")\n         self.dut_pathlog = \"test-debug.log\"\n         # delete exists files\n         self.delete_exists_files()\n-        # config test case list in conf/meson_tests.cfg\n-        caselist = self.get_suite_cfg()[\"debug-tests\"]\n-        cmds = f'meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:debug-tests {caselist} -t {self.ratio} --test-args=\"-c 0xff\" |tee /root/{self.dut_pathlog}'\n+        cmds = f\"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:debug-tests {param} |tee ~/tmp/{self.dut_pathlog}\"\n         out = self.dut.send_expect(cmds, \"# \", self.execute_wait_time)\n         self.logger.info(out)\n-        self.check_scp_file_valid_between_dut()\n+        self.copy_file_from_dut()\n         self.check_meson_test_result()\n \n     def test_extra(self):\n+        param = self.meson_param(\"extra-tests\")\n         self.dut_pathlog = \"extra-test.log\"\n         # delete exists files\n         self.delete_exists_files()\n-        # config test case list in conf/meson_tests.cfg\n-        caselist = self.get_suite_cfg()[\"extra-tests\"]\n-        cmds = f'meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:extra-tests {caselist} -t {self.ratio} --test-args=\"-c 0xff\" |tee /root/{self.dut_pathlog}'\n+        cmds = f\"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:extra-tests {param} |tee ~/tmp/{self.dut_pathlog}\"\n         out = self.dut.send_expect(cmds, \"# \", self.execute_wait_time)\n         self.logger.info(out)\n-        self.check_scp_file_valid_between_dut()\n+        self.copy_file_from_dut()\n         self.check_meson_test_result()\n         self.logger.warning(\n             \"Extra-tests are know issues which are recorded in DPDK commit and meson.build (detail see test plan)\"\n         )\n \n     def test_perf(self):\n+        param = self.meson_param(\"perf-tests\")\n         # init file name\n         self.dut_pathlog = \"perf-test.log\"\n         # delete exists files\n         self.delete_exists_files()\n-        # config test case list in conf/meson_tests.cfg\n-        caselist = self.get_suite_cfg()[\"perf-tests\"]\n-        cmds = f'meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:perf-tests {caselist} -t {self.ratio} --test-args=\"-c 0xff\" |tee /root/{self.dut_pathlog}'\n+        cmds = f\"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:perf-tests {param} |tee ~/tmp/{self.dut_pathlog}\"\n         out = self.dut.send_expect(cmds, \"# \", self.execute_wait_time)\n         self.logger.info(out)\n-        self.check_scp_file_valid_between_dut()\n+        self.copy_file_from_dut()\n         self.check_meson_test_result()\n \n     def tear_down(self):\n",
    "prefixes": [
        "V5",
        "1/2"
    ]
}