Skip to content

Commit

Permalink
test/crimson: remove unused variables
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Sep 13, 2020
1 parent 85b5db0 commit de91ba6
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/test/crimson/seastore/test_extmap_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,14 @@ struct extentmap_manager_test_t : public seastar_test_suite_t {
return extent;
}

bool rm_extent(
void rm_extent(
extmap_root_t &extmap_root,
Transaction &t,
uint32_t lo,
lext_map_val_t val ) {
auto ret = extmap_manager->rm_lextent(extmap_root, t, lo, val).unsafe_get0();
EXPECT_EQ(ret, true);
EXPECT_TRUE(ret);
test_ext_mappings.erase(test_ext_mappings.find(lo));
return ret;
}

void check_mappings(extmap_root_t &extmap_root, Transaction &t) {
Expand Down Expand Up @@ -147,8 +146,8 @@ TEST_F(extentmap_manager_test_t, basic)
{
auto t = tm.create_transaction();
logger().debug("second transaction");
[[maybe_unused]] auto seekref = find_extent(extmap_root, *t, lo, len);
[[maybe_unused]] auto rmret = rm_extent(extmap_root, *t, lo, {seekref.front().laddr, len});
auto seekref = find_extent(extmap_root, *t, lo, len);
rm_extent(extmap_root, *t, lo, {seekref.front().laddr, len});
[[maybe_unused]] auto seekref2 = findno_extent(extmap_root, *t, lo, len);
tm.submit_transaction(std::move(t)).unsafe_get();
}
Expand Down Expand Up @@ -221,7 +220,7 @@ TEST_F(extentmap_manager_test_t, force_split_merge)
int i = 0;
for (auto &e: test_ext_mappings) {
if (i % 3 != 0) {
[[maybe_unused]] auto rmref= rm_extent(extmap_root, *t, e.first, e.second);
rm_extent(extmap_root, *t, e.first, e.second);
}

if (i % 10 == 0) {
Expand Down Expand Up @@ -272,17 +271,16 @@ TEST_F(extentmap_manager_test_t, force_split_balanced)
int i = 0;
for (auto &e: test_ext_mappings) {
if (i < 100) {
auto val = e;
[[maybe_unused]] auto rmref= rm_extent(extmap_root, *t, e.first, e.second);
rm_extent(extmap_root, *t, e.first, e.second);
}

if (i % 10 == 0) {
logger().debug("submitting transaction i= {}", i);
logger().debug("submitting transaction i= {}", i);
tm.submit_transaction(std::move(t)).unsafe_get();
t = tm.create_transaction();
}
if (i % 50 == 0) {
logger().debug("check_mappings i= {}", i);
logger().debug("check_mappings i= {}", i);
check_mappings(extmap_root, *t);
check_mappings(extmap_root);
}
Expand Down

0 comments on commit de91ba6

Please sign in to comment.