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: Jim Harris <james.r.harris@intel.com> Change-Id: I089d31726c7b8f5ed0ccdc2deb19acc5431260f1 Reviewed-on: https://review.gerrithub.io/407843 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
dba0f6e0a8
commit
18f3a22b20
@ -333,6 +333,11 @@ function rbd_cleanup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function start_stub() {
|
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 &
|
$rootdir/test/app/stub/stub $1 &
|
||||||
stubpid=$!
|
stubpid=$!
|
||||||
echo Waiting for stub to ready for secondary processes...
|
echo Waiting for stub to ready for secondary processes...
|
||||||
@ -348,6 +353,10 @@ function kill_stub() {
|
|||||||
kill $stubpid
|
kill $stubpid
|
||||||
wait $stubpid
|
wait $stubpid
|
||||||
rm -f /var/run/spdk_stub0
|
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() {
|
function run_test() {
|
||||||
|
Loading…
Reference in New Issue
Block a user