Commit 18f3a22b authored by Jim Harris's avatar Jim Harris Committed by Daniel Verkamp
Browse files

test: disable ASLR for multi-process tests



Multi-process tests should work fine using the DPDK
-base-virtaddr parameter.  But we run tests with ASAN
enabled and ASAN instrumentation results in mmap
address hints getting ignored.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I089d31726c7b8f5ed0ccdc2deb19acc5431260f1

Reviewed-on: https://review.gerrithub.io/407843


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent dba0f6e0
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -333,6 +333,11 @@ function rbd_cleanup() {
}

function start_stub() {
	# Disable ASLR for multi-process testing.  SPDK does support using DPDK multi-process,
	# but ASAN instrumentation will result in mmap hints in our specified virt address
	# region getting ignored.   We will reenable it again after multi-process testing
	# is complete in kill_stub()
	echo 0 > /proc/sys/kernel/randomize_va_space
	$rootdir/test/app/stub/stub $1 &
	stubpid=$!
	echo Waiting for stub to ready for secondary processes...
@@ -348,6 +353,10 @@ function kill_stub() {
	kill $stubpid
	wait $stubpid
	rm -f /var/run/spdk_stub0
	# Re-enable ASLR now that we are done with multi-process testing
	# Note: "1" enables ASLR w/o randomizing data segments, "2" adds data segment
	#  randomizing and is the default on all recent Linux kernels
	echo 2 > /proc/sys/kernel/randomize_va_space
}

function run_test() {