Some timer tests don't actually initialize the timer, for which
reason the callbacks will never be executed, leading to an infinite
loop.
This change initializes the timer, stopping it after the tests
finish.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
int ret;
ceph::mutex safe_timer_lock = ceph::make_mutex("safe_timer_lock");
SafeTimer safe_timer(g_ceph_context, safe_timer_lock);
+ safe_timer.init();
ret = basic_timer_test <SafeTimer>(safe_timer, &safe_timer_lock);
if (ret)
goto done;
done:
+ safe_timer.shutdown();
print_status(argv[0], ret);
return ret;
}