]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/run-rbd-tests
import ceph 16.2.6
[ceph.git] / ceph / src / test / run-rbd-tests
CommitLineData
11fdf7f2
TL
1#!/usr/bin/env bash
2set -ex
7c673cae
FG
3
4# this should be run from the src directory in the ceph.git
5
6source $(dirname $0)/detect-build-env-vars.sh
7CEPH_SRC=$CEPH_ROOT/src
8if [ -e CMakeCache.txt ]; then
9 CYTHON_MODULES_DIR=$CEPH_LIB/cython_modules
10else
11 CYTHON_MODULES_DIR=$CEPH_SRC/build
12fi
13
9f95a23c 14export PYTHONPATH="$CEPH_SRC/pybind:$CEPH_SRC/test/pybind:$CYTHON_MODULES_DIR/lib.3"
7c673cae
FG
15
16recreate_pool() {
17 POOL_NAME=$1
18 PG_NUM=100
19 ceph osd pool delete $POOL_NAME $POOL_NAME --yes-i-really-really-mean-it
20 ceph osd pool create $POOL_NAME $PG_NUM
9f95a23c 21 rbd pool init $POOL_NAME
7c673cae
FG
22}
23
24run_cli_tests() {
25 recreate_pool rbd
26 $CEPH_SRC/../qa/workunits/rbd/import_export.sh
27 recreate_pool rbd
28 $CEPH_SRC/../qa/workunits/rbd/cli_generic.sh
29 recreate_pool rbd
30 $CEPH_SRC/../qa/workunits/rbd/journal.sh
f67539c2
TL
31 recreate_pool rbd
32 $CEPH_SRC/../qa/workunits/rbd/luks-encryption.sh
7c673cae
FG
33}
34
35# tests that do not depend on image format / features
36run_generic_tests() {
37 $CEPH_SRC/../qa/workunits/rbd/verify_pool.sh
38
39 recreate_pool rbd
40 $CEPH_SRC/../qa/workunits/rbd/journal.sh
41 recreate_pool rbd
42 $CEPH_SRC/../qa/workunits/rbd/test_admin_socket.sh
43}
44
45run_api_tests() {
46 # skip many_snaps since it takes several minutes
9f95a23c 47 python3 -m nose -v test_rbd -e '.*many_snaps'
7c673cae
FG
48 # ceph_test_librbd creates its own pools
49 ceph_test_librbd
50}
51
52ceph_test_cls_rbd
53run_generic_tests
54run_api_tests
55run_cli_tests
56
57export RBD_CREATE_ARGS="--image-format 2"
58run_cli_tests
59
60for i in 0 1 61 109
61do
62 export RBD_FEATURES=$i
63 run_api_tests
64done
65
66echo OK