]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crushtool: improve straw2 compile/decompile test 3923/head
authorSage Weil <sage@redhat.com>
Tue, 10 Mar 2015 13:45:01 +0000 (06:45 -0700)
committerSage Weil <sage@redhat.com>
Tue, 10 Mar 2015 13:46:56 +0000 (06:46 -0700)
This way it catches #11079.

Signed-off-by: Sage Weil <sage@redhat.com>
src/test/cli/crushtool/straw2.t
src/test/cli/crushtool/straw2.txt

index 8638dea5fb24c3a9514c29d15a6c3a445be90b31..86813384072b649f396a55cbeeecf6d63332e332 100644 (file)
@@ -1,2 +1,4 @@
-  $ crushtool -c "$TESTDIR/straw2.txt" -o straw2
-  $ rm straw2
+  $ crushtool -c $TESTDIR/straw2.txt -o straw2
+  $ crushtool -d straw2 -o straw2.txt.new
+  $ diff -b $TESTDIR/straw2.txt straw2.txt.new
+  $ rm straw2 straw2.txt.new
index 6a4a7e59fa8a4f14c1421460bd2ff9c752c4e39f..0928aa5b929751a6cc0f0f1ac4d5e0765fbdd03b 100644 (file)
@@ -15,27 +15,29 @@ type 2 default
 
 # buckets
 host host0 {
-        id -1           # do not change unnecessarily
-        # weight 1.000
-        alg straw2
-        hash 0  # rjenkins1
-        item device0 weight 1.000
+       id -1           # do not change unnecessarily
+       # weight 1.000
+       alg straw2
+       hash 0  # rjenkins1
+       item device0 weight 1.000
 }
 default default {
-        id -2           # do not change unnecessarily
-        # weight 1.000
-        alg straw2
-        hash 0  # rjenkins1
-        item host0 weight 1.000
+       id -2           # do not change unnecessarily
+       # weight 1.000
+       alg straw2
+       hash 0  # rjenkins1
+       item host0 weight 1.000
 }
 
 # rules
 rule replicated_ruleset {
-        ruleset 0
-        type replicated
-        min_size 1
-        max_size 10
-        step take default
-        step chooseleaf firstn 0 type host
-        step emit
+       ruleset 0
+       type replicated
+       min_size 1
+       max_size 10
+       step take default
+       step chooseleaf firstn 0 type host
+       step emit
 }
+
+# end crush map