]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: break out librados-using cephfs test 10452/head
authorJohn Spray <john.spray@redhat.com>
Wed, 27 Jul 2016 11:18:50 +0000 (12:18 +0100)
committerJohn Spray <john.spray@redhat.com>
Wed, 27 Jul 2016 11:18:50 +0000 (12:18 +0100)
We are seeing an issue due to the lockdep symbols
in libcephfs and librados clashing, which shows itself
after a fork in the flock tests.  We can avoid this
by splitting the libcephfs tests that require librados
(access.cc) into their own compilation unit so that
the flock tests can run in a libcephfs-only process.

Fixes: http://tracker.ceph.com/issues/16556
Signed-off-by: John Spray <john.spray@redhat.com>
qa/workunits/libcephfs/test.sh
src/test/libcephfs/CMakeLists.txt
src/test/libcephfs/access.cc

index 4a501e070c318430258e3e58dd4b2de8ac62b3e0..899fe40c3a49bab214f3dc124dd8038787fa22f1 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh -e
 
 ceph_test_libcephfs
+ceph_test_libcephfs_access
 
 exit 0
index b2e511ea51d4aee623a67c4f13a469d827f8f9a2..dac0407f77e06717c528add090b66c2ec0ed3499 100644 (file)
@@ -6,18 +6,32 @@ if(${WITH_CEPHFS})
     multiclient.cc
     flock.cc
     acl.cc
-    access.cc
   )
   set_target_properties(ceph_test_libcephfs PROPERTIES COMPILE_FLAGS
     ${UNITTEST_CXX_FLAGS})
   target_link_libraries(ceph_test_libcephfs
     cephfs
-    librados
     ${UNITTEST_LIBS}
     ${EXTRALIBS}
     ${CMAKE_DL_LIBS}
     )
   install(TARGETS ceph_test_libcephfs
     DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+  add_executable(ceph_test_libcephfs_access
+    test.cc
+    access.cc
+  )
+  set_target_properties(ceph_test_libcephfs_access PROPERTIES COMPILE_FLAGS
+    ${UNITTEST_CXX_FLAGS})
+  target_link_libraries(ceph_test_libcephfs_access
+    cephfs
+    librados
+    ${UNITTEST_LIBS}
+    ${EXTRALIBS}
+    ${CMAKE_DL_LIBS}
+    )
+  install(TARGETS ceph_test_libcephfs_access
+    DESTINATION ${CMAKE_INSTALL_BINDIR})
 endif(${WITH_CEPHFS})  
 
index c47be54929fa0d6f84847174bed75b2014d3fe63..087306f3506ed196d4bec7c75ab368bfecc98341 100644 (file)
@@ -72,7 +72,7 @@ int do_mon_command(string s, string *key)
 
 string get_unique_dir()
 {
-  return string("/ceph_test_libcephfs.") + stringify(rand());
+  return string("/ceph_test_libcephfs_access.") + stringify(rand());
 }
 
 TEST(AccessTest, Foo) {