Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/54338/?format=api
http://patches.dpdk.org/api/patches/54338/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1559638792-8608-8-git-send-email-david.marchand@redhat.com/", "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": "<1559638792-8608-8-git-send-email-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1559638792-8608-8-git-send-email-david.marchand@redhat.com", "date": "2019-06-04T08:59:45", "name": "[07/14] test/latencystats: fix stack smashing", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "014f4ae49c95915db5e2dfcd03ab4ce5176ae91b", "submitter": { "id": 1173, "url": "http://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "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/1559638792-8608-8-git-send-email-david.marchand@redhat.com/mbox/", "series": [ { "id": 4883, "url": "http://patches.dpdk.org/api/series/4883/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4883", "date": "2019-06-04T08:59:38", "name": "Unit tests fixes for CI", "version": 1, "mbox": "http://patches.dpdk.org/series/4883/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/54338/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/54338/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 79D9E1BB6F;\n\tTue, 4 Jun 2019 11:00:45 +0200 (CEST)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id 175601BBF9;\n\tTue, 4 Jun 2019 11:00:44 +0200 (CEST)", "from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7066A3107B1F;\n\tTue, 4 Jun 2019 09:00:43 +0000 (UTC)", "from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com\n\t[10.36.116.185])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 0D31118A5D;\n\tTue, 4 Jun 2019 09:00:38 +0000 (UTC)" ], "From": "David Marchand <david.marchand@redhat.com>", "To": "dev@dpdk.org", "Cc": "thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com,\n\tstable@dpdk.org, Reshma Pattan <reshma.pattan@intel.com>", "Date": "Tue, 4 Jun 2019 10:59:45 +0200", "Message-Id": "<1559638792-8608-8-git-send-email-david.marchand@redhat.com>", "In-Reply-To": "<1559638792-8608-1-git-send-email-david.marchand@redhat.com>", "References": "<1559638792-8608-1-git-send-email-david.marchand@redhat.com>", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.47]); Tue, 04 Jun 2019 09:00:43 +0000 (UTC)", "Subject": "[dpdk-dev] [PATCH 07/14] test/latencystats: fix stack smashing", "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": "Caught in one Travis run:\n + ------------------------------------------------------- +\n + Test Suite : Latency Stats Unit Test Suite\n + ------------------------------------------------------- +\n + TestCase [ 0] : test_latency_init succeeded\n + TestCase [ 1] : test_latency_update succeeded\n[snip]\n + TestCase [1601724781] : test_latencystats_get_names succeeded\n[snip]\n + Tests Failed : 1601790830\n\nhtonl(1601724781) -> \"m\", \"a\", \"x\", \"_\"\nhtonl(1601790830) -> \"n\", \"c\", \"y\", \"_\"\n\nLooks like someone went too far.\n\nThe test passes a bigger size than the array it passes along.\n\nFixes: 1e3676a06e4c (\"test/latency: add unit tests for latencystats library\")\nCc: stable@dpdk.org\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n app/test/test_latencystats.c | 18 ------------------\n 1 file changed, 18 deletions(-)", "diff": "diff --git a/app/test/test_latencystats.c b/app/test/test_latencystats.c\nindex 039c508..8dd794b 100644\n--- a/app/test/test_latencystats.c\n+++ b/app/test/test_latencystats.c\n@@ -69,13 +69,10 @@ static int test_latencystats_get_names(void)\n \tint ret = 0, i = 0;\n \tint size = 0;\n \tstruct rte_metric_name names[NUM_STATS];\n-\tstruct rte_metric_name wrongnames[NUM_STATS - 2];\n \n \tsize_t m_size = sizeof(struct rte_metric_name);\n \tfor (i = 0; i < NUM_STATS; i++)\n \t\tmemset(&names[i], 0, m_size);\n-\tfor (i = 0; i < NUM_STATS - 2; i++)\n-\t\tmemset(&wrongnames[i], 0, m_size);\n \n \t/* Success Test: Valid names and size */\n \tsize = NUM_STATS;\n@@ -99,10 +96,6 @@ static int test_latencystats_get_names(void)\n \tTEST_ASSERT((ret == NUM_STATS), \"Test Failed to get the metrics count,\"\n \t\t \"Actual: %d Expected: %d\", ret, NUM_STATS);\n \n-\t/* Failure Test: Invalid names (array size lesser than size) */\n-\tsize = NUM_STATS + 1;\n-\tret = rte_latencystats_get_names(wrongnames, size);\n-\tTEST_ASSERT((ret == NUM_STATS), \"Test Failed to get metrics names\");\n \treturn TEST_SUCCESS;\n }\n \n@@ -112,13 +105,10 @@ static int test_latencystats_get(void)\n \tint ret = 0, i = 0;\n \tint size = 0;\n \tstruct rte_metric_value values[NUM_STATS];\n-\tstruct rte_metric_value wrongvalues[NUM_STATS - 2];\n \n \tsize_t v_size = sizeof(struct rte_metric_value);\n \tfor (i = 0; i < NUM_STATS; i++)\n \t\tmemset(&values[i], 0, v_size);\n-\tfor (i = 0; i < NUM_STATS - 2; i++)\n-\t\tmemset(&wrongvalues[i], 0, v_size);\n \n \t/* Success Test: Valid values and valid size */\n \tsize = NUM_STATS;\n@@ -137,14 +127,6 @@ static int test_latencystats_get(void)\n \tTEST_ASSERT((ret == NUM_STATS), \"Test Failed to get the stats count,\"\n \t\t \"Actual: %d Expected: %d\", ret, NUM_STATS);\n \n-\t/* Failure Test: Invalid values(array size lesser than size)\n-\t * and invalid size\n-\t */\n-\tsize = NUM_STATS + 2;\n-\tret = rte_latencystats_get(wrongvalues, size);\n-\tTEST_ASSERT(ret == NUM_STATS, \"Test Failed to get latency metrics\"\n-\t\t\t\" values\");\n-\n \treturn TEST_SUCCESS;\n }\n \n", "prefixes": [ "07/14" ] }{ "id": 54338, "url": "