Commit 2fde729f authored by Vitaliy Mysak's avatar Vitaliy Mysak Committed by Darek Stojaczyk
Browse files

OCF: tests: add integrity test



Add SPDK_TEST_CAS suite
Add basic integrity test with multithread-multidevice fio with cache
  modes WT and PT

Change-Id: If2916558894d9f7efd9628eb99f7338c90b312b1
Signed-off-by: default avatarVitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439346


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent d1fee489
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -14,6 +14,16 @@ cd $rootdir
date -u
git describe --tags

if [ "$SPDK_TEST_OCF" -eq 1 ]; then
	# We compile OCF sources ourselves
	# They don't need to be checked with scanbuild and code coverage is not applicable
	# So we precompile OCF now for further use as standalone static library
	./configure $(echo $config_params | sed 's/--enable-coverage//g')
	CC=gcc CCAR=ar $MAKE $MAKEFLAGS -C lib/bdev/ocf/env exportlib O=$rootdir/build/ocf.a
	# Set config to use precompiled library
	config_params="$config_params --with-ocf=/$rootdir/build/ocf.a"
fi

./configure $config_params

# Print some test system info out for the log
+4 −0
Original line number Diff line number Diff line
@@ -192,6 +192,10 @@ if [ $SPDK_TEST_RBD -eq 1 ]; then
	run_test suite ./test/spdkcli/rbd.sh
fi

if [ $SPDK_TEST_OCF -eq 1 ]; then
	run_test suite ./test/ocf/ocf.sh
fi

run_test suite ./test/json_config/json_config.sh

timing_enter cleanup
+5 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ fi
: ${SPDK_RUN_INSTALLED_DPDK=1}; export SPDK_RUN_INSTALLED_DPDK
: ${SPDK_TEST_CRYPTO=1}; export SPDK_TEST_CRYPTO
: ${SPDK_TEST_FTL=0}; export SPDK_TEST_FTL
: ${SPDK_TEST_OCF=1}; export SPDK_TEST_OCF

if [ -z "$DEPENDENCY_DIR" ]; then
	export DEPENDENCY_DIR=/home/sys_sgsw
@@ -88,6 +89,10 @@ if [ $SPDK_TEST_CRYPTO -eq 1 ]; then
	config_params+=' --with-crypto'
fi

if [ $SPDK_TEST_OCF -eq 1 ]; then
	config_params+=" --with-ocf=/usr/src/ocf"
fi

export UBSAN_OPTIONS='halt_on_error=1:print_stacktrace=1:abort_on_error=1'

# On Linux systems, override the default HUGEMEM in scripts/setup.sh to
+13 −0
Original line number Diff line number Diff line
#!/usr/bin/env bash

curdir=$(dirname $(readlink -f "$BASH_SOURCE"))
rootdir=$(readlink -f $curdir/../../..)
plugindir=$rootdir/examples/bdev/fio_plugin

source $rootdir/test/common/autotest_common.sh

function fio_verify(){
	LD_PRELOAD=$plugindir/fio_plugin /usr/src/fio/fio $curdir/test.fio --aux-path=/tmp/ --ioengine=spdk_bdev $@
}

fio_verify --filename=MalCache1:MalCache2 --spdk_conf=$curdir/mallocs.conf
+9 −0
Original line number Diff line number Diff line

[Malloc]
  NumberOfLuns 4
  LunSizeInMB 300
  BlockSize 512

[OCF]
  OCF MalCache1 wt Malloc0 Malloc1
  OCF MalCache2 pt Malloc2 Malloc3
Loading