aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorJulian Lettner <jlettner@apple.com>2019-02-27 19:06:20 +0000
committerJulian Lettner <jlettner@apple.com>2019-02-27 19:06:20 +0000
commit6fd2c49ae63c9eb007df5f26f81890f28d8c4b66 (patch)
treed6c9bca5cc656ce7f7a214e1dbfec54c9132a35a /unittests
parent27dcec781011674c4e2e674f4552e88a340fcdc7 (diff)
[Darwin][NFC] Refactor throttling of 64bit sanitizer tests on Darwin
Underlying condition for throttling is "has large mmap'd regions" (i.e., shadow memory) and not sanitizers in general (e.g., UBSan does not need to be throttled). Rename parallelism group `darwin-64bit-sanitizer` to `shadow-memory` and apply it unconditionally to all tests which require it. We can then have all the Darwin throttling logic in one place in the commen lit config. Throttle sanitizer_common unit tests. Configuration was previously missing from sanitizer_common/Unit/lit.site.cfg. Reviewed by: kubamracek Differential Revision: https://reviews.llvm.org/D58677 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355018 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/lit.common.unit.cfg8
-rw-r--r--unittests/lit_unittest_cfg_utils.py6
2 files changed, 7 insertions, 7 deletions
diff --git a/unittests/lit.common.unit.cfg b/unittests/lit.common.unit.cfg
index 31206e913..fba034ae4 100644
--- a/unittests/lit.common.unit.cfg
+++ b/unittests/lit.common.unit.cfg
@@ -30,10 +30,10 @@ if 'TEMP' in os.environ:
config.environment['TEMP'] = os.environ['TEMP']
if config.host_os == 'Darwin':
- # Only run up to 3 64-bit sanitized processes simultaneously on Darwin.
- # Using more scales badly and hogs the system due to inefficient handling
- # of large mmap'd regions (terabytes) by the kernel.
- lit_config.parallelism_groups["darwin-64bit-sanitizer"] = 3
+ # Only run up to 3 processes that require shadow memory simultaneously on
+ # 64-bit Darwin. Using more scales badly and hogs the system due to
+ # inefficient handling of large mmap'd regions (terabytes) by the kernel.
+ lit_config.parallelism_groups["shadow-memory"] = 3
# The test config gets pickled and sent to multiprocessing workers, and that
# only works for code if it is stored at the top level of some module.
diff --git a/unittests/lit_unittest_cfg_utils.py b/unittests/lit_unittest_cfg_utils.py
index ff7b1ee01..721e81b9d 100644
--- a/unittests/lit_unittest_cfg_utils.py
+++ b/unittests/lit_unittest_cfg_utils.py
@@ -1,4 +1,4 @@
-# Put all 64-bit sanitizer tests in the darwin-64bit-sanitizer parallelism
-# group. This will only run three of them concurrently.
+# Put all 64-bit tests in the shadow-memory parallelism group. We throttle those
+# in our common lit config (lit.common.unit.cfg).
def darwin_sanitizer_parallelism_group_func(test):
- return "darwin-64bit-sanitizer" if "x86_64" in test.file_path else ""
+ return "shadow-memory" if "x86_64" in test.file_path else None