From: nmordech@redhat.com Date: Tue, 5 Mar 2024 09:29:54 +0000 (+0000) Subject: test/osd/safe-to-destroy.sh: Add checks for the test X-Git-Tag: v20.0.0~2096^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F55949%2Fhead;p=ceph.git test/osd/safe-to-destroy.sh: Add checks for the test The test script is not detecting the build env vars and not checking return code from start osds\mon\mgr. This will add those checks to prevent false results from the test. Signed-off-by: Nitzan Mordechai --- diff --git a/src/test/osd/safe-to-destroy.sh b/src/test/osd/safe-to-destroy.sh index 08afc8e8d8c..fcc1d4b8b02 100755 --- a/src/test/osd/safe-to-destroy.sh +++ b/src/test/osd/safe-to-destroy.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/standalone/ceph-helpers.sh set -e @@ -25,13 +25,12 @@ function run() { function TEST_safe_to_destroy() { local dir=$1 - run_mon $dir a - run_mgr $dir x - run_osd $dir 0 - run_osd $dir 1 - run_osd $dir 2 - run_osd $dir 3 - + run_mon $dir a || return 1 + run_mgr $dir x || return 1 + run_osd $dir 0 || return 1 + run_osd $dir 1 || return 1 + run_osd $dir 2 || return 1 + run_osd $dir 3 || return 1 flush_pg_stats ceph osd safe-to-destroy 0 @@ -64,12 +63,12 @@ function TEST_safe_to_destroy() { function TEST_ok_to_stop() { local dir=$1 - run_mon $dir a - run_mgr $dir x - run_osd $dir 0 - run_osd $dir 1 - run_osd $dir 2 - run_osd $dir 3 + run_mon $dir a || return 1 + run_mgr $dir x || return 1 + run_osd $dir 0 || return 1 + run_osd $dir 1 || return 1 + run_osd $dir 2 || return 1 + run_osd $dir 3 || return 1 ceph osd pool create foo 128 ceph osd pool set foo size 3