From: Kefu Chai Date: Mon, 14 Jun 2021 12:03:11 +0000 (+0800) Subject: test/objectstore/Allocator_bench: clear allocated vec X-Git-Tag: v17.1.0~1572^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=88ce8198d12757950107694ffbc50a9a9fc40727;p=ceph.git test/objectstore/Allocator_bench: clear allocated vec otherwise there is chance that test could deallocate the same extents multiple times. Signed-off-by: Kefu Chai --- diff --git a/src/test/objectstore/Allocator_bench.cc b/src/test/objectstore/Allocator_bench.cc index 526562138a969..4977d6a545b7d 100644 --- a/src/test/objectstore/Allocator_bench.cc +++ b/src/test/objectstore/Allocator_bench.cc @@ -343,8 +343,10 @@ TEST_P(AllocTest, mempoolAccounting) PExtentVector tmp; alloc->allocate(alloc_size, alloc_size, 0, 0, &tmp); all_allocs[rand()] = tmp; + tmp.clear(); alloc->allocate(alloc_size, alloc_size, 0, 0, &tmp); all_allocs[rand()] = tmp; + tmp.clear(); auto it = all_allocs.upper_bound(rand()); if (it != all_allocs.end()) {