MCPcopy Create free account
hub / github.com/ceph/ceph / TEST

Function TEST

src/test/erasure-code/TestErasureCodePluginJerasure.cc:30–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28using namespace std;
29
30TEST(ErasureCodePlugin, factory)
31{
32 ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance();
33 {
34 ErasureCodeProfile profile;
35 profile["technique"] = "doesnotexist";
36 ErasureCodeInterfaceRef erasure_code;
37 EXPECT_FALSE(erasure_code);
38 EXPECT_EQ(-ENOENT, instance.factory("jerasure",
39 g_conf().get_val<std::string>("erasure_code_dir"),
40 profile,
41 &erasure_code, &cerr));
42 EXPECT_FALSE(erasure_code);
43 }
44 const char *techniques[] = {
45 "reed_sol_van",
46 "reed_sol_r6_op",
47 "cauchy_orig",
48 "cauchy_good",
49 "liberation",
50 "blaum_roth",
51 "liber8tion",
52 0
53 };
54 for(const char **technique = techniques; *technique; technique++) {
55 ErasureCodeInterfaceRef erasure_code;
56 ErasureCodeProfile profile;
57 profile["technique"] = *technique;
58 EXPECT_FALSE(erasure_code);
59 EXPECT_EQ(0, instance.factory("jerasure",
60 g_conf().get_val<std::string>("erasure_code_dir"),
61 profile,
62 &erasure_code, &cerr));
63 EXPECT_TRUE(erasure_code.get());
64 }
65}
66
67bufferptr create_bufferptr(uint32_t value) {
68 bufferlist bl;

Callers

nothing calls this directly

Calls 11

instanceClass · 0.85
create_bufferptrFunction · 0.85
insert_rangeMethod · 0.80
shard_id_tClass · 0.50
factoryMethod · 0.45
getMethod · 0.45
encode_chunksMethod · 0.45
encode_deltaMethod · 0.45
apply_deltaMethod · 0.45
c_strMethod · 0.45
decode_chunksMethod · 0.45

Tested by

no test coverage detected