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: Vitaliy Mysak <vitaliy.mysak@intel.com> Reviewed-on: https://review.gerrithub.io/c/439346 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
d1fee489a7
commit
2fde729fd7
10
autobuild.sh
10
autobuild.sh
@ -14,6 +14,16 @@ cd $rootdir
|
|||||||
date -u
|
date -u
|
||||||
git describe --tags
|
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
|
./configure $config_params
|
||||||
|
|
||||||
# Print some test system info out for the log
|
# Print some test system info out for the log
|
||||||
|
@ -192,6 +192,10 @@ if [ $SPDK_TEST_RBD -eq 1 ]; then
|
|||||||
run_test suite ./test/spdkcli/rbd.sh
|
run_test suite ./test/spdkcli/rbd.sh
|
||||||
fi
|
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
|
run_test suite ./test/json_config/json_config.sh
|
||||||
|
|
||||||
timing_enter cleanup
|
timing_enter cleanup
|
||||||
|
@ -61,6 +61,7 @@ fi
|
|||||||
: ${SPDK_RUN_INSTALLED_DPDK=1}; export SPDK_RUN_INSTALLED_DPDK
|
: ${SPDK_RUN_INSTALLED_DPDK=1}; export SPDK_RUN_INSTALLED_DPDK
|
||||||
: ${SPDK_TEST_CRYPTO=1}; export SPDK_TEST_CRYPTO
|
: ${SPDK_TEST_CRYPTO=1}; export SPDK_TEST_CRYPTO
|
||||||
: ${SPDK_TEST_FTL=0}; export SPDK_TEST_FTL
|
: ${SPDK_TEST_FTL=0}; export SPDK_TEST_FTL
|
||||||
|
: ${SPDK_TEST_OCF=1}; export SPDK_TEST_OCF
|
||||||
|
|
||||||
if [ -z "$DEPENDENCY_DIR" ]; then
|
if [ -z "$DEPENDENCY_DIR" ]; then
|
||||||
export DEPENDENCY_DIR=/home/sys_sgsw
|
export DEPENDENCY_DIR=/home/sys_sgsw
|
||||||
@ -88,6 +89,10 @@ if [ $SPDK_TEST_CRYPTO -eq 1 ]; then
|
|||||||
config_params+=' --with-crypto'
|
config_params+=' --with-crypto'
|
||||||
fi
|
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'
|
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
|
# On Linux systems, override the default HUGEMEM in scripts/setup.sh to
|
||||||
|
13
test/ocf/integrity/fio-mallocs.sh
Executable file
13
test/ocf/integrity/fio-mallocs.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/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
test/ocf/integrity/mallocs.conf
Normal file
9
test/ocf/integrity/mallocs.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
[Malloc]
|
||||||
|
NumberOfLuns 4
|
||||||
|
LunSizeInMB 300
|
||||||
|
BlockSize 512
|
||||||
|
|
||||||
|
[OCF]
|
||||||
|
OCF MalCache1 wt Malloc0 Malloc1
|
||||||
|
OCF MalCache2 pt Malloc2 Malloc3
|
39
test/ocf/integrity/test.fio
Normal file
39
test/ocf/integrity/test.fio
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
[global]
|
||||||
|
thread=1
|
||||||
|
group_reporting=1
|
||||||
|
direct=1
|
||||||
|
norandommap=1
|
||||||
|
time_based=1
|
||||||
|
do_verify=1
|
||||||
|
verify=md5
|
||||||
|
verify_backlog=1024
|
||||||
|
iodepth=128
|
||||||
|
bs=4K
|
||||||
|
runtime=10
|
||||||
|
|
||||||
|
size=20%
|
||||||
|
|
||||||
|
[job_1]
|
||||||
|
offset=0
|
||||||
|
rw=randwrite
|
||||||
|
name=randwrite
|
||||||
|
|
||||||
|
[job_2]
|
||||||
|
offset=20%
|
||||||
|
rw=randrw
|
||||||
|
name=randrw
|
||||||
|
|
||||||
|
[job_3]
|
||||||
|
offset=40%
|
||||||
|
rw=write
|
||||||
|
name=write
|
||||||
|
|
||||||
|
[job_4]
|
||||||
|
offset=60%
|
||||||
|
rw=rw
|
||||||
|
name=rw
|
||||||
|
|
||||||
|
[job_5]
|
||||||
|
offset=80%
|
||||||
|
rw=randwrite
|
||||||
|
name=randwrite
|
19
test/ocf/ocf.sh
Executable file
19
test/ocf/ocf.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
testdir=$(readlink -f $(dirname $0))
|
||||||
|
rootdir=$(readlink -f $testdir/../..)
|
||||||
|
|
||||||
|
source $rootdir/test/common/autotest_common.sh
|
||||||
|
|
||||||
|
function suite()
|
||||||
|
{
|
||||||
|
timing_enter "$@"
|
||||||
|
run_test suite "$@"
|
||||||
|
timing_exit "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
timing_enter ocf
|
||||||
|
|
||||||
|
suite "$testdir/integrity/fio-mallocs.sh"
|
||||||
|
|
||||||
|
timing_exit ocf
|
Loading…
Reference in New Issue
Block a user