summaryrefslogtreecommitdiffstats
path: root/src/test/erasure-code/TestErasureCodeIsa.cc
diff options
context:
space:
mode:
authorXiaoxi Chen <xiaoxi.chen@intel.com>2014-08-20 09:35:44 +0200
committerXiaoxi Chen <xiaoxi.chen@intel.com>2014-08-22 15:22:56 +0200
commit78e84f34da83abf5a62ae97bb84ab70774b164a6 (patch)
treeb4c93140c821e2cb6978f4d2a56d2529e8168638 /src/test/erasure-code/TestErasureCodeIsa.cc
parentdoc: Removed quick guide and wireshark from top-level IA. (diff)
downloadceph-78e84f34da83abf5a62ae97bb84ab70774b164a6.tar.xz
ceph-78e84f34da83abf5a62ae97bb84ab70774b164a6.zip
CrushWrapper: pick a ruleset same as rule_id
Originally in the add_simple_ruleset funtion, the ruleset_id is not reused but rule_id is reused. So after some add/remove against rules, the newly created rule likely to have ruleset!=rule_id. We dont want this happen because we are trying to hold the constraint that ruleset == rule_id. Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
Diffstat (limited to 'src/test/erasure-code/TestErasureCodeIsa.cc')
-rw-r--r--src/test/erasure-code/TestErasureCodeIsa.cc30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/test/erasure-code/TestErasureCodeIsa.cc b/src/test/erasure-code/TestErasureCodeIsa.cc
index 93f342a20ea..516d26b944d 100644
--- a/src/test/erasure-code/TestErasureCodeIsa.cc
+++ b/src/test/erasure-code/TestErasureCodeIsa.cc
@@ -734,36 +734,6 @@ TEST(IsaErasureCodeTest, create_ruleset)
}
}
- //
- // The ruleid may be different from the ruleset when a crush rule is
- // removed because the removed ruleid will be reused but the removed
- // ruleset will not be reused.
- //
- // This also asserts that the create_ruleset() method returns a
- // ruleset and not a ruleid http://tracker.ceph.com/issues/9044
- //
- {
- stringstream ss;
- ErasureCodeIsaDefault isa;
- map<std::string,std::string> parameters;
- parameters["k"] = "2";
- parameters["m"] = "2";
- parameters["w"] = "8";
- isa.init(parameters);
- int FIRST = isa.create_ruleset("FIRST", *c, &ss);
- int SECOND = isa.create_ruleset("SECOND", *c, &ss);
- int FIRST_ruleid = c->get_rule_id("FIRST");
- EXPECT_EQ(0, c->remove_rule(FIRST_ruleid));
- int ruleset = isa.create_ruleset("myrule", *c, &ss);
- EXPECT_NE(FIRST, ruleset);
- EXPECT_NE(SECOND, ruleset);
- EXPECT_NE(ruleset, c->get_rule_id("myrule"));
- int SECOND_ruleid = c->get_rule_id("SECOND");
- EXPECT_EQ(0, c->remove_rule(SECOND_ruleid));
- int myrule_ruleid = c->get_rule_id("myrule");
- EXPECT_EQ(0, c->remove_rule(myrule_ruleid));
- }
-
{
stringstream ss;
ErasureCodeIsaDefault isa;