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>
40 lines
676 B
Bash
Executable File
40 lines
676 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
|
|
|
|
function ftl_kill() {
|
|
rm -f $testdir/.testfile_*
|
|
}
|
|
|
|
vendor_id='0x1d1d'
|
|
device_id='0x1f1f'
|
|
device=$(lspci -d ${vendor_id}:${device_id} | cut -d' ' -f 1)
|
|
|
|
if [ -z "$device" ]; then
|
|
echo "Could not find FTL device. Tests skipped."
|
|
exit 0
|
|
fi
|
|
|
|
trap "ftl_kill; exit 1" SIGINT SIGTERM EXIT
|
|
|
|
timing_enter ftl
|
|
timing_enter fio
|
|
|
|
run_test suite $testdir/fio.sh $device
|
|
|
|
timing_exit fio
|
|
|
|
timing_enter restore
|
|
run_test suite $testdir/restore.sh $device $uuid
|
|
timing_exit restore
|
|
|
|
timing_exit ftl
|
|
|
|
trap - SIGINT SIGTERM EXIT
|
|
ftl_kill
|