]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: Add TEST_no_segfault_for_bad_keyring to test/mon/misc.sh 7922/head
authorBrad Hubbard <bhubbard@redhat.com>
Fri, 4 Mar 2016 03:06:47 +0000 (13:06 +1000)
committerBrad Hubbard <bhubbard@redhat.com>
Fri, 4 Mar 2016 04:34:29 +0000 (14:34 +1000)
94da46b6e31cac206cb32fc5bd3159209ee25e8c adds
TEST_no_segfault_for_bad_keyring which requires changes to run
in hammer since test/mon/misc.sh is not written to run multiple tests in
succession in the hammer version.

Refs: #14960

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
src/test/mon/misc.sh

index 24f6998d23fd25cbb7fd6c8300209f144ae634c2..5ab9d4ef6c6a647086fa67444d8713049e6160c6 100755 (executable)
@@ -19,28 +19,28 @@ source test/mon/mon-test-helpers.sh
 
 function run() {
     local dir=$1
+    shift
 
     export CEPH_MON="127.0.0.1:7102"
     export CEPH_ARGS
     CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
     CEPH_ARGS+="--mon-host=$CEPH_MON "
 
-    setup $dir || return 1
-    run_mon $dir a --public-addr $CEPH_MON
-    FUNCTIONS=${FUNCTIONS:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
-    for TEST_function in $FUNCTIONS ; do
-        if ! $TEST_function $dir ; then
-            cat $dir/a/log
-            return 1
-        fi
+    local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
+    for func in $funcs ; do
+        $func $dir || return 1
     done
-    teardown $dir || return 1
 }
 
 TEST_POOL=rbd
 
 function TEST_osd_pool_get_set() {
-    local dir=$1 flag
+    local dir=$1
+
+    setup $dir || return 1
+    run_mon $dir a || return 1
+
+    local flag
     for flag in hashpspool nodelete nopgchange nosizechange; do
         if [ $flag = hashpspool ]; then
            ./ceph osd dump | grep 'pool 0' | grep $flag || return 1
@@ -82,6 +82,8 @@ function TEST_osd_pool_get_set() {
     ! ./ceph osd pool set $ecpool min_size $(expr $k - 1) || return 1
     ! ./ceph osd pool set $ecpool min_size $(expr $size + 1) || return 1
 
+    teardown $dir || return 1
+
 }
 
 function TEST_no_segfault_for_bad_keyring() {