]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd: use v1 images in the rbd unit tests
authorJulien COLLET <julien.collet@cern.ch>
Tue, 20 Feb 2018 09:42:52 +0000 (10:42 +0100)
committerJulien COLLET <julien.collet@cern.ch>
Tue, 6 Mar 2018 08:07:32 +0000 (09:07 +0100)
Update the test/qa scripts to support the v1 creation disallow fix (using
the RBD_FORCE_ALLOW_V1 environment variable).

Signed-off-by: Julien Collet <julien.collet@cern.ch>
qa/workunits/rbd/cli_generic.sh
qa/workunits/rbd/image_read.sh
qa/workunits/rbd/krbd_data_pool.sh
qa/workunits/rbd/merge_diff.sh
src/test/librbd/test_main.cc
src/test/pybind/test_rbd.py

index 3a4bdb39ebbd769476f85ba33d4de9e578e50b81..11d6b73d832f5af02c2dd5004da52b30b36f5b62 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh -ex
 
+export RBD_FORCE_ALLOW_V1=1
+
 # make sure rbd pool is EMPTY.. this is a test script!!
 rbd ls | wc -l | grep -v '^0$' && echo "nonempty rbd pool, aborting!  run this script on an empty test cluster only." && exit 1
 
index 779e315fec4f08751481c0172055bdf589cbf0d2..ddca8356ef6b7e8d2a3ea050f84b8f81b64c255c 100755 (executable)
@@ -54,6 +54,8 @@ DEFAULT_OBJECT_ORDER=22
 MIN_OBJECT_ORDER=12    # technically 9, but the rbd CLI enforces 12
 MAX_OBJECT_ORDER=32
 
+RBD_FORCE_ALLOW_V1=1
+
 PROGNAME=$(basename $0)
 
 ORIGINAL=original-$$
index 7ecdf03d6b121d148bb9ca12ec40c1f13f71c7b6..23dc3806015fe4aca4c9d8da6ef4a1f5ec624390 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -ex
 
+export RBD_FORCE_ALLOW_V1=1
+
 function fill_image() {
     local spec=$1
 
index d0f26072eeeb63b4cc6be7e7d547b184fc9ecb94..eb8597304d0b136fe7772436878042a744040538 100755 (executable)
@@ -1,6 +1,8 @@
 #!/usr/bin/env bash
 set -ex
 
+export RBD_FORCE_ALLOW_V1=1
+
 pool=rbd
 gen=$pool/gen
 out=$pool/out
index 654c8912d6f7ec7e6fd7c3482fba1d6b65d7d007..932163147c4fb5a8934cf1daebb7aa1e14375960 100644 (file)
@@ -24,6 +24,8 @@ extern void register_test_operations();
 
 int main(int argc, char **argv)
 {
+  setenv("RBD_FORCE_ALLOW_V1","1",1);
+
   register_test_librbd();
 #ifdef TEST_LIBRBD_INTERNALS
   register_test_deep_copy();
index 6ce6c32c9d5cc22d7c964dc1caa1d4504c5a200c..a6d308ee13710964e99337cc8194dff7f0bb5079 100644 (file)
@@ -37,6 +37,8 @@ pool_name = None
 IMG_SIZE = 8 << 20 # 8 MiB
 IMG_ORDER = 22 # 4 MiB objects
 
+os.environ["RBD_FORCE_ALLOW_V1"] = "1"
+
 def setup_module():
     global rados
     rados = Rados(conffile='')