diff options
author | Colin Patrick McCabe <cmccabe@alumni.cmu.edu> | 2010-11-12 23:49:25 +0100 |
---|---|---|
committer | Colin Patrick McCabe <cmccabe@alumni.cmu.edu> | 2010-11-12 23:49:25 +0100 |
commit | 20affc650a517221fa8c07649f11e034f910861d (patch) | |
tree | 63687c52d803b26127091a93c748eb6bff283e9a /src/test/TestTimers.cc | |
parent | Rename PG::peer to PG::do_peer (diff) | |
download | ceph-20affc650a517221fa8c07649f11e034f910861d.tar.xz ceph-20affc650a517221fa8c07649f11e034f910861d.zip |
TestTimers: don't test (nonexistent) Timer
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Diffstat (limited to 'src/test/TestTimers.cc')
-rw-r--r-- | src/test/TestTimers.cc | 47 |
1 files changed, 11 insertions, 36 deletions
diff --git a/src/test/TestTimers.cc b/src/test/TestTimers.cc index 47b2bec137a..73e8b0f2f51 100644 --- a/src/test/TestTimers.cc +++ b/src/test/TestTimers.cc @@ -165,19 +165,6 @@ static int test_out_of_order_insertion(SafeTimer &timer, Mutex *lock) return ret; } -static int test_timers(void) -{ - int ret = 0; - Timer timer; - ret = basic_timer_test <Timer>(timer, NULL); - if (ret) - goto done; - -done: - print_status("test_timers", ret); - return ret; -} - static int safe_timer_cancel_all_test(SafeTimer &safe_timer, Mutex& safe_timer_lock) { cout << __PRETTY_FUNCTION__ << std::endl; @@ -261,9 +248,17 @@ static int safe_timer_cancellation_test(SafeTimer &safe_timer, Mutex& safe_timer return ret; } -static int test_safe_timers(void) +int main(int argc, const char **argv) { - int ret = 0; + vector<const char*> args; + argv_to_vec(argc, argv, args); + env_to_vec(args); + + ceph_set_default_id("admin"); + common_set_defaults(false); + common_init(args, "ceph", true); + + int ret; Mutex safe_timer_lock("safe_timer_lock"); SafeTimer safe_timer(safe_timer_lock); @@ -284,26 +279,6 @@ static int test_safe_timers(void) goto done; done: - print_status("test_safe_timers", ret); + print_status(argv[0], ret); return ret; } - -int main(int argc, const char **argv) -{ - vector<const char*> args; - argv_to_vec(argc, argv, args); - env_to_vec(args); - - ceph_set_default_id("admin"); - common_set_defaults(false); - common_init(args, "ceph", true); - - int ret; - ret = test_timers(); - if (ret) - return ret; - ret = test_safe_timers(); - if (ret) - return ret; - return 0; -} |