Spdk/test/ocf/integrity/fio-modes.sh
Michal Berger 844c8ec383 check_format: Reformat the Bash code in compliance with shfmt
Change-Id: I93e7b9d355870b0528a0ac3382fba1a10a558d45
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1718
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-07 20:52:21 +00:00

41 lines
815 B
Bash
Executable File

#!/usr/bin/env bash
curdir=$(dirname $(readlink -f "${BASH_SOURCE[0]}"))
rootdir=$(readlink -f $curdir/../../..)
source $rootdir/test/ocf/common.sh
function fio_verify() {
fio_bdev $curdir/test.fio --aux-path=/tmp/ --ioengine=spdk_bdev "$@"
}
function cleanup() {
rm -f $curdir/modes.conf
}
# Clear nvme device which we will use in test
clear_nvme
trap "cleanup; exit 1" SIGINT SIGTERM EXIT
nvme_cfg=$($rootdir/scripts/gen_nvme.sh)
config="
$(nvme_cfg)
[Split]
Split Nvme0n1 8 101
[OCF]
OCF PT_Nvme pt Nvme0n1p0 Nvme0n1p1
OCF WT_Nvme wt Nvme0n1p2 Nvme0n1p3
OCF WB_Nvme0 wb Nvme0n1p4 Nvme0n1p5
OCF WB_Nvme1 wb Nvme0n1p6 Nvme0n1p7
"
echo "$config" > $curdir/modes.conf
fio_verify --filename=PT_Nvme:WT_Nvme:WB_Nvme0:WB_Nvme1 --spdk_conf=$curdir/modes.conf
trap - SIGINT SIGTERM EXIT
cleanup