]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
testrados_watch_notify: fix most tests, disable one
authorSage Weil <sage@inktank.com>
Tue, 16 Oct 2012 23:56:27 +0000 (16:56 -0700)
committerSage Weil <sage@inktank.com>
Wed, 17 Oct 2012 00:52:26 +0000 (17:52 -0700)
The last test is disabled until #2339 is resolved.

Signed-off-by: Sage Weil <sage@inktank.com>
src/test/system/rados_watch_notify.cc

index 6dd2dbefe4c066f44458dcaaa460bce31f54c545..e549d38650527607f25b193dd0a7f899e010449f 100644 (file)
@@ -21,6 +21,7 @@
 #include "st_rados_notify.h"
 #include "systest_runnable.h"
 #include "systest_settings.h"
+#include "include/stringify.h"
 
 #include <errno.h>
 #include <pthread.h>
@@ -32,6 +33,8 @@
 #include <string>
 #include <time.h>
 #include <vector>
+#include <sys/types.h>
+#include <unistd.h>
 
 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;