From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0085.outbound.protection.outlook.com [104.47.40.85]) by dpdk.org (Postfix) with ESMTP id 946F71B3ED for ; Mon, 25 Dec 2017 20:18:47 +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=acOgMrLqku/N+UDOBb1E8qLrBr5B2qftnCYYJPwGEqE=; b=KwD8TNfJ9dGyYvK9G30bE+DVk941a0JgdTvKKsAUgxMVZU8E5X8OTyYdlLZkSwH1lWG5MWFJchnAXsxhHTWJzucO4LCjWj2f9hL80mwOZ+XsYcl47YHJFB1Q3j5hHKkOdV8/mH0/yfg4jS5+LVMAEGyhKj3c+5gCN3sD22aYk6s= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Mon, 25 Dec 2017 19:18:44 +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: Tue, 26 Dec 2017 00:47:35 +0530 Message-Id: <20171225191738.17151-8-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171225191738.17151-1-pbhagavatula@caviumnetworks.com> References: <20171212192713.17620-1-pbhagavatula@caviumnetworks.com> <20171225191738.17151-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR0601CA0004.apcprd06.prod.outlook.com (10.170.128.14) To DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0c5f16f1-206f-4e2b-a300-08d54bcc51f7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:DM5PR07MB3466; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 3:9bFxVfwcmwCmuM7g/lHEouPOSI34LASENhHKd+qQ138yDvonRsilrv3sWEbuL45qiTqB/nf5zOe1HdbQhYIbyFVXaDlki50JqR6fojTvjGWNK9MwnnB72g7i8vW473R89lL6vFBb4MGmnM85Ezxmlo9RZHe0Mo56dqhxYlTGp998aX6ATvYYAyrY1TLf0CgEvFevStyDiSYGfQnUUn6Tb0PYH0Zwz9Rp4f7UmoJn7WHFLYJtM+Hzm2rLIt9Zo2bP; 25:zGr70Hj3r4b9U8Z6HUhHgQsAZ4QkDeFOUWGLL6YLhTnvjq/UoNdVPuKRTMNaIKEtJaR61x8NgYIDKpwyVj/32J0i+avPc8wkYBZpfOBR4DmILSRoH4ogQrqljMp8wxd489MJ7N/NVin/WvK9iyrNTB8LfShpHj4MR/WqlYTF8ZZnkBpD7S2M5A6Y9MweTvdKb4zRMXVaSr82fk9Q4UeSfaZUBua8y9Sdoj6pTnNf2/feAQ0HJ3VRqOEZ1cB+OZa60a0yDG1fGvn/1+dW3GSlZP0WF/40YLWxFdBkL6fV42Hnh5EDjfHhnPVOuOPGYhxvevS4zKVKUeYyvjXXkkB0Rw==; 31:aPmT5YngsPXy3yc3upEWmnXG0APOo5x1+omZlFgmJCCDdio75iMNpy8fCzPCDwl4BmzT56yf46Dks0VTW7fPyzBcWK0eqY2Lf5UgWTBG+7bLvtPouohmBcLj9etXIgIPpcCFBbX3B8QlB3X/Q3gEaUX/KLWYPX7Mjgw43JlRKdMq4gciPTyXqJDA03q6DizMAfOLJ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-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3231023)(944501075)(10201501046)(3002001)(93006095)(6041268)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR07MB3466; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR07MB3466; X-Forefront-PRVS: 0532BF6DC2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(366004)(396003)(376002)(39380400002)(346002)(39850400004)(199004)(189003)(36756003)(68736007)(5009440100003)(7736002)(66066001)(81166006)(478600001)(81156014)(305945005)(47776003)(16526018)(8676002)(6506007)(386003)(316002)(97736004)(16586007)(5660300001)(52116002)(106356001)(25786009)(53936002)(48376002)(2906002)(105586002)(76176011)(51416003)(1076002)(3846002)(107886003)(6486002)(4326008)(6666003)(50226002)(72206003)(8936002)(6512007)(6116002)(42882006)(2950100002)(50466002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3466; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; DM5PR07MB3466; 23:JJMiVYBCJ1dD/fbM3LHFBOpGe8Y+Lu6HSTAtG/XTD?= =?us-ascii?Q?v2N+u0vtms1IedgbrcUS1B8fnAEF80aWPsSAC8qSiR9bIJNriwQXMsLUW9WM?= =?us-ascii?Q?UG9O9gOPkm2OF0pRCizp5xVG5gwKn5fHwzHl4aLiBkrxPPNrRxDm021DiEaL?= =?us-ascii?Q?4l8/YXK/35YGSpbV3/5+IOaBIGjBGkpbmbnysbTXO3gEACR1og+FOeDs/D7i?= =?us-ascii?Q?OkCCDkyLrfyQVmt7hmnwb5w5GZxhAU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:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2017 19:18:44.1044 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c5f16f1-206f-4e2b-a300-08d54bcc51f7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3466 Subject: [dpdk-dev] [PATCH v3 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, 25 Dec 2017 19:18:48 -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.14.1