From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0074.outbound.protection.outlook.com [104.47.40.74]) by dpdk.org (Postfix) with ESMTP id 82FA41B1D0 for ; Mon, 8 Jan 2018 14:48:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=B6USIU3ivXmYB/ssabWTWTPkrKyZWSTIBPgFD9ZcsF0=; b=DR68FJxLLgKIBmqhq831bf0SkO9tpHwPzYwwj/ouTdIbPBE132XY1HoryhvZWoUMnezscKx7Aqqh1hUor0PT5iqFed9+JvxF7sSTIdCzNylVpK//jD9RkArjlxJK5sg+HXaTZ4tr0XhM1i0Ky0XLKSZFye8drgcQNIiCoVycOvM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by MWHPR07MB3470.namprd07.prod.outlook.com (10.164.192.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Mon, 8 Jan 2018 13:48:37 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com, gage.eads@intel.com, liang.j.ma@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Mon, 8 Jan 2018 19:17:39 +0530 Message-Id: <20180108134742.30857-8-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180108134742.30857-1-pbhagavatula@caviumnetworks.com> References: <20171212192713.17620-1-pbhagavatula@caviumnetworks.com> <20180108134742.30857-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR06CA0105.apcprd06.prod.outlook.com (10.170.138.31) To MWHPR07MB3470.namprd07.prod.outlook.com (10.164.192.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 25116b68-6cb9-42d3-a125-08d5569e860c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:MWHPR07MB3470; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3470; 3:aDgLcloJ/AT8S27HEiqsO0mvHlTEt2yBwZtudhhImI1z9IZUxP3DEg/h5sSg7RzcEKPt3Ld1sYn6qyMUoDHcutthO9JmloTadk13RimX2NX+oCbRQ9LgSeJPV2GgKiQru79m9JwG1Pg5XU5XkTNC2CCT9urd7xDQ9bCGC4ad3U5A4u9SyA1p9swZATzsM2dgp44gYuWxUY2nDdz32ANksGtgy1ay2hbFyAdHzippklAQ/QE5BVb58UiNV4Q1Hm9o; 25:vST0AyZGiHA1yLZytaFB3vL4ocBognI/ZUNE/lG11p8mfGffucmTY4xfWGSdNjprzBbL5pKYPodn0+cYbOjfC46K3XLDS+3mwHo//NbcGHqwkiT53Z4yVLizNrgwkNyxOs+ST/80XYOKkBpDAY7mGqDUKmp/X9XSSxprjIuY+7iaZ6aZs2yF9Ht8X651EQ8+C85y+gV/tpr9RDlcvsKaUxw132agFpYcCMhT8GV0CJjFGDULgeYuTeTP6yk27tH5ohASNf1rxUV4qG9O9Qy9BrwXcdoxS8k7dcsdkyrZGwjBuR7hwLmhJZbD83KQdXPZucKj5lqKL5uPJhe/4U/DtA==; 31:wWUqnCpGVbdaIcjjDayWRsvVu4htGALQd/eV+/L34oi9+E7urOHLZLgg6C9KPSbeCo/Ev2ptLE2r2u7KoW8IR4nGwAq0uV20Gyo3cttsnfliMFdLMY5LjGiBsNm/oez1pPo7JcPHSurS+L041dnYjIKWR1RkQf+BIzZ8sXpyicGAY8/s8PAqMjsF25HiKbYc0kPGdC8wiQLlEPQH9JNb5D9XR47XP9RTjQ9Xm2F5i8E= X-MS-TrafficTypeDiagnostic: MWHPR07MB3470: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3470; 20:xAHmX+VDcENCvAVaYD3EiYkaWMclzfyBmgEsb5QdRgP9LFjw+iAd6AbdODFCN3YXCBzwJfg9lbqvitrNddFVOg8WM9vIlMwJzzcFU3DA6YarGsWd/nNkHMSzNXsAGTxQtGC11vG2vkvaMAY50b0zTaSMbL2ajgac5of76J1lNy7DcntSLTMAfRxhPsgIsP2F62NU4SqWQXgq0PiLzcny+mEcBl24STYn70zyQtIABK09eoT/+e3Y+TvyJK4+ya8Bo+2m5RwD38JdumKJ8ij55rwol2h2cgAmm8LSMppUsVAl8iZAhMTXAJ9hpGXtiIj7niLYLFQSbqGlA2f3zzCIOY/Z/86RQUgVy5ly9lUcovYF3qPukfpBwib8zhT4hhu7FAyr7FOnAPHAnMiMaB50Z+yDCKu3Qn90Fume9RTGXqM8CEnHEu8VucjggbmsIx0dRYH5+5t8tGJmVHFQDR2sOZaubStPOn+D1fRQdhmggs6UI8ZEOwSkQVP1GUUgB5nhoQW0YnJcThdg1Pd/u032zbu9l1XlXohcU+sSCqvaDh3z9Svm5fOugthtFh5iOOKg/1RtS/MydzxUtS35FNGQt1P3KrgGqgXidoWkTjTAfS4=; 4:fbzqnM9QmY3lRVblO0JOPHbT7UIRvqaeHuCpreqOKdmlNxS+AEzexk0dYjEC34nMkm3zPIhZFfTJ01uYW1xV29EyitHNOCDljniEsq4TBsvaJQ0HRLPldZ0tz737sAhF3JaFNnlHf2eD1m2eV+k6HluW+eR0KcBXunVuLjBrIZyMrXPd3AXh3tVNFRIc7d49XzyL87D4q47wxaCHLOGrExI4UpH5cPJBXgrUqxr2uK1Dix/KDno8ArnPTlmeiIi+mCd2fFVV3CwboNoNLV/5RKGLeEKLuEWqgS1WYsVr6ilpZKfIzdjdsOdBS7hDuarU X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3231023)(944501075)(3002001)(10201501046)(93006095)(6041268)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011); SRVR:MWHPR07MB3470; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:MWHPR07MB3470; X-Forefront-PRVS: 054642504A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(366004)(346002)(376002)(39850400004)(39380400002)(396003)(189003)(199004)(1076002)(2906002)(305945005)(7736002)(6486002)(76176011)(51416003)(52116002)(2950100002)(36756003)(16526018)(6116002)(42882006)(316002)(3846002)(5660300001)(5009440100003)(16586007)(53936002)(48376002)(50466002)(8676002)(8936002)(50226002)(107886003)(81166006)(72206003)(68736007)(478600001)(105586002)(6506007)(106356001)(97736004)(386003)(47776003)(25786009)(66066001)(81156014)(6512007)(4326008)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3470; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3470; 23:mIh24QDh7sMrInz2xhfz/ptmwHjOmwGTHGaPao+w7?= =?us-ascii?Q?1YzeeZZ26YqTjSs80BnRNJU3B2gAmHM6G4FvvbI5YhdCbvnKMK7Lj+DO3Gt4?= =?us-ascii?Q?06I707rdYUzLQrbEc/FnWeSCCb/gFFkjEYh2sanI4zgJSQNEZ8kWQWXRvM/k?= =?us-ascii?Q?sY9LAXf8h2LmU6ZPlTVvx8LCySEC2nttApe4iXAJ3VaZDS1sHmtm3Es/8lDt?= =?us-ascii?Q?qikTxXCrCyo+S5ZDbVlWELmj7HUyOBqSldUiKCxEW2dif8NCqeIUChg5PeUv?= =?us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OcLda/AI+RnpX/CiaO9OJDGNEx5qow=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3470; 6:sp7/De7NKJOpfWgkJxjZpVgQszAWKCBAY7/TF8yQwijvh+LH3xwNYV2PmD0slJ2TtVdzddTz3hJEQ0PVDuBE7McaI8aQYa/eebPRjTv6BZXSfIgFWnjQkcut4YX00mJsIT/klBG3dPmTtkxgAKy3Oq3tUHG4UfibGawWA95RKboni5vEmOLWQYUCyBzfKal9DcyFtwoPN5sRJGseK6CKRvjmQt2pRK+FmnZXMVsoNQbAQYbaydcQF5nxBNyBoIjVB8w/t1F8s0HlVK0yNviGi7F3g20fqOhc0+ZHi0xS0U1M2b/MNitG4mYgJFQpVS7JMvHA5H3ILr9hdzypdlflX7qVAXsT68R/U05UGMcWwQw=; 5:AbC3U2PBRLQpiVozUpvy/MR0Atp8MGR51Pyp1gVPGt0myz6l0w0Uz+oVVqONW4cYkH5aRlhEGk/xu4/P46opJlqXB5ipGifX0ZxvHT6ujvV2j9ddbvutbDEipfPC+n7E2IRvkt+t99LEknpiFhElhHWo9i2FFY4t0mUD08rjs2Y=; 24:hwUyzFWWEdYk3hag10ApRZ3LcnVIhIFKsZaMEfj4GmjafhEUx10QqWI/pnM79wmvDYszLaoyLfFQaq6Va8WOzvgOguoKgQrPAONlqDrLhs4=; 7:Xm8udlKYaH5VeWK42D5OSqWX0D6PXv78WQvEbNzvOmd4kLGt8G3523WVORWArBlgtVFY4sJXBh03+qXoBc8gBWr70IAGzhZ88g8P2BuXHAEoVdeVTsv+uYmpiGKK4uTiK+oQ258TUEzgebMTBHpSsr5Z1yRMBc1ConmtIznAo+MpIJy/dO/viZjDFQblqsHI2rUSUHFfu76fU2DquBUtQn+5fnDqssnfQGLxfRnoYRU3Thz7o33RRTWL+hkDCv8S SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2018 13:48:37.6745 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 25116b68-6cb9-42d3-a125-08d5569e860c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3470 Subject: [dpdk-dev] [PATCH v4 08/11] event/sw: modify eventdev software test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2018 13:48:42 -0000 Modify test_eventdev_sw to be standalone selftest independent of test framework. Signed-off-by: Pavan Nikhilesh Acked-by: Harry van Haaren --- drivers/event/sw/sw_evdev_selftest.c | 70 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c index 4108b00bf..0e84b2003 100644 --- a/drivers/event/sw/sw_evdev_selftest.c +++ b/drivers/event/sw/sw_evdev_selftest.c @@ -52,7 +52,7 @@ #include #include -#include "test.h" +#include "sw_evdev.h" #define MAX_PORTS 16 #define MAX_QIDS 16 @@ -3042,7 +3042,7 @@ worker_loopback(struct test *t, uint8_t disable_implicit_release) static struct rte_mempool *eventdev_func_mempool; -static int +int test_sw_eventdev(void) { struct test *t = malloc(sizeof(struct test)); @@ -3053,25 +3053,25 @@ test_sw_eventdev(void) */ release_ev.op = RTE_EVENT_OP_RELEASE; - const char *eventdev_name = "event_sw0"; + const char *eventdev_name = "event_sw"; evdev = rte_event_dev_get_dev_id(eventdev_name); if (evdev < 0) { printf("%d: Eventdev %s not found - creating.\n", __LINE__, eventdev_name); if (rte_vdev_init(eventdev_name, NULL) < 0) { printf("Error creating eventdev\n"); - return -1; + goto test_fail; } evdev = rte_event_dev_get_dev_id(eventdev_name); if (evdev < 0) { printf("Error finding newly created eventdev\n"); - return -1; + goto test_fail; } } if (rte_event_dev_service_id_get(evdev, &t->service_id) < 0) { printf("Failed to get service ID for software event dev\n"); - return -1; + goto test_fail; } rte_service_runstate_set(t->service_id, 1); @@ -3088,7 +3088,7 @@ test_sw_eventdev(void) rte_socket_id()); if (!eventdev_func_mempool) { printf("ERROR creating mempool\n"); - return -1; + goto test_fail; } } t->mbuf_pool = eventdev_func_mempool; @@ -3096,146 +3096,146 @@ test_sw_eventdev(void) ret = test_single_directed_packet(t); if (ret != 0) { printf("ERROR - Single Directed Packet test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Directed Forward Credit test...\n"); ret = test_directed_forward_credits(t); if (ret != 0) { printf("ERROR - Directed Forward Credit test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Single Load Balanced Packet test...\n"); ret = single_packet(t); if (ret != 0) { printf("ERROR - Single Packet test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Unordered Basic test...\n"); ret = unordered_basic(t); if (ret != 0) { printf("ERROR - Unordered Basic test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Ordered Basic test...\n"); ret = ordered_basic(t); if (ret != 0) { printf("ERROR - Ordered Basic test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Burst Packets test...\n"); ret = burst_packets(t); if (ret != 0) { printf("ERROR - Burst Packets test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Load Balancing test...\n"); ret = load_balancing(t); if (ret != 0) { printf("ERROR - Load Balancing test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Prioritized Directed test...\n"); ret = test_priority_directed(t); if (ret != 0) { printf("ERROR - Prioritized Directed test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Prioritized Atomic test...\n"); ret = test_priority_atomic(t); if (ret != 0) { printf("ERROR - Prioritized Atomic test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Prioritized Ordered test...\n"); ret = test_priority_ordered(t); if (ret != 0) { printf("ERROR - Prioritized Ordered test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Prioritized Unordered test...\n"); ret = test_priority_unordered(t); if (ret != 0) { printf("ERROR - Prioritized Unordered test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Invalid QID test...\n"); ret = invalid_qid(t); if (ret != 0) { printf("ERROR - Invalid QID test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Load Balancing History test...\n"); ret = load_balancing_history(t); if (ret != 0) { printf("ERROR - Load Balancing History test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Inflight Count test...\n"); ret = inflight_counts(t); if (ret != 0) { printf("ERROR - Inflight Count test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Abuse Inflights test...\n"); ret = abuse_inflights(t); if (ret != 0) { printf("ERROR - Abuse Inflights test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running XStats test...\n"); ret = xstats_tests(t); if (ret != 0) { printf("ERROR - XStats test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running XStats ID Reset test...\n"); ret = xstats_id_reset_tests(t); if (ret != 0) { printf("ERROR - XStats ID Reset test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running XStats Brute Force test...\n"); ret = xstats_brute_force(t); if (ret != 0) { printf("ERROR - XStats Brute Force test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running XStats ID Abuse test...\n"); ret = xstats_id_abuse_tests(t); if (ret != 0) { printf("ERROR - XStats ID Abuse test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running QID Priority test...\n"); ret = qid_priorities(t); if (ret != 0) { printf("ERROR - QID Priority test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Ordered Reconfigure test...\n"); ret = ordered_reconfigure(t); if (ret != 0) { printf("ERROR - Ordered Reconfigure test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Port LB Single Reconfig test...\n"); ret = port_single_lb_reconfig(t); if (ret != 0) { printf("ERROR - Port LB Single Reconfig test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Port Reconfig Credits test...\n"); ret = port_reconfig_credits(t); if (ret != 0) { printf("ERROR - Port Reconfig Credits Reset test FAILED.\n"); - return ret; + goto test_fail; } printf("*** Running Head-of-line-blocking test...\n"); ret = holb(t); if (ret != 0) { printf("ERROR - Head-of-line-blocking test FAILED.\n"); - return ret; + goto test_fail; } if (rte_lcore_count() >= 3) { printf("*** Running Worker loopback test...\n"); @@ -3249,7 +3249,7 @@ test_sw_eventdev(void) ret = worker_loopback(t, 1); if (ret != 0) { printf("ERROR - Worker loopback test FAILED.\n"); - return ret; + goto test_fail; } } else { printf("### Not enough cores for worker loopback tests.\n"); @@ -3262,7 +3262,9 @@ test_sw_eventdev(void) */ free(t); + printf("SW Eventdev Selftest Successful.\n"); return 0; +test_fail: + printf("SW Eventdev Selftest Failed.\n"); + return -1; } - -REGISTER_TEST_COMMAND(eventdev_sw_autotest, test_sw_eventdev); -- 2.15.1