test/ftl: use OCSSD instead first NVMe like
Change-Id: I175bebb68ea1752fda6fe80932cd27c30cf3dcff Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/c/443737 (master) Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447183 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
5c50e8e1b5
commit
14d4c7f06d
@ -78,9 +78,12 @@ if [ $(uname -s) = Linux ]; then
|
|||||||
bdf="$(basename $(readlink -e /sys/class/nvme/${dev#/dev/}/device))"
|
bdf="$(basename $(readlink -e /sys/class/nvme/${dev#/dev/}/device))"
|
||||||
echo "INFO: blacklisting OCSSD device: $dev ($bdf)"
|
echo "INFO: blacklisting OCSSD device: $dev ($bdf)"
|
||||||
PCI_BLACKLIST+=" $bdf"
|
PCI_BLACKLIST+=" $bdf"
|
||||||
|
OCSSD_PCI_DEVICES+=" $bdf"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
export OCSSD_PCI_DEVICES
|
||||||
|
|
||||||
# Now, bind blacklisted devices to pci-stub module. This will prevent
|
# Now, bind blacklisted devices to pci-stub module. This will prevent
|
||||||
# automatic grabbing these devices when we add device/vendor ID to
|
# automatic grabbing these devices when we add device/vendor ID to
|
||||||
# proper driver.
|
# proper driver.
|
||||||
|
@ -7,20 +7,27 @@ rootdir=$(readlink -f $testdir/../..)
|
|||||||
|
|
||||||
source $rootdir/test/common/autotest_common.sh
|
source $rootdir/test/common/autotest_common.sh
|
||||||
|
|
||||||
function ftl_kill() {
|
function at_ftl_exit() {
|
||||||
rm -f $testdir/.testfile_*
|
# restore original driver
|
||||||
|
PCI_WHITELIST="$device" PCI_BLACKLIST="" DRIVER_OVERRIDE="$ocssd_original_dirver" ./scripts/setup.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
vendor_id='0x1d1d'
|
read device _ <<< "$OCSSD_PCI_DEVICES"
|
||||||
device_id='0x1f1f'
|
|
||||||
device=$(lspci -d ${vendor_id}:${device_id} | cut -d' ' -f 1)
|
|
||||||
|
|
||||||
if [ -z "$device" ]; then
|
if [[ -z "$device" ]]; then
|
||||||
echo "Could not find FTL device. Tests skipped."
|
echo "OCSSD device list is empty."
|
||||||
exit 0
|
echo "This test require that OCSSD_PCI_DEVICES environment variable to be set"
|
||||||
|
echo "and point to OCSSD devices PCI BDF. You can specify multiple space"
|
||||||
|
echo "separated BDFs in this case first one will be used."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap "ftl_kill; exit 1" SIGINT SIGTERM EXIT
|
ocssd_original_dirver="$(basename $(readlink /sys/bus/pci/devices/$device/driver))"
|
||||||
|
|
||||||
|
trap "at_ftl_exit" SIGINT SIGTERM EXIT
|
||||||
|
|
||||||
|
# OCSSD is blacklisted so bind it to vfio/uio driver before testing
|
||||||
|
PCI_WHITELIST="$device" PCI_BLACKLIST="" DRIVER_OVERRIDE="" ./scripts/setup.sh
|
||||||
|
|
||||||
timing_enter ftl
|
timing_enter ftl
|
||||||
timing_enter fio
|
timing_enter fio
|
||||||
|
Loading…
Reference in New Issue
Block a user