Fix timer stress test to succeed on multiple runs.
Signed-off-by: Robert Sanford <rsanford2@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
unsigned lcore_id = rte_lcore_id();
if (lcore_id == rte_get_master_lcore()) {
+ cb_count = 0;
timers = rte_malloc(NULL, sizeof(*timers) * NB_STRESS2_TIMERS, 0);
if (timers == NULL) {
printf("Test Failed\n");
/* now check that we get the right number of callbacks */
if (lcore_id == rte_get_master_lcore()) {
rte_timer_manage();
+
+ /* clean up statics, in case we run again */
+ rte_free(timers);
+ timers = NULL;
+ ready = 0;
+
if (cb_count != NB_STRESS2_TIMERS) {
printf("Test Failed\n");
printf("- Stress test 2, part 2 failed\n");