]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
remove ceph_test_rados_watch_notify 34044/head
authorSage Weil <sage@redhat.com>
Wed, 18 Mar 2020 21:29:55 +0000 (16:29 -0500)
committerSage Weil <sage@redhat.com>
Wed, 18 Mar 2020 22:45:17 +0000 (17:45 -0500)
This is an old test, we have good watch/notify coverage in the newer
tests, and it is buggy.

Fixes: https://tracker.ceph.com/issues/43861
Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/rados/test.sh
src/test/system/CMakeLists.txt
src/test/system/st_rados_notify.cc [deleted file]
src/test/system/st_rados_watch.cc [deleted file]

index a2f5e0499db05cb80de275f414742ef91563719c..a0b2aed54692bc955619759c896ac1331b7396d3 100755 (executable)
@@ -31,8 +31,7 @@ for f in \
     api_c_read_operations \
     list_parallel \
     open_pools_parallel \
-    delete_pools_parallel \
-    watch_notify
+    delete_pools_parallel
 do
     if [ $parallel -eq 1 ]; then
        r=`printf '%25s' $f`
index f59ed3e79c632ee85d3e01ce62c4cf9f396644c1..4944bb4462d789623873d35d8e4ba74da1e7a48b 100644 (file)
@@ -6,9 +6,7 @@ set(libsystest_srcs
   systest_settings.cc
   st_rados_create_pool.cc
   st_rados_delete_pool.cc
-  st_rados_list_objects.cc
-  st_rados_watch.cc
-  st_rados_notify.cc)
+  st_rados_list_objects.cc)
 add_library(systest STATIC ${libsystest_srcs})
 
 # test_rados_list_parallel
@@ -41,25 +39,8 @@ add_executable(ceph_test_rados_delete_pools_parallel
 target_link_libraries(ceph_test_rados_delete_pools_parallel librados systest global
   pthread rt ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}) 
 
