From 835e5bc225abc217879b03325c0fccfccd150f01 Mon Sep 17 00:00:00 2001 From: Hailiang Wang Date: Wed, 8 Nov 2017 18:06:22 +0800 Subject: [PATCH] autotest: blobstore_test (porting from nightly to autotest) This patch is used to test blobstore automatically which based on examples/blob/cli/blobcli. Change-Id: I0309cf01d1561f309574a37aeaff8bfbc395f65c Signed-off-by: Hailiang Wang Signed-off-by: paul luse Reviewed-on: https://review.gerrithub.io/386186 Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker Reviewed-by: Daniel Verkamp --- autotest.sh | 1 + test/blobstore/blobstore.sh | 27 +++++++++++++++++++++++++++ test/blobstore/test.bs | 8 ++++++++ 3 files changed, 36 insertions(+) create mode 100755 test/blobstore/blobstore.sh create mode 100644 test/blobstore/test.bs diff --git a/autotest.sh b/autotest.sh index 20b35fe02..d1f2b7f21 100755 --- a/autotest.sh +++ b/autotest.sh @@ -123,6 +123,7 @@ fi if [ $SPDK_TEST_BLOBFS -eq 1 ]; then run_test ./test/blobfs/rocksdb/rocksdb.sh + run_test ./test/blobstore/blobstore.sh fi if [ $SPDK_TEST_NVMF -eq 1 ]; then diff --git a/test/blobstore/blobstore.sh b/test/blobstore/blobstore.sh new file mode 100755 index 000000000..df9f94a34 --- /dev/null +++ b/test/blobstore/blobstore.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +SYSTEM=`uname -s` +if [ $SYSTEM = "FreeBSD" ] ; then + echo "blobstore.sh cannot run on FreeBSD currently." + exit 0 +fi + +set -xe + +testdir=$(readlink -f $(dirname $0)) +rootdir=$(readlink -f $testdir/../..) +source $rootdir/scripts/autotest_common.sh + +timing_enter blobstore + +set -e + +# Nvme0 target configuration +$rootdir/scripts/gen_nvme.sh > $testdir/blobcli.conf + +$rootdir/examples/blob/cli/blobcli -c $testdir/blobcli.conf -b Nvme0n1 -T $testdir/test.bs + +rm -rf $testdir/blobcli.conf +rm -rf ./*.blob + +timing_exit blobstore diff --git a/test/blobstore/test.bs b/test/blobstore/test.bs new file mode 100644 index 000000000..923201598 --- /dev/null +++ b/test/blobstore/test.bs @@ -0,0 +1,8 @@ +-i +-l bdevs +-n 1 +-s bs +-p $B0 +-d $B0 M.blob +-x $B0 b0key boval +-r $B0 b0key