From: Loic Dachary Date: Wed, 7 Dec 2016 09:48:10 +0000 (+0100) Subject: tests: remove TestPGLog EXPECT_DEATH tests X-Git-Tag: v11.1.0~35^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f1b457ff9826dd3adc7f335f028ee19ecfa9f1b8;p=ceph.git tests: remove TestPGLog EXPECT_DEATH tests As per Sam Just advice, remove the EXPECT_DEATH tests to avoid intermittent hang because they do not play well with threads. Fixes: http://tracker.ceph.com/issues/18030 Signed-off-by: Loic Dachary --- diff --git a/src/test/osd/TestPGLog.cc b/src/test/osd/TestPGLog.cc index 7a42fcab6665..e00449ca860e 100644 --- a/src/test/osd/TestPGLog.cc +++ b/src/test/osd/TestPGLog.cc @@ -292,22 +292,6 @@ struct TestHandler : public PGLog::LogEntryHandler { }; TEST_F(PGLogTest, rewind_divergent_log) { - // newhead > log.tail : throw an assert - { - clear(); - - ObjectStore::Transaction t; - pg_info_t info; - list remove_snap; - bool dirty_info = false; - bool dirty_big_info = false; - - log.tail = eversion_t(2, 1); - TestHandler h(remove_snap); - EXPECT_DEATH(rewind_divergent_log(t, eversion_t(1, 1), info, &h, - dirty_info, dirty_big_info), ""); - } - /* +----------------+ | log | +--------+-------+ @@ -1255,69 +1239,6 @@ TEST_F(PGLogTest, merge_log) { dirty_info, dirty_big_info), ""); } - /* +--------------------------+ - | log olog | - +--------+-------+---------+ - | |object | | - |version | hash | version | - tail > (0,0) | | | - | (1,1) | x5 | | - | | | | - | | | | - head > (1,2) | x3 | | - | | | | - | | | (2,3) < tail - | | x9 | (2,4) | - | | | | - | | x5 | (2,5) < head - | | | | - +--------+-------+---------+ - - If the logs do not overlap, throw an exception. - - */ - { - clear(); - - ObjectStore::Transaction t; - pg_log_t olog; - pg_info_t oinfo; - pg_shard_t fromosd; - pg_info_t info; - list remove_snap; - bool dirty_info = false; - bool dirty_big_info = false; - - { - pg_log_entry_t e; - e.mark_unrollbackable(); - - log.tail = eversion_t(); - e.version = eversion_t(1, 1); - e.soid.set_hash(0x5); - log.log.push_back(e); - e.version = eversion_t(1, 2); - e.soid.set_hash(0x3); - log.log.push_back(e); - log.head = e.version; - log.index(); - - info.last_update = log.head; - - olog.tail = eversion_t(2, 3); - e.version = eversion_t(2, 4); - e.soid.set_hash(0x9); - olog.log.push_back(e); - e.version = eversion_t(2, 5); - e.soid.set_hash(0x5); - olog.log.push_back(e); - olog.head = e.version; - } - - TestHandler h(remove_snap); - EXPECT_DEATH(merge_log(t, oinfo, olog, fromosd, info, &h, - dirty_info, dirty_big_info), ""); - } } TEST_F(PGLogTest, proc_replica_log) {