From 935d579dde414a742d7b6b2af56e7fac91c2464a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 16 Oct 2012 16:56:27 -0700 Subject: [PATCH] testrados_watch_notify: fix most tests, disable one The last test is disabled until #2339 is resolved. Signed-off-by: Sage Weil --- src/test/system/rados_watch_notify.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/test/system/rados_watch_notify.cc b/src/test/system/rados_watch_notify.cc index 6dd2dbefe4c06..e549d38650527 100644 --- a/src/test/system/rados_watch_notify.cc +++ b/src/test/system/rados_watch_notify.cc @@ -21,6 +21,7 @@ #include "st_rados_notify.h" #include "systest_runnable.h" #include "systest_settings.h" +#include "include/stringify.h" #include #include @@ -32,6 +33,8 @@ #include #include #include +#include +#include using std::ostringstream; using std::string; @@ -55,7 +58,7 @@ const char *get_id_str() int main(int argc, const char **argv) { - std::string pool = "foo"; + std::string pool = "foo." + stringify(getpid()); CrossProcessSem *setup_sem = NULL; RETURN1_IF_NONZERO(CrossProcessSem::create(0, &setup_sem)); CrossProcessSem *watch_sem = NULL; @@ -86,7 +89,8 @@ int main(int argc, const char **argv) RETURN1_IF_NONZERO(notify_sem->reinit(0)); // create a pool and an object, watch a non-existent object, - // notify non-existent object. + // notify non-existent object.watch + pool += "."; { StRadosCreatePool r1(argc, argv, NULL, setup_sem, NULL, pool, 0, ".obj"); StRadosWatch r2(argc, argv, setup_sem, watch_sem, notify_sem, @@ -119,6 +123,7 @@ int main(int argc, const char **argv) // then delete the pool. // Create a new pool and write to it to make the osd get the updated map, // then try notifying on the deleted pool. + pool += "."; { StRadosCreatePool r1(argc, argv, NULL, setup_sem, NULL, pool, 1, ".obj"); StRadosWatch r2(argc, argv, setup_sem, watch_sem, finished_notifies_sem, @@ -154,6 +159,9 @@ int main(int argc, const char **argv) // create a pool and an object, watch the object, notify, // then delete the object, notify + if (false) { + // this test is currently broken, pending the resolution of bug #2339 + pool += "."; { StRadosCreatePool r1(argc, argv, NULL, setup_sem, NULL, pool, 1, ".obj"); StRadosWatch r2(argc, argv, setup_sem, watch_sem, finished_notifies_sem, @@ -176,6 +184,7 @@ int main(int argc, const char **argv) return EXIT_FAILURE; } } + } printf("******* SUCCESS **********\n"); return EXIT_SUCCESS; -- 2.39.5