diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/test/smoke.sh | |
parent | Initial commit. (diff) | |
download | ceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/smoke.sh')
-rwxr-xr-x | src/test/smoke.sh | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/test/smoke.sh b/src/test/smoke.sh new file mode 100755 index 000000000..b66266e6b --- /dev/null +++ b/src/test/smoke.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +source $CEPH_ROOT/qa/standalone/ceph-helpers.sh + +mon_port=$(get_unused_port) + +function run() { + local dir=$1 + shift + + export CEPH_MON="127.0.0.1:$mon_port" + export CEPH_ARGS + CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none " + CEPH_ARGS+="--mon-host=$CEPH_MON " + set -e + + local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')} + for func in $funcs ; do + setup $dir || return 1 + $func $dir || return 1 + teardown $dir || return 1 + done +} + +function TEST_minimal() { + local dir=$1 + + run_mon $dir a + run_mgr $dir x + run_osd $dir 0 + run_osd $dir 1 + run_osd $dir 2 + create_rbd_pool + wait_for_clean +} + +function TEST_multimon() { + local dir=$1 + MONA="127.0.0.1:$((mon_port++))" + MONB="127.0.0.1:$((mon_port++))" + MONC="127.0.0.1:$((mon_port++))" + + run_mon $dir a --public-addr $MONA + run_mon $dir b --public-addr $MONB + run_mon $dir c --public_addr $MONC + run_mgr $dir x + run_mgr $dir y + run_osd $dir 0 + run_osd $dir 1 + run_osd $dir 2 + + ceph osd pool create foo 32 + ceph osd out 0 + wait_for_clean + + timeout 20 rados -p foo bench 4 write -b 4096 --no-cleanup || return 1 + wait_for_clean + + ceph osd in 0 + flush_pg_stats + wait_for_clean +} + +main smoke "$@" |