]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: update to match crushmap validation message
authorLoic Dachary <ldachary@redhat.com>
Sun, 20 Sep 2015 21:42:45 +0000 (23:42 +0200)
committerLoic Dachary <ldachary@redhat.com>
Wed, 7 Oct 2015 16:09:43 +0000 (18:09 +0200)
http://tracker.ceph.com/issues/13182 Fixes: #13182

Signed-off-by: Loic Dachary <ldachary@redhat.com>
(cherry picked from commit 21a1e75d8a7bad89a48cd9d36902c5d609be5015)

Conflicts:
qa/workunits/cephtool/test.sh
  the test structure in hammer is different, adapt
  the relevant test.

qa/workunits/cephtool/test.sh

index b1bfeb3996eaaa2581d3a99daec23a4f52545409..3c39a241282478d92b00f276597c8a7ceb67a81b 100755 (executable)
@@ -1483,6 +1483,7 @@ function test_mon_crushmap_validation()
 {
   local map=$TMPDIR/map
   ceph osd getcrushmap -o $map
+
   # crushtool validation timesout and is ignored
   cat > $TMPDIR/crushtool <<EOF
 #!/bin/sh
@@ -1492,7 +1493,19 @@ EOF
   chmod +x $TMPDIR/crushtool
   ceph tell mon.* injectargs --crushtool $TMPDIR/crushtool
   ceph osd setcrushmap -i $map 2>&1 | grep 'took too long'
+
+  # crushtool validation fails and is ignored
+  cat > $TMPDIR/crushtool <<EOF
+#!/bin/sh
+echo 'TEST FAIL' >&2
+exit 1 # failure
+EOF
+  chmod +x $TMPDIR/crushtool
+  ceph tell mon.* injectargs --crushtool $TMPDIR/crushtool
+  ceph osd setcrushmap -i $map 2>&1 | grep 'Failed crushmap test'
+
   ceph tell mon.* injectargs --crushtool crushtool
+
   # crushtool validation succeeds
   ceph osd setcrushmap -i $map
 }