From 8190e121a38181407ee7750f12c39053c1764a2b Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 10 Aug 2017 16:33:43 -0700 Subject: [PATCH] test/bdev: add Ceph RBD bdev to bdev tests Change-Id: I7a65a5818f2b851962c2be391efedfb9bfc8398c Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/373841 Tested-by: SPDK Automated Test System Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris --- scripts/gen_rbd.sh | 11 +++++++++++ test/lib/bdev/blockdev.sh | 4 ++++ 2 files changed, 15 insertions(+) create mode 100755 scripts/gen_rbd.sh diff --git a/scripts/gen_rbd.sh b/scripts/gen_rbd.sh new file mode 100755 index 0000000000..07fdbd1e76 --- /dev/null +++ b/scripts/gen_rbd.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -e + +if ! hash ceph &> /dev/null; then + exit 0 +fi + +echo +echo "[Ceph]" +echo " Ceph $RBD_POOL $RBD_NAME 512" diff --git a/test/lib/bdev/blockdev.sh b/test/lib/bdev/blockdev.sh index 0f7bc00547..a2bc71b04b 100755 --- a/test/lib/bdev/blockdev.sh +++ b/test/lib/bdev/blockdev.sh @@ -56,6 +56,10 @@ dd if=/dev/zero of=/tmp/aiofile bs=2048 count=5000 cp $testdir/bdev.conf.in $testdir/bdev.conf $rootdir/scripts/gen_nvme.sh >> $testdir/bdev.conf +if [ $SPDK_TEST_RBD -eq 1 ]; then + $rootdir/scripts/gen_rbd.sh >> $testdir/bdev.conf +fi + timing_enter bounds $testdir/bdevio/bdevio $testdir/bdev.conf timing_exit bounds