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/run-rbd-tests | |
parent | Initial commit. (diff) | |
download | ceph-upstream/18.2.2.tar.xz ceph-upstream/18.2.2.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | src/test/run-rbd-tests | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/test/run-rbd-tests b/src/test/run-rbd-tests new file mode 100755 index 000000000..14bd24de8 --- /dev/null +++ b/src/test/run-rbd-tests @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +set -ex + +# this should be run from the src directory in the ceph.git + +source $(dirname $0)/detect-build-env-vars.sh +CEPH_SRC=$CEPH_ROOT/src +if [ -e CMakeCache.txt ]; then + CYTHON_MODULES_DIR=$CEPH_LIB/cython_modules +else + CYTHON_MODULES_DIR=$CEPH_SRC/build +fi + +export PYTHONPATH="$CEPH_SRC/pybind:$CEPH_SRC/test/pybind:$CYTHON_MODULES_DIR/lib.3" + +recreate_pool() { + POOL_NAME=$1 + PG_NUM=100 + ceph osd pool delete $POOL_NAME $POOL_NAME --yes-i-really-really-mean-it + ceph osd pool create $POOL_NAME $PG_NUM + rbd pool init $POOL_NAME +} + +run_cli_tests() { + recreate_pool rbd + $CEPH_SRC/../qa/workunits/rbd/import_export.sh + recreate_pool rbd + $CEPH_SRC/../qa/workunits/rbd/cli_generic.sh + recreate_pool rbd + $CEPH_SRC/../qa/workunits/rbd/journal.sh + recreate_pool rbd + $CEPH_SRC/../qa/workunits/rbd/luks-encryption.sh +} + +# tests that do not depend on image format / features +run_generic_tests() { + $CEPH_SRC/../qa/workunits/rbd/verify_pool.sh + + recreate_pool rbd + $CEPH_SRC/../qa/workunits/rbd/journal.sh + recreate_pool rbd + $CEPH_SRC/../qa/workunits/rbd/test_admin_socket.sh +} + +run_api_tests() { + # skip many_snaps since it takes several minutes + python3 -m nose -v test_rbd -e '.*many_snaps' + # ceph_test_librbd creates its own pools + ceph_test_librbd +} + +ceph_test_cls_rbd +run_generic_tests +run_api_tests +run_cli_tests + +export RBD_CREATE_ARGS="--image-format 2" +run_cli_tests + +for i in 0 1 61 109 +do + export RBD_FEATURES=$i + run_api_tests +done + +echo OK |