numam-spdk/test/ftl/fio.sh
Wojciech Malikowski ca558b6163 bdev_ftl: Added FTL bdev functional tests
This patch introduces functional tests for FTL bdev.

The tests cover various I/O workflows and check data integrity. Several
scripts have been added to test the FTL library:
 * generate_config.sh - prepares configuration scripts for specified
 device
 * restore.sh - tests restoring device's state from the SSD
 * fio.sh - runs tests based on fio and fio_plugin

The tests are run from autotest.sh when the SPDK_TEST_BDEV_FTL flag is
set.

Change-Id: I561d99ed35fe91eadd3756789cc99afe2da8c1db
Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/431330
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2019-01-29 17:33:10 +00:00

28 lines
577 B
Bash
Executable File

#!/usr/bin/env bash
set -e
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../..)
source $rootdir/test/common/autotest_common.sh
tests=(randw-verify randw-verify-j2 randw-verify-depth128)
plugindir=$rootdir/examples/bdev/fio_plugin
device=$1
if [ ! -d /usr/src/fio ]; then
echo "FIO not available"
exit 1
fi
$rootdir/scripts/gen_ftl.sh -a $device -n nvme0 -l 0-3
for test in ${tests[@]}; do
timing_enter $test
LD_PRELOAD=$plugindir/fio_plugin /usr/src/fio/fio $testdir/config/fio/$test.fio
timing_exit $test
done
report_test_completion ftl_fio