Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/129659/?format=api
http://patchwork.dpdk.org/api/patches/129659/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230720092254.54157-7-fengchengwen@huawei.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": "<20230720092254.54157-7-fengchengwen@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230720092254.54157-7-fengchengwen@huawei.com", "date": "2023-07-20T09:22:54", "name": "[v19,6/6] test/memarea: support dump API test", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "28e08c5fa1ab84d51c4defe16fa2003ec3dd23ac", "submitter": { "id": 2146, "url": "http://patchwork.dpdk.org/api/people/2146/?format=api", "name": "fengchengwen", "email": "fengchengwen@huawei.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230720092254.54157-7-fengchengwen@huawei.com/mbox/", "series": [ { "id": 28981, "url": "http://patchwork.dpdk.org/api/series/28981/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28981", "date": "2023-07-20T09:22:53", "name": "introduce memarea library", "version": 19, "mbox": "http://patchwork.dpdk.org/series/28981/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/129659/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/129659/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 7297442EBF;\n\tThu, 20 Jul 2023 11:31:35 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AD73442B8E;\n\tThu, 20 Jul 2023 11:31:15 +0200 (CEST)", "from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255])\n by mails.dpdk.org (Postfix) with ESMTP id AEDD840DF5\n for <dev@dpdk.org>; Thu, 20 Jul 2023 11:31:10 +0200 (CEST)", "from dggpeml100024.china.huawei.com (unknown [172.30.72.53])\n by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4R66qN0KHdz18Lk7;\n Thu, 20 Jul 2023 17:30:24 +0800 (CST)", "from localhost.localdomain (10.50.163.32) by\n dggpeml100024.china.huawei.com (7.185.36.115) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.27; Thu, 20 Jul 2023 17:31:08 +0800" ], "From": "Chengwen Feng <fengchengwen@huawei.com>", "To": "<thomas@monjalon.net>, <david.marchand@redhat.com>", "CC": "<dev@dpdk.org>, <mb@smartsharesystems.com>, <anatoly.burakov@intel.com>,\n <dmitry.kozliuk@gmail.com>, <jerinjacobk@gmail.com>, <hofors@lysator.liu.se>,\n <stephen@networkplumber.org>", "Subject": "[PATCH v19 6/6] test/memarea: support dump API test", "Date": "Thu, 20 Jul 2023 09:22:54 +0000", "Message-ID": "<20230720092254.54157-7-fengchengwen@huawei.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20230720092254.54157-1-fengchengwen@huawei.com>", "References": "<20220721044648.6817-1-fengchengwen@huawei.com>\n <20230720092254.54157-1-fengchengwen@huawei.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"UTF-8\"", "Content-Transfer-Encoding": "8bit", "X-Originating-IP": "[10.50.163.32]", "X-ClientProxiedBy": "dggems705-chm.china.huawei.com (10.3.19.182) To\n dggpeml100024.china.huawei.com (7.185.36.115)", "X-CFilter-Loop": "Reflected", "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": "This patch supports rte_memarea_dump() API test.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nReviewed-by: Dongdong Liu <liudongdong3@huawei.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\n---\n app/test/test_memarea.c | 52 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 52 insertions(+)", "diff": "diff --git a/app/test/test_memarea.c b/app/test/test_memarea.c\nindex 805fb82d08..e793022aa2 100644\n--- a/app/test/test_memarea.c\n+++ b/app/test/test_memarea.c\n@@ -353,6 +353,57 @@ test_memarea_alloc_free(void)\n \n \tTEST_ASSERT(rte_errno == 0, \"Expected Zero\");\n \n+\tfprintf(stderr, \"There should have no allocated object.\\n\");\n+\trte_memarea_dump(ma, stderr, true);\n+\n+\trte_memarea_destroy(ma);\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n+static int\n+test_memarea_dump(void)\n+{\n+\tstruct rte_memarea_param init;\n+\tuint32_t alloced_num = 0;\n+\tstruct rte_memarea *ma;\n+\tvoid *ptr;\n+\tint ret;\n+\n+\ttest_memarea_init_param(&init);\n+\tinit.source = RTE_MEMAREA_SOURCE_LIBC;\n+\tinit.total_sz = MEMAREA_TEST_DEFAULT_SIZE;\n+\tma = rte_memarea_create(&init);\n+\tTEST_ASSERT(ma != NULL, \"Memarea creation failed\");\n+\n+\t/* test for invalid parameters */\n+\trte_errno = 0;\n+\tret = rte_memarea_dump(NULL, stderr, false);\n+\tTEST_ASSERT(ret == -1, \"Expected -1\");\n+\tTEST_ASSERT(rte_errno == EINVAL, \"Expected EINVAL\");\n+\trte_errno = 0;\n+\tret = rte_memarea_dump(ma, NULL, false);\n+\tTEST_ASSERT(ret == -1, \"Expected -1\");\n+\tTEST_ASSERT(rte_errno == EINVAL, \"Expected EINVAL\");\n+\n+\t/* test for dump */\n+\tptr = rte_memarea_alloc(ma, 1);\n+\tTEST_ASSERT(ptr != NULL, \"Memarea allocation failed\");\n+\talloced_num++;\n+\tptr = rte_memarea_alloc(ma, 1);\n+\tTEST_ASSERT(ptr != NULL, \"Memarea allocation failed\");\n+\talloced_num++;\n+\tptr = rte_memarea_alloc(ma, 1);\n+\tTEST_ASSERT(ptr != NULL, \"Memarea allocation failed\");\n+\talloced_num++;\n+\tptr = rte_memarea_alloc(ma, MEMAREA_TEST_DEFAULT_SIZE);\n+\tTEST_ASSERT(ptr == NULL, \"Memarea allocation expect fail\");\n+\tptr = rte_memarea_alloc(ma, MEMAREA_TEST_DEFAULT_SIZE);\n+\tTEST_ASSERT(ptr == NULL, \"Memarea allocation expect fail\");\n+\tfprintf(stderr, \"There should have %u allocated object.\\n\", alloced_num);\n+\tret = rte_memarea_dump(ma, stderr, true);\n+\tTEST_ASSERT(ret == 0, \"Memarea dump failed\");\n+\n \trte_memarea_destroy(ma);\n \n \treturn TEST_SUCCESS;\n@@ -370,6 +421,7 @@ static struct unit_test_suite memarea_test_suite = {\n \t\tTEST_CASE(test_memarea_alloc_fail),\n \t\tTEST_CASE(test_memarea_free_fail),\n \t\tTEST_CASE(test_memarea_alloc_free),\n+\t\tTEST_CASE(test_memarea_dump),\n \n \t\tTEST_CASES_END() /**< NULL terminate unit test array */\n \t}\n", "prefixes": [ "v19", "6/6" ] }{ "id": 129659, "url": "