#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)
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
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 */
}
};
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);