From: Igor Fedotov Date: Mon, 17 May 2021 19:21:53 +0000 (+0300) Subject: test/allocator_replay_test: make allocator type configurable X-Git-Tag: v15.2.14~70^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=24a876756360e808e9ee6111cb9f9383ed221186;p=ceph.git test/allocator_replay_test: make allocator type configurable Signed-off-by: Igor Fedotov (cherry picked from commit f4d1ef9a95e31cb67499ddb265548eda73ab4289) Conflicts: src/test/objectstore/allocator_replay_test.cc - use bmap_allocator_replay_test --- diff --git a/src/test/objectstore/bmap_allocator_replay_test.cc b/src/test/objectstore/bmap_allocator_replay_test.cc index d6121a1e028e..3547d578de2a 100644 --- a/src/test/objectstore/bmap_allocator_replay_test.cc +++ b/src/test/objectstore/bmap_allocator_replay_test.cc @@ -137,7 +137,20 @@ int replay_and_check_for_duplicate(char* fname) continue; } + string alloc_type = "bitmap"; sp = strstr(s, "BitmapAllocator"); + if (!sp) { + alloc_type = "avl"; + sp = strstr(s, "AvlAllocator"); + } + if (!sp) { + alloc_type = "hybrid"; + sp = strstr(s, "HybridAllocator"); + } + if (!sp) { + alloc_type = "stupid"; + sp = strstr(s, "StupidAllocator"); + } if (sp) { // 2019-05-30 03:23:43.460 7f889a5edf00 10 fbmap_alloc 0x5642ed36e900 BitmapAllocator 0x15940000000/100000 if (init_done) { @@ -156,7 +169,7 @@ int replay_and_check_for_duplicate(char* fname) std::cerr << "error: invalid init: " << s << std::endl; return -1; } - alloc.reset(Allocator::create(g_ceph_context, string("bitmap"), total, + alloc.reset(Allocator::create(g_ceph_context, alloc_type, total, alloc_unit)); init_done = true;