fltree_onode_manager_test_t() {}
};
-TEST_F(fltree_onode_manager_test_t, 1_single)
+TEST_P(fltree_onode_manager_test_t, 1_single)
{
run_async([this] {
uint64_t block_size = tm->get_block_size();
});
}
-TEST_F(fltree_onode_manager_test_t, 2_synthetic)
+TEST_P(fltree_onode_manager_test_t, 2_synthetic)
{
run_async([this] {
uint64_t block_size = tm->get_block_size();
validate_list_onodes(pool);
});
}
+
+INSTANTIATE_TEST_SUITE_P(
+ fltree_onode__manager_test,
+ fltree_onode_manager_test_t,
+ ::testing::Values (
+ "segmented",
+ "circularbounded"
+ )
+);
}
};
-TEST_F(d_seastore_tm_test_t, 6_random_tree_insert_erase)
+TEST_P(d_seastore_tm_test_t, 6_random_tree_insert_erase)
{
run_async([this] {
constexpr bool TEST_SEASTORE = true;
});
}
-TEST_F(d_seastore_tm_test_t, 7_tree_insert_erase_eagain)
+TEST_P(d_seastore_tm_test_t, 7_tree_insert_erase_eagain)
{
run_async([this] {
constexpr double EAGAIN_PROBABILITY = 0.1;
tree.reset();
});
}
+
+INSTANTIATE_TEST_SUITE_P(
+ d_seastore_tm_test,
+ d_seastore_tm_test_t,
+ ::testing::Values (
+ "segmented",
+ "circularbounded"
+ )
+);
}
};
-TEST_F(collection_manager_test_t, basic)
+TEST_P(collection_manager_test_t, basic)
{
run_async([this] {
coll_root_t coll_root = get_root();
});
}
-TEST_F(collection_manager_test_t, overflow)
+TEST_P(collection_manager_test_t, overflow)
{
run_async([this] {
coll_root_t coll_root = get_root();
});
}
-TEST_F(collection_manager_test_t, update)
+TEST_P(collection_manager_test_t, update)
{
run_async([this] {
coll_root_t coll_root = get_root();
checking_mappings(coll_root);
});
}
+
+INSTANTIATE_TEST_SUITE_P(
+ collection_manager_test,
+ collection_manager_test_t,
+ ::testing::Values (
+ "segmented",
+ "circularbounded"
+ )
+);
}
};
-TEST_F(object_data_handler_test_t, single_write)
+TEST_P(object_data_handler_test_t, single_write)
{
run_async([this] {
write(1<<20, 8<<10, 'c');
});
}
-TEST_F(object_data_handler_test_t, multi_write)
+TEST_P(object_data_handler_test_t, multi_write)
{
run_async([this] {
write((1<<20) - (4<<10), 4<<10, 'a');
});
}
-TEST_F(object_data_handler_test_t, write_hole)
+TEST_P(object_data_handler_test_t, write_hole)
{
run_async([this] {
write((1<<20) - (4<<10), 4<<10, 'a');
});
}
-TEST_F(object_data_handler_test_t, overwrite_single)
+TEST_P(object_data_handler_test_t, overwrite_single)
{
run_async([this] {
write((1<<20), 4<<10, 'a');
});
}
-TEST_F(object_data_handler_test_t, overwrite_double)
+TEST_P(object_data_handler_test_t, overwrite_double)
{
run_async([this] {
write((1<<20), 4<<10, 'a');
});
}
-TEST_F(object_data_handler_test_t, overwrite_partial)
+TEST_P(object_data_handler_test_t, overwrite_partial)
{
run_async([this] {
write((1<<20), 12<<10, 'a');
});
}
-TEST_F(object_data_handler_test_t, unaligned_write)
+TEST_P(object_data_handler_test_t, unaligned_write)
{
run_async([this] {
objaddr_t base = 1<<20;
});
}
-TEST_F(object_data_handler_test_t, unaligned_overwrite)
+TEST_P(object_data_handler_test_t, unaligned_overwrite)
{
run_async([this] {
objaddr_t base = 1<<20;
});
}
-TEST_F(object_data_handler_test_t, truncate)
+TEST_P(object_data_handler_test_t, truncate)
{
run_async([this] {
objaddr_t base = 1<<20;
});
}
-TEST_F(object_data_handler_test_t, no_split) {
+TEST_P(object_data_handler_test_t, no_split) {
run_async([this] {
write(0, 8<<10, 'x');
write(0, 8<<10, 'a');
});
}
-TEST_F(object_data_handler_test_t, split_left) {
+TEST_P(object_data_handler_test_t, split_left) {
run_async([this] {
write(0, 128<<10, 'x');
});
}
-TEST_F(object_data_handler_test_t, split_right) {
+TEST_P(object_data_handler_test_t, split_right) {
run_async([this] {
write(0, 128<<10, 'x');
write(4<<10, 60<<10, 'a');
read(0, 128<<10);
});
}
-TEST_F(object_data_handler_test_t, split_left_right) {
+TEST_P(object_data_handler_test_t, split_left_right) {
run_async([this] {
write(0, 128<<10, 'x');
write(48<<10, 32<<10, 'a');
}
});
}
-TEST_F(object_data_handler_test_t, multiple_split) {
+TEST_P(object_data_handler_test_t, multiple_split) {
run_async([this] {
write(0, 128<<10, 'x');
read(0, 128<<10);
});
}
+
+INSTANTIATE_TEST_SUITE_P(
+ object_data_handler_test,
+ object_data_handler_test_t,
+ ::testing::Values (
+ "segmented",
+ "circularbounded"
+ )
+);
+
+
}
};
-TEST_F(omap_manager_test_t, basic)
+TEST_P(omap_manager_test_t, basic)
{
run_async([this] {
omap_root_t omap_root = initialize();
});
}
-TEST_F(omap_manager_test_t, force_leafnode_split)
+TEST_P(omap_manager_test_t, force_leafnode_split)
{
run_async([this] {
omap_root_t omap_root = initialize();
});
}
-TEST_F(omap_manager_test_t, force_leafnode_split_merge)
+TEST_P(omap_manager_test_t, force_leafnode_split_merge)
{
run_async([this] {
omap_root_t omap_root = initialize();
});
}
-TEST_F(omap_manager_test_t, force_leafnode_split_merge_fullandbalanced)
+TEST_P(omap_manager_test_t, force_leafnode_split_merge_fullandbalanced)
{
run_async([this] {
omap_root_t omap_root = initialize();
});
}
-TEST_F(omap_manager_test_t, force_split_listkeys_list_rmkey_range_clear)
+TEST_P(omap_manager_test_t, force_split_listkeys_list_rmkey_range_clear)
{
run_async([this] {
omap_root_t omap_root = initialize();
});
}
-TEST_F(omap_manager_test_t, force_inner_node_split_list_rmkey_range)
+TEST_P(omap_manager_test_t, force_inner_node_split_list_rmkey_range)
{
run_async([this] {
omap_root_t omap_root = initialize();
}
-TEST_F(omap_manager_test_t, internal_force_split)
+TEST_P(omap_manager_test_t, internal_force_split)
{
run_async([this] {
omap_root_t omap_root = initialize();
});
}
-TEST_F(omap_manager_test_t, internal_force_merge_fullandbalanced)
+TEST_P(omap_manager_test_t, internal_force_merge_fullandbalanced)
{
run_async([this] {
omap_root_t omap_root = initialize();
});
}
-TEST_F(omap_manager_test_t, replay)
+TEST_P(omap_manager_test_t, replay)
{
run_async([this] {
omap_root_t omap_root = initialize();
}
-TEST_F(omap_manager_test_t, internal_force_split_to_root)
+TEST_P(omap_manager_test_t, internal_force_split_to_root)
{
run_async([this] {
omap_root_t omap_root = initialize();
check_mappings(omap_root);
});
}
+
+INSTANTIATE_TEST_SUITE_P(
+ omap_manager_test,
+ omap_manager_test_t,
+ ::testing::Values (
+ "segmented",
+ "circularbounded"
+ )
+);
struct seastore_test_t :
public seastar_test_suite_t,
- SeaStoreTestState,
- ::testing::WithParamInterface<const char*> {
+ SeaStoreTestState {
coll_t coll_name{spg_t{pg_t{0, 0}}};
CollectionRef coll;
seastore_test_t() {}
seastar::future<> set_up_fut() final {
- std::string j_type = GetParam();
- journal_type_t journal;
- if (j_type == "segmented") {
- journal = journal_type_t::SEGMENTED;
- } else if (j_type == "circularbounded") {
- journal = journal_type_t::RANDOM_BLOCK;
- } else {
- ceph_assert(0 == "no support");
- }
- return tm_setup(journal
+ return tm_setup(
).then([this] {
return sharded_seastore->create_new_collection(coll_name);
}).then([this](auto coll_ref) {
struct transaction_manager_test_t :
public seastar_test_suite_t,
- TMTestState,
- ::testing::WithParamInterface<const char*> {
+ TMTestState {
std::random_device rd;
std::mt19937 gen;
}
seastar::future<> set_up_fut() final {
- std::string j_type = GetParam();
- if (j_type == "segmented") {
- return tm_setup(journal_type_t::SEGMENTED);
- } else if (j_type == "circularbounded") {
- return tm_setup(journal_type_t::RANDOM_BLOCK);
- } else {
- ceph_assert(0 == "no support");
- }
+ return tm_setup();
}
seastar::future<> tear_down_fut() final {
void set_primary_device_ref(DeviceRef) final;
};
-class EphemeralTestState {
+class EphemeralTestState : public ::testing::WithParamInterface<const char*> {
protected:
journal_type_t journal_type;
size_t num_main_device_managers = 0;
restart_fut().get0();
}
- seastar::future<> tm_setup(
- journal_type_t type = journal_type_t::SEGMENTED) {
+ seastar::future<> tm_setup() {
LOG_PREFIX(EphemeralTestState::tm_setup);
- journal_type = type;
- if (journal_type == journal_type_t::SEGMENTED) {
+ std::string j_type = GetParam();
+ if (j_type == "segmented") {
devices.reset(new
EphemeralSegmentedDevices(
num_main_device_managers, num_cold_device_managers));
} else {
- assert(journal_type == journal_type_t::RANDOM_BLOCK);
+ assert(j_type == "circularbounded");
//TODO: multiple devices
ceph_assert(num_main_device_managers == 1);
ceph_assert(num_cold_device_managers == 0);