X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=app%2Ftest%2Ftest_link_bonding.c;h=32296604d23d363f71e9010b30a37a32ffb76e8f;hb=2ee926f1fd00ff3565ac7bf05957e36b8be5aa61;hp=388cf1176bd70d97938ed8bae4c4b7575b60e4c1;hpb=b7f477920f7be7052e8d5de9ea14f61aba7597d3;p=dpdk.git diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index 388cf1176b..32296604d2 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -83,7 +83,7 @@ #define MAX_PKT_BURST (512) #define DEF_PKT_BURST (16) -#define BONDED_DEV_NAME ("unit_test_bonded_device") +#define BONDED_DEV_NAME ("unit_test_bond_dev") #define INVALID_SOCKET_ID (-1) #define INVALID_PORT_ID (-1) @@ -4020,16 +4020,14 @@ test_close_bonded_device(void) return 0; } -static int +static void testsuite_teardown(void) { - if (test_params->pkt_eth_hdr != NULL) { - free(test_params->pkt_eth_hdr); - test_params->pkt_eth_hdr = NULL; - } + free(test_params->pkt_eth_hdr); + test_params->pkt_eth_hdr = NULL; /* Clean up and remove slaves from bonded device */ - return remove_slaves_and_stop_bonded_device(); + remove_slaves_and_stop_bonded_device(); } static void @@ -4993,7 +4991,7 @@ static struct unit_test_suite link_bonding_test_suite = { TEST_CASE(test_reconfigure_bonded_device), TEST_CASE(test_close_bonded_device), - { NULL, NULL, NULL, NULL, NULL } /**< NULL terminate unit test array */ + TEST_CASES_END() /**< NULL terminate unit test array */ } }; @@ -5004,8 +5002,4 @@ test_link_bonding(void) return unit_test_suite_runner(&link_bonding_test_suite); } -static struct test_command link_bonding_cmd = { - .command = "link_bonding_autotest", - .callback = test_link_bonding, -}; -REGISTER_TEST_COMMAND(link_bonding_cmd); +REGISTER_TEST_COMMAND(link_bonding_autotest, test_link_bonding);