qa: krbd write-after-checksum tests

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Ilya Dryomov 2017-04-26 21:42:58 +02:00
parent 577cca0e51
commit 7c8a7f52da
14 changed files with 82 additions and 0 deletions

View File

View File

@ -0,0 +1,3 @@
tasks:
- install:
- ceph:

View File

@ -0,0 +1 @@
../../../../../clusters/fixed-1.yaml

View File

@ -0,0 +1,7 @@
overrides:
ceph:
conf:
global:
ms die on skipped message: false
client:
rbd default features: 5

View File

@ -0,0 +1,5 @@
tasks:
- workunit:
clients:
all:
- rbd/krbd_stable_pages_required.sh

0
qa/suites/krbd/wac/wac/% Normal file
View File

View File

@ -0,0 +1,3 @@
tasks:
- install:
- ceph:

View File

@ -0,0 +1 @@
../../../../../clusters/fixed-3.yaml

View File

@ -0,0 +1,7 @@
overrides:
ceph:
conf:
global:
ms die on skipped message: false
client:
rbd default features: 5

View File

@ -0,0 +1,11 @@
tasks:
- exec:
client.0:
- "dmesg -C"
- rbd:
all:
fs_type: ext4
- workunit:
clients:
all:
- suites/wac.sh

View File

@ -0,0 +1,10 @@
overrides:
ceph:
conf:
global:
ms inject socket failures: 500
tasks:
- exec:
client.0:
- "dmesg | grep -q 'libceph: osd.* socket closed'"
- "dmesg | grep -q 'libceph: osd.* socket error on write'"

View File

@ -0,0 +1,5 @@
tasks:
- exec:
client.0:
- "! dmesg | grep -q 'libceph: osd.* socket closed'"
- "! dmesg | grep -q 'libceph: osd.* socket error on write'"

View File

@ -0,0 +1,17 @@
#!/bin/bash
set -ex
IMAGE_NAME="stable-pages-required-test"
rbd create --size 1 $IMAGE_NAME
DEV=$(sudo rbd map $IMAGE_NAME)
[[ $(blockdev --getsize64 $DEV) -eq 1048576 ]]
grep -q 1 /sys/block/${DEV#/dev/}/bdi/stable_pages_required
rbd resize --size 2 $IMAGE_NAME
[[ $(blockdev --getsize64 $DEV) -eq 2097152 ]]
grep -q 1 /sys/block/${DEV#/dev/}/bdi/stable_pages_required
sudo rbd unmap $DEV
echo OK

12
qa/workunits/suites/wac.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -ex
wget http://download.ceph.com/qa/wac.c
gcc -o wac wac.c
set +e
timeout 5m ./wac -l 65536 -n 64 -r wac-test
RET=$?
set -e
[[ $RET -eq 124 ]]
echo OK