-# test_rados_watch_notify
-set(test_rados_watch_notify_srcs
-  rados_watch_notify.cc
-  st_rados_create_pool.cc
-  st_rados_delete_pool.cc
-  st_rados_delete_objs.cc
-  st_rados_watch.cc
-  st_rados_notify.cc
-  )
-add_executable(ceph_test_rados_watch_notify
-  ${test_rados_watch_notify_srcs}
-  )
-target_link_libraries(ceph_test_rados_watch_notify
-  librados systest global
-  pthread rt ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}) 
-
 install(TARGETS
   ceph_test_rados_delete_pools_parallel
   ceph_test_rados_list_parallel
   ceph_test_rados_open_pools_parallel
-  ceph_test_rados_watch_notify
   DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/src/test/system/st_rados_notify.cc b/src/test/system/st_rados_notify.cc
deleted file mode 100644 (file)
index ecdf1c7..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
-* Ceph - scalable distributed file system
-*
-* Copyright (C) 2011 New Dream Network
-*
-* This is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License version 2.1, as published by the Free Software
-* Foundation.  See file COPYING.
-*
-*/
-
-#include "cross_process_sem.h"
-#include "include/rados/librados.h"
-#include "st_rados_notify.h"
-#include "systest_runnable.h"
-
-StRadosNotify::StRadosNotify(int argc, const char **argv,
-                            CrossProcessSem *setup_sem,
-                            CrossProcessSem *notify_sem,
-                            CrossProcessSem *notified_sem,
-                            int notify_retcode,
-                            const std::string &pool_name,
-                            const std::string &obj_name)
-  : SysTestRunnable(argc, argv),
-    m_setup_sem(setup_sem),
-    m_notify_sem(notify_sem),
-    m_notified_sem(notified_sem),
-    m_notify_retcode(notify_retcode),
-    m_pool_name(pool_name),
-    m_obj_name(obj_name)
-{
-}
-
-StRadosNotify::~StRadosNotify()
-{
-}
-
-#pragma GCC diagnostic ignored "-Wpragmas"
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
-int StRadosNotify::run()
-{
-  rados_t cl;
-  RETURN1_IF_NONZERO(rados_create(&cl, NULL));
-  rados_conf_parse_argv(cl, m_argc, m_argv);
-  RETURN1_IF_NONZERO(rados_conf_read_file(cl, NULL));
-  rados_conf_parse_env(cl, NULL);
-
-  if (m_setup_sem) {
-    m_setup_sem->wait();
-    m_setup_sem->post();
-  }
-
-  rados_ioctx_t io_ctx;
-  RETURN1_IF_NONZERO(rados_connect(cl));
-  RETURN1_IF_NONZERO(rados_ioctx_create(cl, m_pool_name.c_str(), &io_ctx));
-
-  if (m_notify_sem) {
-    m_notify_sem->wait();
-    m_notify_sem->post();
-  }
-
-  printf("%s: notifying object %s\n", get_id_str(), m_obj_name.c_str());
-  RETURN1_IF_NOT_VAL(m_notify_retcode,
-                    rados_notify(io_ctx, m_obj_name.c_str(), 0, NULL, 0));
-  if (m_notified_sem) {
-    m_notified_sem->post();
-  }
-
-  rados_ioctx_destroy(io_ctx);
-  rados_shutdown(cl);
-
-  return 0;
-}
-
-#pragma GCC diagnostic pop
-#pragma GCC diagnostic warning "-Wpragmas"
diff --git a/src/test/system/st_rados_watch.cc b/src/test/system/st_rados_watch.cc
deleted file mode 100644 (file)
index d8174bd..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
-* Ceph - scalable distributed file system
-*
-* Copyright (C) 2011 New Dream Network
-*
-* This is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License version 2.1, as published by the Free Software
-* Foundation.  See file COPYING.
-*
-*/
-
-#include "cross_process_sem.h"
-#include "include/rados/librados.h"
-#include "st_rados_watch.h"
-#include "systest_runnable.h"
-
-void notify_cb(uint8_t opcode, uint64_t ver, void *arg)
-{
-  int *notifies = reinterpret_cast<int*>(arg);
-  ++(*notifies);
-}
-
-StRadosWatch::StRadosWatch(int argc, const char **argv,
-                          CrossProcessSem *setup_sem,
-                          CrossProcessSem *watch_sem,
-                          CrossProcessSem *notify_sem,
-                          int num_notifies,
-                          int watch_retcode,
-                          const std::string &pool_name,
-                          const std::string &obj_name)
-  : SysTestRunnable(argc, argv),
-    m_setup_sem(setup_sem),
-    m_watch_sem(watch_sem),
-    m_notify_sem(notify_sem),
-    m_num_notifies(num_notifies),
-    m_watch_retcode(watch_retcode),
-    m_pool_name(pool_name),
-    m_obj_name(obj_name)
-{
-}
-
-StRadosWatch::
-~StRadosWatch()
-{
-}
-
-#pragma GCC diagnostic ignored "-Wpragmas"
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
-int StRadosWatch::
-run()
-{
-  rados_t cl;
-  RETURN1_IF_NONZERO(rados_create(&cl, NULL));
-  rados_conf_parse_argv(cl, m_argc, m_argv);
-  RETURN1_IF_NONZERO(rados_conf_read_file(cl, NULL));
-  rados_conf_parse_env(cl, NULL);
-
-  if (m_setup_sem) {
-    m_setup_sem->wait();
-    m_setup_sem->post();
-  }
-
-  rados_ioctx_t io_ctx;
-  uint64_t handle;
-  int num_notifies = 0;
-  RETURN1_IF_NONZERO(rados_connect(cl));
-  RETURN1_IF_NONZERO(rados_ioctx_create(cl, m_pool_name.c_str(), &io_ctx));
-  printf("%s: watching object %s\n", get_id_str(), m_obj_name.c_str());
-
-  RETURN1_IF_NOT_VAL(m_watch_retcode,
-    rados_watch(io_ctx, m_obj_name.c_str(), 0, &handle,
-               reinterpret_cast<rados_watchcb_t>(notify_cb),
-               reinterpret_cast<void*>(&num_notifies))
-    );
-  if (m_watch_sem) {
-    m_watch_sem->post();
-  }
-
-  m_notify_sem->wait();
-  m_notify_sem->post();
-
-  int r = 0;
-  if (num_notifies < m_num_notifies) {
-    printf("Received fewer notifies than expected: %d < %d\n",
-          num_notifies, m_num_notifies);
-    r = 1;
-  }
-
-  if (m_watch_retcode == 0)
-    rados_unwatch(io_ctx, m_obj_name.c_str(), handle);
-  rados_ioctx_destroy(io_ctx);
-  rados_shutdown(cl);
-
-  return r;
-}
-
-#pragma GCC diagnostic pop
-#pragma GCC diagnostic warning "-Wpragmas"