llvm/compiler-rt/test/scudo/standalone/unit/gwp_asan/lit.site.cfg.py.in

@LIT_SITE_CFG_IN_HEADER@

# Load common config for all compiler-rt unit tests.
lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")

# Setup config name.
config.name = 'ScudoStandalone-Unit-GwpAsanTorture'

# Setup test source and exec root.
# For unit tests, we define it as build directory with unit tests.
config.test_exec_root = "@COMPILER_RT_BINARY_DIR@/lib/scudo/standalone/tests"
config.test_source_root = config.test_exec_root

# This is a second run of the Scudo test suite, but this time under a "torture"
# GWP-ASan mode. Every allocation that can go to GWP-ASan, should go to
# GWP-ASan. This ensures that GWP-ASan allocations meet the same testing
# requirements as the native Scudo allocations. Reserves 409MiB of vaddr space
# for the guarded pool, and this should be paged in on demand. If necessary (for
# 32-bit or places where kernel commits immediately), this could possibly be
# reduced.
config.environment['SCUDO_OPTIONS'] = 'GWP_ASAN_SampleRate=1:GWP_ASAN_MaxSimultaneousAllocations=100000'

# GWP-ASan doesn't support malloc-type mismatch.
config.environment['SKIP_TYPE_MISMATCH'] = '1'