From 88bfd79669ef39561b4f1df2f1e19e97dd1804dd Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 21 Aug 2015 14:13:31 -0400 Subject: [PATCH] test/erasure-code: drop directory from profile Signed-off-by: Sage Weil --- src/test/erasure-code/TestErasureCodeLrc.cc | 10 ---------- src/test/erasure-code/TestErasureCodePlugin.cc | 2 -- src/test/erasure-code/TestErasureCodePluginIsa.cc | 1 - src/test/erasure-code/TestErasureCodePluginJerasure.cc | 4 ---- src/test/erasure-code/TestErasureCodePluginLrc.cc | 1 - src/test/erasure-code/TestErasureCodePluginShec.cc | 4 ---- src/test/erasure-code/TestErasureCodeShec.cc | 2 -- src/test/erasure-code/TestErasureCodeShec_all.cc | 1 - src/test/erasure-code/TestErasureCodeShec_arguments.cc | 1 - src/test/erasure-code/ceph_erasure_code.cc | 3 --- src/test/erasure-code/ceph_erasure_code_benchmark.cc | 3 --- .../erasure-code/ceph_erasure_code_non_regression.cc | 6 +----- 12 files changed, 1 insertion(+), 37 deletions(-) diff --git a/src/test/erasure-code/TestErasureCodeLrc.cc b/src/test/erasure-code/TestErasureCodeLrc.cc index 405e074dc29..772351c01dc 100644 --- a/src/test/erasure-code/TestErasureCodeLrc.cc +++ b/src/test/erasure-code/TestErasureCodeLrc.cc @@ -351,7 +351,6 @@ TEST(ErasureCodeLrc, layers_sanity_checks) ErasureCodeProfile profile; profile["mapping"] = "__DDD__DD"; - profile["directory"] = ".libs"; const char *description_string = "[ " " [ \"_cDDD_cDD\", \"\" ]," @@ -383,7 +382,6 @@ TEST(ErasureCodeLrc, layers_sanity_checks) { ErasureCodeLrc lrc(g_conf->erasure_code_dir); ErasureCodeProfile profile; - profile["directory"] = ".libs"; profile["mapping"] = "DD"; const char *description_string = @@ -408,7 +406,6 @@ TEST(ErasureCodeLrc, layers_init) " [ \"_cDDD_cDD_\", \"directory=.libs\" ]," "]"; profile["layers"] = description_string; - profile["directory"] = ".libs"; json_spirit::mArray description; EXPECT_EQ(0, lrc.layers_description(profile, &description, &cerr)); EXPECT_EQ(0, lrc.layers_parse(description_string, description, &cerr)); @@ -433,7 +430,6 @@ TEST(ErasureCodeLrc, init) " [ \"_____cDDD\", \"\" ]," "]"; profile["layers"] = description_string; - profile["directory"] = ".libs"; EXPECT_EQ(0, lrc.init(profile, &cerr)); } @@ -444,7 +440,6 @@ TEST(ErasureCodeLrc, init_kml) profile["k"] = "4"; profile["m"] = "2"; profile["l"] = "3"; - profile["directory"] = ".libs"; EXPECT_EQ(0, lrc.init(profile, &cerr)); EXPECT_EQ((unsigned int)(4 + 2 + (4 + 2) / 3), lrc.get_chunk_count()); } @@ -464,7 +459,6 @@ TEST(ErasureCodeLrc, minimum_to_decode) " [ \"_____cDDD\", \"\" ]," "]"; profile["layers"] = description_string; - profile["directory"] = ".libs"; EXPECT_EQ(0, lrc.init(profile, &cerr)); set want_to_read; want_to_read.insert(1); @@ -489,7 +483,6 @@ TEST(ErasureCodeLrc, minimum_to_decode) " [ \"_____DDDDc\", \"\" ]," "]"; profile["layers"] = description_string; - profile["directory"] = ".libs"; EXPECT_EQ(0, lrc.init(profile, &cerr)); EXPECT_EQ(profile["mapping"].length(), lrc.get_chunk_count()); @@ -539,7 +532,6 @@ TEST(ErasureCodeLrc, minimum_to_decode) " [ \"_____cDDD\", \"\" ]," "]"; profile["layers"] = description_string; - profile["directory"] = ".libs"; EXPECT_EQ(0, lrc.init(profile, &cerr)); EXPECT_EQ(profile["mapping"].length(), lrc.get_chunk_count()); @@ -618,7 +610,6 @@ TEST(ErasureCodeLrc, encode_decode) " [ \"____cDDD\", \"\" ]," // second local layer "]"; profile["layers"] = description_string; - profile["directory"] = ".libs"; EXPECT_EQ(0, lrc.init(profile, &cerr)); EXPECT_EQ(4U, lrc.get_data_chunk_count()); unsigned int stripe_width = g_conf->osd_pool_erasure_code_stripe_width; @@ -749,7 +740,6 @@ TEST(ErasureCodeLrc, encode_decode_2) " [ \"____DDDc\", \"\" ]," "]"; profile["layers"] = description_string; - profile["directory"] = ".libs"; EXPECT_EQ(0, lrc.init(profile, &cerr)); EXPECT_EQ(4U, lrc.get_data_chunk_count()); unsigned int stripe_width = g_conf->osd_pool_erasure_code_stripe_width; diff --git a/src/test/erasure-code/TestErasureCodePlugin.cc b/src/test/erasure-code/TestErasureCodePlugin.cc index 13068274474..6cf241e448b 100644 --- a/src/test/erasure-code/TestErasureCodePlugin.cc +++ b/src/test/erasure-code/TestErasureCodePlugin.cc @@ -32,7 +32,6 @@ protected: public: virtual void *entry() { ErasureCodeProfile profile; - profile["directory"] = ".libs"; ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance(); ErasureCodeInterfaceRef erasure_code; instance.factory("hangs", @@ -76,7 +75,6 @@ TEST_F(ErasureCodePluginRegistryTest, all) { ErasureCodeProfile profile; string directory(".libs"); - profile["directory"] = directory; ErasureCodeInterfaceRef erasure_code; ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance(); EXPECT_FALSE(erasure_code); diff --git a/src/test/erasure-code/TestErasureCodePluginIsa.cc b/src/test/erasure-code/TestErasureCodePluginIsa.cc index 7207bf415cf..f1b0884c146 100644 --- a/src/test/erasure-code/TestErasureCodePluginIsa.cc +++ b/src/test/erasure-code/TestErasureCodePluginIsa.cc @@ -26,7 +26,6 @@ TEST(ErasureCodePlugin, factory) { ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance(); ErasureCodeProfile profile; - profile["directory"] = ".libs"; { ErasureCodeInterfaceRef erasure_code; EXPECT_FALSE(erasure_code); diff --git a/src/test/erasure-code/TestErasureCodePluginJerasure.cc b/src/test/erasure-code/TestErasureCodePluginJerasure.cc index 86df90d0076..1616ce667d8 100644 --- a/src/test/erasure-code/TestErasureCodePluginJerasure.cc +++ b/src/test/erasure-code/TestErasureCodePluginJerasure.cc @@ -30,7 +30,6 @@ TEST(ErasureCodePlugin, factory) { ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance(); ErasureCodeProfile profile; - profile["directory"] = ".libs"; { ErasureCodeInterfaceRef erasure_code; EXPECT_FALSE(erasure_code); @@ -53,7 +52,6 @@ TEST(ErasureCodePlugin, factory) for(const char **technique = techniques; *technique; technique++) { ErasureCodeInterfaceRef erasure_code; ErasureCodeProfile profile; - profile["directory"] = ".libs"; profile["technique"] = *technique; EXPECT_FALSE(erasure_code); EXPECT_EQ(0, instance.factory("jerasure", @@ -81,7 +79,6 @@ TEST(ErasureCodePlugin, select) // load test plugins instead of actual plugins to assert the desired side effect // happens profile["jerasure-name"] = "test_jerasure"; - profile["directory"] = ".libs"; profile["technique"] = "reed_sol_van"; // all features are available, load the SSE4 plugin @@ -200,7 +197,6 @@ TEST(ErasureCodePlugin, sse) ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance(); ErasureCodeProfile profile; - profile["directory"] = ".libs"; profile["technique"] = "reed_sol_van"; profile["k"] = "2"; profile["m"] = "1"; diff --git a/src/test/erasure-code/TestErasureCodePluginLrc.cc b/src/test/erasure-code/TestErasureCodePluginLrc.cc index df3c09f0aad..03abafcbf1c 100644 --- a/src/test/erasure-code/TestErasureCodePluginLrc.cc +++ b/src/test/erasure-code/TestErasureCodePluginLrc.cc @@ -29,7 +29,6 @@ TEST(ErasureCodePlugin, factory) { ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance(); ErasureCodeProfile profile; - profile["directory"] = ".libs"; profile["mapping"] = "DD_"; profile["layers"] = "[ [ \"DDc\", \"\" ] ]"; ErasureCodeInterfaceRef erasure_code; diff --git a/src/test/erasure-code/TestErasureCodePluginShec.cc b/src/test/erasure-code/TestErasureCodePluginShec.cc index f0307c33fd5..270815052b3 100644 --- a/src/test/erasure-code/TestErasureCodePluginShec.cc +++ b/src/test/erasure-code/TestErasureCodePluginShec.cc @@ -31,7 +31,6 @@ TEST(ErasureCodePlugin, factory) { ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance(); map profile; - profile["directory"] = ".libs"; { ErasureCodeInterfaceRef erasure_code; EXPECT_FALSE(erasure_code); @@ -48,7 +47,6 @@ TEST(ErasureCodePlugin, factory) }; for(const char **technique = techniques; *technique; technique++) { ErasureCodeInterfaceRef erasure_code; - profile["directory"] = ".libs"; profile["technique"] = *technique; EXPECT_FALSE(erasure_code); EXPECT_EQ(0, instance.factory("shec", @@ -76,7 +74,6 @@ TEST(ErasureCodePlugin, select) // load test plugins instead of actual plugins to assert the desired side effect // happens profile["shec-name"] = "test_shec"; - profile["directory"] = ".libs"; profile["technique"] = "multiple"; // all features are available, load the SSE4 plugin @@ -195,7 +192,6 @@ TEST(ErasureCodePlugin, sse) ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance(); map profile; - profile["directory"] = ".libs"; profile["technique"] = "multiple"; profile["k"] = "2"; profile["m"] = "1"; diff --git a/src/test/erasure-code/TestErasureCodeShec.cc b/src/test/erasure-code/TestErasureCodeShec.cc index 3029fde12fc..1f87505aad4 100644 --- a/src/test/erasure-code/TestErasureCodeShec.cc +++ b/src/test/erasure-code/TestErasureCodeShec.cc @@ -49,7 +49,6 @@ TEST(ErasureCodeShec, init_1) ErasureCodeProfile *profile = new ErasureCodeProfile(); (*profile)["plugin"] = "shec"; (*profile)["technique"] = ""; - (*profile)["directory"] = "/usr/lib64/ceph/erasure-code"; (*profile)["ruleset-failure-domain"] = "osd"; (*profile)["k"] = "4"; (*profile)["m"] = "3"; @@ -249,7 +248,6 @@ TEST(ErasureCodeShec, init_8) ErasureCodeShec::MULTIPLE); ErasureCodeProfile *profile = new ErasureCodeProfile(); (*profile)["plugin"] = "shec"; - (*profile)["directory"] = "/usr/lib64/"; //unexpected value (*profile)["technique"] = ""; (*profile)["ruleset-failure-domain"] = "osd"; (*profile)["k"] = "4"; diff --git a/src/test/erasure-code/TestErasureCodeShec_all.cc b/src/test/erasure-code/TestErasureCodeShec_all.cc index e968467a5a8..6e9a743e456 100644 --- a/src/test/erasure-code/TestErasureCodeShec_all.cc +++ b/src/test/erasure-code/TestErasureCodeShec_all.cc @@ -76,7 +76,6 @@ TEST_P(ParameterTest, parameter_all) ErasureCodeProfile *profile = new ErasureCodeProfile(); (*profile)["plugin"] = "shec"; (*profile)["technique"] = ""; - (*profile)["directory"] = "/usr/lib64/ceph/erasure-code"; (*profile)["ruleset-failure-domain"] = "osd"; (*profile)["k"] = k; (*profile)["m"] = m; diff --git a/src/test/erasure-code/TestErasureCodeShec_arguments.cc b/src/test/erasure-code/TestErasureCodeShec_arguments.cc index 4f0e56e2dfb..5d2f494dc14 100644 --- a/src/test/erasure-code/TestErasureCodeShec_arguments.cc +++ b/src/test/erasure-code/TestErasureCodeShec_arguments.cc @@ -188,7 +188,6 @@ TEST(ParameterTest, combination_all) std::string>(); (*profile)["plugin"] = "shec"; (*profile)["technique"] = ""; - (*profile)["directory"] = "/usr/lib64/ceph/erasure-code"; (*profile)["ruleset-failure-domain"] = "osd"; (*profile)["k"] = k; (*profile)["m"] = m; diff --git a/src/test/erasure-code/ceph_erasure_code.cc b/src/test/erasure-code/ceph_erasure_code.cc index 243818a5b54..fd688d542e0 100644 --- a/src/test/erasure-code/ceph_erasure_code.cc +++ b/src/test/erasure-code/ceph_erasure_code.cc @@ -110,9 +110,6 @@ int ErasureCodeCommand::setup(int argc, char** argv) { } } - if (profile.count("directory") == 0) - profile["directory"] = ".libs"; - return 0; } diff --git a/src/test/erasure-code/ceph_erasure_code_benchmark.cc b/src/test/erasure-code/ceph_erasure_code_benchmark.cc index 0eb00e889bb..31a73d45a9f 100644 --- a/src/test/erasure-code/ceph_erasure_code_benchmark.cc +++ b/src/test/erasure-code/ceph_erasure_code_benchmark.cc @@ -108,9 +108,6 @@ int ErasureCodeBench::setup(int argc, char** argv) { } } - if (profile.count("directory") == 0) - profile["directory"] = ".libs"; - in_size = vm["size"].as(); max_iterations = vm["iterations"].as(); plugin = vm["plugin"].as(); diff --git a/src/test/erasure-code/ceph_erasure_code_non_regression.cc b/src/test/erasure-code/ceph_erasure_code_non_regression.cc index 054de7ec81c..91e251f2eee 100644 --- a/src/test/erasure-code/ceph_erasure_code_non_regression.cc +++ b/src/test/erasure-code/ceph_erasure_code_non_regression.cc @@ -136,17 +136,13 @@ int ErasureCodeNonRegression::setup(int argc, char** argv) { } else { profile[strs[0]] = strs[1]; } - if (strs[0] != "directory") - directory += " " + *i; + directory += " " + *i; } } if (vm.count("path")) directory = vm["path"].as(); - if (profile.count("directory") == 0) - profile["directory"] = ".libs"; - return 0; } -- 2.47.3