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/objectstore/run_smr_bluestore_test.sh | |
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 'src/test/objectstore/run_smr_bluestore_test.sh')
-rw-r--r-- | src/test/objectstore/run_smr_bluestore_test.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/test/objectstore/run_smr_bluestore_test.sh b/src/test/objectstore/run_smr_bluestore_test.sh new file mode 100644 index 000000000..d689cf2c5 --- /dev/null +++ b/src/test/objectstore/run_smr_bluestore_test.sh @@ -0,0 +1,48 @@ +#!/bin/bash -ex + +# 1) run_smr_bluestore_test.sh +# Setup smr device, run all tests + +# 2) run_smr_bluestore_test.sh --smr +# Setup smr device but skip tests failing on smr + + +before_creation=$(mktemp) +lsscsi > $before_creation + +echo "cd /backstores/user:zbc +create name=zbc0 size=20G cfgstring=model-HM/zsize-256/conv-10@zbc0.raw +/loopback create +cd /loopback +create naa.50014055e5f25aa0 +cd naa.50014055e5f25aa0/luns +create /backstores/user:zbc/zbc0 0 +" | sudo targetcli + +sleep 1 #if too fast device does not show up +after_creation=$(mktemp) +lsscsi > $after_creation +if [[ $(diff $before_creation $after_creation | wc -l ) != 2 ]] +then + echo New zbc device not created + false +fi + +function cleanup() { + echo "cd /loopback +delete naa.50014055e5f25aa0 +cd /backstores/user:zbc +delete zbc0" | sudo targetcli + sudo rm -f zbc0.raw + rm -f $before_creation $after_creation +} +trap cleanup EXIT + +DEV=$(diff $before_creation $after_creation |grep zbc |sed "s@.* /@/@") +sudo chmod 666 $DEV +# Need sudo +# https://patchwork.kernel.org/project/linux-block/patch/20210811110505.29649-3-Niklas.Cassel@wdc.com/ +sudo ceph_test_objectstore \ + --bluestore-block-path $DEV \ + --gtest_filter=*/2 \ + $* |