test/event: remove eth Rx adapter vdev workaround
authorNikhil Rao <nikhil.rao@intel.com>
Thu, 6 Sep 2018 09:11:43 +0000 (14:41 +0530)
committerJerin Jacob <jerin.jacob@caviumnetworks.com>
Mon, 1 Oct 2018 14:48:11 +0000 (16:48 +0200)
eth Rx adapter has been updated to support hotplugged
devices, devices created after adapter creation can now be
added to the adapter.

Update the adapter_multi_eth_add_del
test case to create the adapter as part of test setup
instead of creating it after creating vdevs.

Fixes: 2a9c83ae3b2e ("test/eventdev: add multi-ports test")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
test/test/test_event_eth_rx_adapter.c

index 2337e54..28f2146 100644 (file)
@@ -496,9 +496,6 @@ adapter_multi_eth_add_del(void)
        err = init_ports(rte_eth_dev_count_total());
        TEST_ASSERT(err == 0, "Port initialization failed err %d\n", err);
 
-       /* creating new instance for all newly added eth devices */
-       adapter_create();
-
        /* eth_rx_adapter_queue_add for n ports */
        port_index = 0;
        for (; port_index < rte_eth_dev_count_total(); port_index += 1) {
@@ -516,8 +513,6 @@ adapter_multi_eth_add_del(void)
                TEST_ASSERT(err == 0, "Expected 0 got %d", err);
        }
 
-       adapter_free();
-
        return TEST_SUCCESS;
 }
 
@@ -682,7 +677,8 @@ static struct unit_test_suite event_eth_rx_tests = {
                TEST_CASE_ST(NULL, NULL, adapter_create_free),
                TEST_CASE_ST(adapter_create, adapter_free,
                                        adapter_queue_add_del),
-               TEST_CASE_ST(NULL, NULL, adapter_multi_eth_add_del),
+               TEST_CASE_ST(adapter_create, adapter_free,
+                                       adapter_multi_eth_add_del),
                TEST_CASE_ST(adapter_create, adapter_free, adapter_start_stop),
                TEST_CASE_ST(adapter_create, adapter_free, adapter_stats),
                TEST_CASES_END() /**< NULL terminate unit test array */