Skip to content

Commit 20d7fe9

Browse files
authored
Merge pull request ceph#61034 from aclamk/wip-aclamk-jenkins-reduced-unittest-bluefs
os/bluestore: Make some unittest_bluefs runs lighter on jenkins
2 parents 455a9ef + bacd59e commit 20d7fe9

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
roles:
2+
- [mon.a, mgr.x, osd.0, osd.1, client.0]
3+
tasks:
4+
- install:
5+
- exec:
6+
client.0:
7+
- mkdir $TESTDIR/ceph_test_bluefs && cd $TESTDIR/ceph_test_bluefs && ceph_test_bluefs --log-file $TESTDIR/archive/ceph_test_bluefs.log --debug-bluefs 5/20 --gtest_catch_exceptions=0
8+
- rm -rf $TESTDIR/ceph_test_bluefs

src/test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ if(NOT WIN32)
591591
ceph_snappy
592592
cls_lock
593593
ceph_test_objectstore
594+
ceph_test_bluefs
594595
ceph_erasure_code_non_regression
595596
cython_modules
596597
crushtool

src/test/objectstore/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ add_executable(unittest_rocksdb_option
4848
add_ceph_unittest(unittest_rocksdb_option)
4949
target_link_libraries(unittest_rocksdb_option global os ${BLKID_LIBRARIES})
5050

51+
# ceph_test_bluefs (a clone of unittest_bluefs)
52+
add_executable(ceph_test_bluefs
53+
test_bluefs.cc
54+
)
55+
target_link_libraries(ceph_test_bluefs
56+
os
57+
global
58+
${UNITTEST_LIBS}
59+
)
60+
install(TARGETS ceph_test_bluefs
61+
DESTINATION ${CMAKE_INSTALL_BINDIR})
62+
5163
if(WITH_EVENTTRACE)
5264
add_dependencies(os eventtrace_tp)
5365
endif()

src/test/objectstore/test_bluefs.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323

2424
using namespace std;
2525

26+
// some test should not be executed on jenkins make check
27+
#define SKIP_JENKINS() \
28+
if (getenv("JENKINS_HOME") != nullptr) GTEST_SKIP_("test disabled on jenkins");
29+
30+
2631
std::unique_ptr<char[]> gen_buffer(uint64_t size)
2732
{
2833
std::unique_ptr<char[]> buffer = std::make_unique<char[]>(size);
@@ -174,6 +179,7 @@ TEST(BlueFS, small_appends) {
174179
}
175180

176181
TEST(BlueFS, very_large_write) {
182+
SKIP_JENKINS();
177183
// we'll write a ~5G file, so allocate more than that for the whole fs
178184
uint64_t size = 1048576 * 1024 * 6ull;
179185
TempBdev bdev{size};
@@ -248,6 +254,7 @@ TEST(BlueFS, very_large_write) {
248254
}
249255

250256
TEST(BlueFS, very_large_write2) {
257+
SKIP_JENKINS();
251258
// we'll write a ~5G file, so allocate more than that for the whole fs
252259
uint64_t size_full = 1048576 * 1024 * 6ull;
253260
uint64_t size = 1048576 * 1024 * 5ull;

0 commit comments

Comments
 (0)