This test explicitly sets ASAN_OPTIONS=detect_leaks=1 which is only
supported on x86-64. The test is currently restricted to run only on
64-bit targets, but needs to be restricted further so it only runs on
x86-64.
Details
Diff Detail
Event Timeline
test/asan/lit.cfg | ||
---|---|---|
125–126 | Where does this mention x86_64? Looks like all this patch does is restrict the test to 64-bit Linux, which is already the case. |
test/asan/lit.cfg | ||
---|---|---|
125–126 | Good point. I assumed that the existing test for enabling detect_leaks=1 was correct, but it wasn't: # Turn on leak detection on 64-bit Linux. if config.host_os == 'Linux' and config.bits == '64': config.environment['ASAN_OPTIONS'] = 'detect_leaks=1' test/asan/Unit/lit.site.cfg.in has a better test: # Enable leak detection in ASan unit tests on x86_64-linux. if config.host_os == 'Linux' and config.host_arch == 'x86_64': config.environment['ASAN_OPTIONS'] = 'detect_leaks=1' |
test/asan/lit.cfg | ||
---|---|---|
125–126 | You're right. This code needs to be deduplicated. Alexey wrote those configs so he's in a better position to help. |
Fix test for leak detection support.
Include another test case that requires leak detection.
test/asan/lit.cfg | ||
---|---|---|
126 | Sorry, I thought Alexey had taken over this review. Is there any way we could get rid of the code duplication between test/asan/lit.cfg and test/asan/Unit/lit.site.cfg.in? |
test/asan/lit.cfg | ||
---|---|---|
126 | I agree it would be nice to get rid of the duplication, but I don't feel confident enough with lit configuration to do it myself. Maybe it belongs in test/lit.common.cfg? |
test/asan/lit.cfg | ||
---|---|---|
126 | That makes sense to me. Alexey? |
test/asan/lit.cfg | ||
---|---|---|
126 | Hm? Doesn't "leak-detection" feature make sense only for ASan tests? Unfortunately, configs for lit-tests and unit tests are different. I'd submit the change as-is. |
test/asan/lit.cfg | ||
---|---|---|
126 | MSan as well, eventually. Any tool that does not support it will simply not have any tests that depend on this feature. |
test/asan/lit.cfg | ||
---|---|---|
126 | Alright, let's define "leak-detection" feature in test/lit.common.cfg and then setup ASAN_OPTIONS here if this feature is enabled. |
I committed this but had to revert it, because it broke the asan testsuite's 32bitConfig on x86_64. I've had another go in D6396.
Where does this mention x86_64? Looks like all this patch does is restrict the test to 64-bit Linux, which is already the case.