]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
erasure-code: lrc size test depends on layer semantic
authorLoic Dachary <ldachary@redhat.com>
Mon, 25 May 2015 13:44:53 +0000 (15:44 +0200)
committerLoic Dachary <ldachary@redhat.com>
Mon, 25 May 2015 14:59:02 +0000 (16:59 +0200)
When the lrc layers are defined, the semantic of the D,c and _
characters are defined, the rest is undefined. The test that verifies
the guard against layers of different size uses the A character which
is undefined. Depending on the implementation, the size test could fail
because the A character is undefined and a guard to forbid undefined
characters is added. Replace A with D to make sure the undefined
character A will not interfere with the test.

This may seem nitpicking but it actually caused problems after a code
refactor that will appear in a few commits from here.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/erasure-code/TestErasureCodeLrc.cc

index c24b32364f5ad88fd969267f2f85efd80e14f533..c03195950e82002548d08a96aa3ba8accd082a37 100644 (file)
@@ -384,12 +384,12 @@ TEST(ErasureCodeLrc, layers_sanity_checks)
     ErasureCodeProfile profile;
     profile["directory"] = ".libs";
     profile["mapping"] =
-           "AA";
+           "DD";
     const char *description_string =
       "[ "
-      "  [ \"AA??\", \"\" ], "
-      "  [ \"AA\", \"\" ], "
-      "  [ \"AA\", \"\" ], "
+      "  [ \"DD??\", \"\" ], "
+      "  [ \"DD\", \"\" ], "
+      "  [ \"DD\", \"\" ], "
       "]";
     profile["layers"] = description_string;
     EXPECT_EQ(ERROR_LRC_MAPPING_SIZE, lrc.init(profile, &cerr));