summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorJos Collin <joscollin@users.noreply.github.com>2017-05-24 12:41:48 +0200
committerGitHub <noreply@github.com>2017-05-24 12:41:48 +0200
commitcc7dea594def0f97d0683ff200fc63e83f57f7f1 (patch)
tree39c5f2203ba3a1a2189044a003863d9326d2b7f2 /src/test
parentMerge pull request #15206 from ifed01/wip-fix-rbd-bench (diff)
parenttest/:Check make_writeable return value (diff)
downloadceph-cc7dea594def0f97d0683ff200fc63e83f57f7f1.tar.xz
ceph-cc7dea594def0f97d0683ff200fc63e83f57f7f1.zip
Merge pull request #15266 from ztczll/master
test:Check make_writeable() return value
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_filejournal.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/test/test_filejournal.cc b/src/test/test_filejournal.cc
index 8a1ef5d426c..86d70736745 100644
--- a/src/test/test_filejournal.cc
+++ b/src/test/test_filejournal.cc
@@ -137,7 +137,7 @@ TEST(TestFileJournal, WriteSmall) {
FileJournal j(g_ceph_context, fsid, finisher, &sync_cond, path,
subtests[i].directio, subtests[i].aio, subtests[i].faio);
ASSERT_EQ(0, j.create());
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
vector<ObjectStore::Transaction> tls;
bufferlist bl;
@@ -162,7 +162,7 @@ TEST(TestFileJournal, WriteBig) {
FileJournal j(g_ceph_context, fsid, finisher, &sync_cond, path,
subtests[i].directio, subtests[i].aio, subtests[i].faio);
ASSERT_EQ(0, j.create());
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
bufferlist bl;
while (bl.length() < size_mb*1000/2) {
@@ -190,7 +190,7 @@ TEST(TestFileJournal, WriteMany) {
FileJournal j(g_ceph_context, fsid, finisher, &sync_cond, path,
subtests[i].directio, subtests[i].aio, subtests[i].faio);
ASSERT_EQ(0, j.create());
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
C_GatherBuilder gb(g_ceph_context, new C_SafeCond(&wait_lock, &cond, &done));
@@ -223,7 +223,7 @@ TEST(TestFileJournal, WriteManyVecs) {
FileJournal j(g_ceph_context, fsid, finisher, &sync_cond, path,
subtests[i].directio, subtests[i].aio, subtests[i].faio);
ASSERT_EQ(0, j.create());
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
C_GatherBuilder gb(g_ceph_context, new C_SafeCond(&wait_lock, &cond, &done));
@@ -256,7 +256,7 @@ TEST(TestFileJournal, WriteManyVecs) {
ASSERT_EQ(true, j.read_entry(inbl, seq));
ASSERT_EQ(seq, 2ull);
ASSERT_TRUE(inbl.contents_equal(origbl));
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
j.close();
}
@@ -275,7 +275,7 @@ TEST(TestFileJournal, ReplaySmall) {
FileJournal j(g_ceph_context, fsid, finisher, &sync_cond, path,
subtests[i].directio, subtests[i].aio, subtests[i].faio);
ASSERT_EQ(0, j.create());
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
C_GatherBuilder gb(g_ceph_context, new C_SafeCond(&wait_lock, &cond, &done));
@@ -318,7 +318,7 @@ TEST(TestFileJournal, ReplaySmall) {
ASSERT_TRUE(!j.read_entry(inbl, seq));
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
j.close();
}
}
@@ -335,7 +335,7 @@ TEST(TestFileJournal, ReplayCorrupt) {
FileJournal j(g_ceph_context, fsid, finisher, &sync_cond, path,
subtests[i].directio, subtests[i].aio, subtests[i].faio);
ASSERT_EQ(0, j.create());
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
C_GatherBuilder gb(g_ceph_context, new C_SafeCond(&wait_lock, &cond, &done));
@@ -404,7 +404,7 @@ TEST(TestFileJournal, ReplayCorrupt) {
ASSERT_FALSE(j.read_entry(inbl, seq, &corrupt));
ASSERT_TRUE(corrupt);
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
j.close();
}
}
@@ -420,7 +420,7 @@ TEST(TestFileJournal, WriteTrim) {
FileJournal j(g_ceph_context, fsid, finisher, &sync_cond, path,
subtests[i].directio, subtests[i].aio, subtests[i].faio);
ASSERT_EQ(0, j.create());
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
list<C_Sync*> ls;
@@ -472,7 +472,7 @@ TEST(TestFileJournal, WriteTrimSmall) {
FileJournal j(g_ceph_context, fsid, finisher, &sync_cond, path,
subtests[i].directio, subtests[i].aio, subtests[i].faio);
ASSERT_EQ(0, j.create());
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
list<C_Sync*> ls;
@@ -522,7 +522,7 @@ TEST(TestFileJournal, ReplayDetectCorruptFooterMagic) {
FileJournal j(g_ceph_context, fsid, finisher, &sync_cond, path,
subtests[i].directio, subtests[i].aio, subtests[i].faio);
ASSERT_EQ(0, j.create());
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
C_GatherBuilder gb(g_ceph_context, new C_SafeCond(&wait_lock, &cond, &done));
@@ -563,7 +563,7 @@ TEST(TestFileJournal, ReplayDetectCorruptFooterMagic) {
ASSERT_FALSE(result);
ASSERT_TRUE(corrupt);
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
j.close();
::close(fd);
}
@@ -581,7 +581,7 @@ TEST(TestFileJournal, ReplayDetectCorruptPayload) {
FileJournal j(g_ceph_context, fsid, finisher, &sync_cond, path,
subtests[i].directio, subtests[i].aio, subtests[i].faio);
ASSERT_EQ(0, j.create());
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
C_GatherBuilder gb(g_ceph_context, new C_SafeCond(&wait_lock, &cond, &done));
@@ -622,7 +622,7 @@ TEST(TestFileJournal, ReplayDetectCorruptPayload) {
ASSERT_FALSE(result);
ASSERT_TRUE(corrupt);
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
j.close();
::close(fd);
}
@@ -640,7 +640,7 @@ TEST(TestFileJournal, ReplayDetectCorruptHeader) {
FileJournal j(g_ceph_context, fsid, finisher, &sync_cond, path,
subtests[i].directio, subtests[i].aio, subtests[i].faio);
ASSERT_EQ(0, j.create());
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
C_GatherBuilder gb(g_ceph_context, new C_SafeCond(&wait_lock, &cond, &done));
@@ -681,7 +681,7 @@ TEST(TestFileJournal, ReplayDetectCorruptHeader) {
ASSERT_FALSE(result);
ASSERT_TRUE(corrupt);
- j.make_writeable();
+ ASSERT_EQ(0, j.make_writeable());
j.close();
::close(fd);
}