From: shiqi <1454927420@qq.com> Date: Tue, 30 May 2017 14:36:35 +0000 (+0800) Subject: test/unittest_bluefs: check whether rmdir success X-Git-Tag: v13.0.1~1056^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4b713669eb41a0dbc9aa028bf8faa0d2ba25ccfa;p=ceph.git test/unittest_bluefs: check whether rmdir success Signed-off-by: shiqi <1454927420@qq.com> --- diff --git a/src/test/objectstore/test_bluefs.cc b/src/test/objectstore/test_bluefs.cc index 4d437f6a864..33fb7885c31 100644 --- a/src/test/objectstore/test_bluefs.cc +++ b/src/test/objectstore/test_bluefs.cc @@ -377,18 +377,17 @@ TEST(BlueFS, test_simple_compaction_sync) { } } } - // Don't remove all { for (int i=0; i<10; i+=2) { string dir = "dir."; dir.append(to_string(i)); - for (int j=0; j<10; j+=2) { + for (int j=0; j<10; j++) { string file = "file."; file.append(to_string(j)); fs.unlink(dir, file); fs.flush_log(); } - fs.rmdir(dir); + ASSERT_EQ(0, fs.rmdir(dir)); fs.flush_log(); } } @@ -430,18 +429,17 @@ TEST(BlueFS, test_simple_compaction_async) { } } } - // Don't remove all { for (int i=0; i<10; i+=2) { string dir = "dir."; dir.append(to_string(i)); - for (int j=0; j<10; j+=2) { + for (int j=0; j<10; j++) { string file = "file."; file.append(to_string(j)); fs.unlink(dir, file); fs.flush_log(); } - fs.rmdir(dir); + ASSERT_EQ(0, fs.rmdir(dir)); fs.flush_log(); } }