get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43354,
    "url": "http://patchwork.dpdk.org/api/patches/43354/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/7c3d473da9d4de99086c87424369e3b4d5081547.1532526128.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<7c3d473da9d4de99086c87424369e3b4d5081547.1532526128.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/7c3d473da9d4de99086c87424369e3b4d5081547.1532526128.git.anatoly.burakov@intel.com",
    "date": "2018-07-25T13:44:26",
    "name": "[v2] test: fix prefix discovery",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6292d904155312f80eb61d1a9629e5232fdbd6ec",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/7c3d473da9d4de99086c87424369e3b4d5081547.1532526128.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 769,
            "url": "http://patchwork.dpdk.org/api/series/769/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=769",
            "date": "2018-07-25T13:44:26",
            "name": "[v2] test: fix prefix discovery",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/769/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/43354/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/43354/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4142A31FC;\n\tWed, 25 Jul 2018 15:44:47 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id B4B872BAC\n\tfor <dev@dpdk.org>; Wed, 25 Jul 2018 15:44:44 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jul 2018 06:44:43 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga007.jf.intel.com with ESMTP; 25 Jul 2018 06:44:27 -0700",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tw6PDiQnM002666; Wed, 25 Jul 2018 14:44:26 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w6PDiQ3K028199;\n\tWed, 25 Jul 2018 14:44:26 +0100",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w6PDiQKh028195;\n\tWed, 25 Jul 2018 14:44:26 +0100"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,401,1526367600\"; d=\"scan'208\";a=\"59367819\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "reshma.pattan@intel.com",
        "Date": "Wed, 25 Jul 2018 14:44:26 +0100",
        "Message-Id": "<7c3d473da9d4de99086c87424369e3b4d5081547.1532526128.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": "<ccaf5f7c79b1da882dafdcd057585bd1bd20b150.1531747666.git.anatoly.burakov@intel.com>",
        "References": "<ccaf5f7c79b1da882dafdcd057585bd1bd20b150.1531747666.git.anatoly.burakov@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2] test: fix prefix discovery",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Config file has moved, but the tests weren't updated to point to\nits new location. Update the code to find current prefix.\n\nAlso, this function is duplicated across multiple tests, so move it\ninto process.h and force compile failures for any attempts to use\nit on platforms other than Linux.\n\nFixes: adf1d867361c (\"eal: move runtime config file to new location\")\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nAcked-by: Reshma Pattan <reshma.pattan@intel.com>\n---\n test/test/process.h           | 29 ++++++++++++++++++++++++\n test/test/test_eal_flags.c    | 42 +++++++++--------------------------\n test/test/test_mp_secondary.c | 26 ----------------------\n 3 files changed, 39 insertions(+), 58 deletions(-)",
    "diff": "diff --git a/test/test/process.h b/test/test/process.h\nindex 11986d5c2..ba3a18502 100644\n--- a/test/test/process.h\n+++ b/test/test/process.h\n@@ -5,6 +5,11 @@\n #ifndef _PROCESS_H_\n #define _PROCESS_H_\n \n+#include <limits.h> /* PATH_MAX */\n+#include <libgen.h> /* basename et al */\n+#include <stdlib.h> /* NULL */\n+#include <unistd.h> /* readlink */\n+\n #ifdef RTE_EXEC_ENV_BSDAPP\n #define self \"curproc\"\n #define exe \"file\"\n@@ -61,4 +66,28 @@ process_dup(const char *const argv[], int numargs, const char *env_value)\n \treturn status;\n }\n \n+/* FreeBSD doesn't support file prefixes, so force compile failures for any\n+ * tests attempting to use this function on FreeBSD.\n+ */\n+#ifdef RTE_EXEC_ENV_LINUXAPP\n+static char *\n+get_current_prefix(char *prefix, int size)\n+{\n+\tchar path[PATH_MAX] = {0};\n+\tchar buf[PATH_MAX] = {0};\n+\n+\t/* get file for config (fd is always 3) */\n+\tsnprintf(path, sizeof(path), \"/proc/self/fd/%d\", 3);\n+\n+\t/* return NULL on error */\n+\tif (readlink(path, buf, sizeof(buf)) == -1)\n+\t\treturn NULL;\n+\n+\t/* get the prefix */\n+\tsnprintf(prefix, size, \"%s\", basename(dirname(buf)));\n+\n+\treturn prefix;\n+}\n+#endif\n+\n #endif /* _PROCESS_H_ */\ndiff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c\nindex f840ca50b..c9a1d3a12 100644\n--- a/test/test/test_eal_flags.c\n+++ b/test/test/test_eal_flags.c\n@@ -221,30 +221,6 @@ get_number_of_sockets(void)\n }\n #endif\n \n-static char*\n-get_current_prefix(char * prefix, int size)\n-{\n-\tchar path[PATH_MAX] = {0};\n-\tchar buf[PATH_MAX] = {0};\n-\n-\t/* get file for config (fd is always 3) */\n-\tsnprintf(path, sizeof(path), \"/proc/self/fd/%d\", 3);\n-\n-\t/* return NULL on error */\n-\tif (readlink(path, buf, sizeof(buf)) == -1)\n-\t\treturn NULL;\n-\n-\t/* get the basename */\n-\tsnprintf(buf, sizeof(buf), \"%s\", basename(buf));\n-\n-\t/* copy string all the way from second char up to start of _config */\n-\tsnprintf(prefix, size, \"%.*s\",\n-\t\t\t(int)(strnlen(buf, sizeof(buf)) - sizeof(\"_config\")),\n-\t\t\t&buf[1]);\n-\n-\treturn prefix;\n-}\n-\n /*\n  * Test that the app doesn't run with invalid whitelist option.\n  * Final tests ensures it does run with valid options as sanity check (one\n@@ -697,16 +673,18 @@ test_invalid_n_flag(void)\n static int\n test_no_hpet_flag(void)\n {\n-\tchar prefix[PATH_MAX], tmp[PATH_MAX];\n+\tchar prefix[PATH_MAX] = \"\";\n \n #ifdef RTE_EXEC_ENV_BSDAPP\n \treturn 0;\n-#endif\n+#else\n+\tchar tmp[PATH_MAX];\n \tif (get_current_prefix(tmp, sizeof(tmp)) == NULL) {\n \t\tprintf(\"Error - unable to get current prefix!\\n\");\n \t\treturn -1;\n \t}\n \tsnprintf(prefix, sizeof(prefix), \"--file-prefix=%s\", tmp);\n+#endif\n \n \t/* With --no-hpet */\n \tconst char *argv1[] = {prgname, prefix, mp_flag, no_hpet, \"-c\", \"1\", \"-n\", \"2\"};\n@@ -977,9 +955,15 @@ test_file_prefix(void)\n \t * 6. run a primary process with memtest2 prefix\n \t * 7. check that only memtest2 hugefiles are present in the hugedir\n \t */\n+\tchar prefix[PATH_MAX] = \"\";\n \n #ifdef RTE_EXEC_ENV_BSDAPP\n \treturn 0;\n+#else\n+\tif (get_current_prefix(prefix, sizeof(prefix)) == NULL) {\n+\t\tprintf(\"Error - unable to get current prefix!\\n\");\n+\t\treturn -1;\n+\t}\n #endif\n \n \t/* this should fail unless the test itself is run with \"memtest\" prefix */\n@@ -994,12 +978,6 @@ test_file_prefix(void)\n \tconst char *argv2[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", DEFAULT_MEM_SIZE,\n \t\t\t\t\"--file-prefix=\" memtest2 };\n \n-\tchar prefix[32];\n-\tif (get_current_prefix(prefix, sizeof(prefix)) == NULL) {\n-\t\tprintf(\"Error - unable to get current prefix!\\n\");\n-\t\treturn -1;\n-\t}\n-\n \t/* check if files for current prefix are present */\n \tif (process_hugefiles(prefix, HUGEPAGE_CHECK_EXISTS) != 1) {\n \t\tprintf(\"Error - hugepage files for %s were not created!\\n\", prefix);\ndiff --git a/test/test/test_mp_secondary.c b/test/test/test_mp_secondary.c\nindex cc46cf4de..b597dfcdf 100644\n--- a/test/test/test_mp_secondary.c\n+++ b/test/test/test_mp_secondary.c\n@@ -50,32 +50,6 @@\n #define launch_proc(ARGV) process_dup(ARGV, \\\n \t\tsizeof(ARGV)/(sizeof(ARGV[0])), __func__)\n \n-#ifdef RTE_EXEC_ENV_LINUXAPP\n-static char*\n-get_current_prefix(char * prefix, int size)\n-{\n-\tchar path[PATH_MAX] = {0};\n-\tchar buf[PATH_MAX] = {0};\n-\n-\t/* get file for config (fd is always 3) */\n-\tsnprintf(path, sizeof(path), \"/proc/self/fd/%d\", 3);\n-\n-\t/* return NULL on error */\n-\tif (readlink(path, buf, sizeof(buf)) == -1)\n-\t\treturn NULL;\n-\n-\t/* get the basename */\n-\tsnprintf(buf, sizeof(buf), \"%s\", basename(buf));\n-\n-\t/* copy string all the way from second char up to start of _config */\n-\tsnprintf(prefix, size, \"%.*s\",\n-\t\t\t(int)(strnlen(buf, sizeof(buf)) - sizeof(\"_config\")),\n-\t\t\t&buf[1]);\n-\n-\treturn prefix;\n-}\n-#endif\n-\n /*\n  * This function is called in the primary i.e. main test, to spawn off secondary\n  * processes to run actual mp tests. Uses fork() and exec pair\n",
    "prefixes": [
        "v2"
    ]
}