Commit 62966da3 authored by yidong0635's avatar yidong0635 Committed by Jim Harris
Browse files

test/nvme: Move ASAN check out of for loop



Check whether ASAN is enabled up front, before entering the loop over all PCI devices.

Change-Id: Iede6a0466014745b77190b79fb8255e7b61bb260
Signed-off-by: default avataryidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453512


Reviewed-by: default avatarSeth Howell <seth.howell5141@gmail.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent e560d53c
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -169,19 +169,15 @@ if [ `uname` = Linux ]; then
	trap - SIGINT SIGTERM EXIT
	kill_stub
fi
PLUGIN_DIR=$rootdir/examples/nvme/fio_plugin

if [ -d /usr/src/fio ]; then
if [ -d /usr/src/fio ] && [ $SPDK_RUN_ASAN -eq 0 ]; then
	# Only test when ASAN is not enabled. If ASAN is enabled, we cannot test.
	timing_enter fio_plugin
	PLUGIN_DIR=$rootdir/examples/nvme/fio_plugin
	for bdf in $(iter_pci_class_code 01 08 02); do
		# Only test when ASAN is not enabled. If ASAN is enabled, we cannot test.
		if [ $SPDK_RUN_ASAN -eq 0 ]; then
		LD_PRELOAD=$PLUGIN_DIR/fio_plugin /usr/src/fio/fio $PLUGIN_DIR/example_config.fio --filename="trtype=PCIe traddr=${bdf//:/.} ns=1"
		report_test_completion "bdev_fio"
		fi
		break
	done

	timing_exit fio_plugin
fi