summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/test/asan/lit.cfg.py3
-rw-r--r--compiler-rt/test/lit.common.cfg.py6
-rw-r--r--compiler-rt/test/msan/lit.cfg.py3
-rw-r--r--compiler-rt/test/sanitizer_common/lit.common.cfg.py3
-rw-r--r--compiler-rt/test/sanitizer_common/netbsd_commands/run_noaslr.sh3
-rw-r--r--compiler-rt/test/tsan/lit.cfg.py3
6 files changed, 21 insertions, 0 deletions
diff --git a/compiler-rt/test/asan/lit.cfg.py b/compiler-rt/test/asan/lit.cfg.py
index 45b8ffc96fc..9045c6ec8f9 100644
--- a/compiler-rt/test/asan/lit.cfg.py
+++ b/compiler-rt/test/asan/lit.cfg.py
@@ -237,3 +237,6 @@ if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'SunOS', 'Windows', 'Net
if not config.parallelism_group:
config.parallelism_group = 'shadow-memory'
+
+if config.host_os == 'NetBSD':
+ config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix))
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index 00f0a1e93ab..1a955ac0ea4 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -498,3 +498,9 @@ elif config.use_lld and (not config.has_lld):
config.clang = " " + " ".join(run_wrapper + [config.compile_wrapper, config.clang]) + " "
config.target_cflags = " " + " ".join(target_cflags + extra_cflags) + " "
+
+if config.host_os == 'NetBSD':
+ nb_commands_dir = os.path.join(config.compiler_rt_src_root,
+ "test", "sanitizer_common", "netbsd_commands")
+ config.netbsd_noaslr_prefix = ('sh ' +
+ os.path.join(nb_commands_dir, 'run_noaslr.sh'))
diff --git a/compiler-rt/test/msan/lit.cfg.py b/compiler-rt/test/msan/lit.cfg.py
index d45b54620bd..0b43d0810d8 100644
--- a/compiler-rt/test/msan/lit.cfg.py
+++ b/compiler-rt/test/msan/lit.cfg.py
@@ -45,3 +45,6 @@ if config.host_arch in ['mips64', 'mips64el']:
config.substitutions.append( ('CHECK-%short-stack', 'CHECK-SHORT-STACK'))
else:
config.substitutions.append( ('CHECK-%short-stack', 'CHECK-FULL-STACK'))
+
+if config.host_os == 'NetBSD':
+ config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix))
diff --git a/compiler-rt/test/sanitizer_common/lit.common.cfg.py b/compiler-rt/test/sanitizer_common/lit.common.cfg.py
index 26e08ed47aa..a587daa6fbd 100644
--- a/compiler-rt/test/sanitizer_common/lit.common.cfg.py
+++ b/compiler-rt/test/sanitizer_common/lit.common.cfg.py
@@ -73,3 +73,6 @@ if config.host_os not in ['Linux', 'Darwin', 'NetBSD', 'FreeBSD']:
if not config.parallelism_group:
config.parallelism_group = 'shadow-memory'
+
+if config.host_os == 'NetBSD':
+ config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix))
diff --git a/compiler-rt/test/sanitizer_common/netbsd_commands/run_noaslr.sh b/compiler-rt/test/sanitizer_common/netbsd_commands/run_noaslr.sh
new file mode 100644
index 00000000000..cb89b9542ef
--- /dev/null
+++ b/compiler-rt/test/sanitizer_common/netbsd_commands/run_noaslr.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+/usr/sbin/paxctl +a "${1}"
+exec "${@}"
diff --git a/compiler-rt/test/tsan/lit.cfg.py b/compiler-rt/test/tsan/lit.cfg.py
index a16d8e7199a..ece8e66a220 100644
--- a/compiler-rt/test/tsan/lit.cfg.py
+++ b/compiler-rt/test/tsan/lit.cfg.py
@@ -88,3 +88,6 @@ if config.android:
if not config.parallelism_group:
config.parallelism_group = 'shadow-memory'
+
+if config.host_os == 'NetBSD':
+ config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix))
OpenPOWER on IntegriCloud