From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0084.outbound.protection.outlook.com [104.47.33.84]) by dpdk.org (Postfix) with ESMTP id 4010E1B168 for ; Thu, 14 Dec 2017 16:02:49 +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=Lu9up1JqxbD6/LUv20MZ9qzks7eTi/wIMWodynwroLw=; b=OIowh9EB7EpsYvsyGrzRCFjph53KmiIriHliIT4sWKvx5eUMZrli5nZoGmPcGVwV6Ty8/eUTpgMP+HutuU+vky8AxQ6IGxIl9qK9U/XoGD5hQjEfuN6w0iSCjsWpet4E3gf2g9HuWmfEoVM5Azsm/3i25bj0AYTjG6qPKA5dcDY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by BN6PR07MB3460.namprd07.prod.outlook.com (10.161.153.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Thu, 14 Dec 2017 15:02:43 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, liang.j.ma@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Thu, 14 Dec 2017 20:31:35 +0530 Message-Id: <20171214150138.25667-9-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171214150138.25667-1-pbhagavatula@caviumnetworks.com> References: <20171212192713.17620-1-pbhagavatula@caviumnetworks.com> <20171214150138.25667-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MWHPR17CA0079.namprd17.prod.outlook.com (10.173.237.145) To BN6PR07MB3460.namprd07.prod.outlook.com (10.161.153.23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e69b0400-c87a-47a2-41a6-08d54303bca7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:BN6PR07MB3460; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3460; 3:sIuPZWfNB4+mdM0Flt/H2I0tbC5L9VqsHCmAbWCbHgsxOXy8cdjdanCKNESE7PdT+PWVyv89+I0ioZW1QWog2uDypEQglXpDGxdlO40XGCPiOxPmAN26hto+O7y8iCxM3Th0S1pkwTvH513XAe5Cz1CR1P+LUpbC2V94ksrGGjCErLjiiOs62pdyLpw35jrdjiX+vlh4ZKPrRY+LNKbdW/saovNIf26BFapWyEZyyeCDfKxMB4TLMOwSIc9dYfRY; 25:jmy7gbqeidFfffmsU6jWPlCf0Kvfch0CzJQSbKs2x3dlJuwbbxlhgWvMIWNLYK1d+DfH3djvB2VfqON7ynRxqPeEZuiF5gnKNKXNF/K46btwS89UgefhPQB6bMxQ2EWPL/VzFTxbpjn/pxqefxBPhy/ThGG5ClBJQZ77ovfP0zsv7jabHxaxTgSZR9f+vBWwdnmXSvbez0p7rfyqqzwB5a9P/vkQUoCG3WfMvajOfHVdgbH9A/Jm41zq5rDRWq0Sbo4atG23bQpWZDdbLDhd+ATMk4dBlkzeNzL3G3MCFzxZdLaablK1fmklTzwk1XvL6PlK0huCgpPmBY2G4D8opQ==; 31:sVjbk202/KZraBQ0mDSWbKklJc9b85MZlnD7QwOQZuw4m1Wu55SmcZ/+gKGN0hr/PyqRsnXDG03yXwjJ04tWW+Bkh9hLxTsjwRG+cu/C/hqHXthV6Ub5gp5C7s+jPLHWnf6GmXMMNRmpRQbIzj9R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antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(3002001)(3231023)(93006095)(10201501046)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011); SRVR:BN6PR07MB3460; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR07MB3460; X-Forefront-PRVS: 05214FD68E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39860400002)(346002)(376002)(189003)(199004)(66066001)(42882006)(6666003)(2950100002)(305945005)(97736004)(72206003)(478600001)(2906002)(6486002)(47776003)(69596002)(107886003)(6512007)(4326008)(25786009)(53936002)(48376002)(105586002)(36756003)(106356001)(50466002)(5660300001)(53416004)(5009440100003)(6116002)(3846002)(1076002)(16586007)(68736007)(6506007)(386003)(16526018)(316002)(52116002)(50226002)(76176011)(8656006)(7736002)(8936002)(8676002)(81156014)(51416003)(81166006)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3460; H:Pavan-LT.caveonetworks.com; 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; BN6PR07MB3460; 23:dkpqtdBdbLlGhnL4AyRMAgd7HkGazGdOShXC5chdr?= =?us-ascii?Q?mLlVrXCmchL8D4BhCFAB3qZ7u37L14G8WNySwGzKpH7RETlBou9rYZEmzAgh?= =?us-ascii?Q?8OqPM3f36N4+rDZuyEKXL/NAc/OrPVTCxgpklimcvz7yXW70LsHjCKL+Y/Ho?= =?us-ascii?Q?+IeeERP9avsu1HY+pa2YXa2pRIjw6ABuRRqNgPcmhU0N/E9hO/GhHLBQ0Ac8?= =?us-ascii?Q?2v1Rf2ng3299rrEutslNXZ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utput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2017 15:02:43.6989 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e69b0400-c87a-47a2-41a6-08d54303bca7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3460 Subject: [dpdk-dev] [PATCH v2 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: Thu, 14 Dec 2017 15:02:49 -0000 Modify test_eventdev_sw to be standalone selftest independent of test framework. Signed-off-by: Pavan Nikhilesh --- 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 96ed920cc..0ca11030e 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 @@ -3038,7 +3038,7 @@ worker_loopback(struct test *t) static struct rte_mempool *eventdev_func_mempool; -static int +int test_sw_eventdev(void) { struct test *t = malloc(sizeof(struct test)); @@ -3049,25 +3049,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); @@ -3084,7 +3084,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; @@ -3092,153 +3092,153 @@ 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"); ret = worker_loopback(t); if (ret != 0) { printf("ERROR - Worker loopback test FAILED.\n"); - return ret; + goto test_fail; } } else { printf("### Not enough cores for worker loopback test.\n"); @@ -3250,7 +3250,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