On 23/10/25 10:10, Akihiko Odaki wrote:
Commit 2cc4d1c5eab1 ("tests/check-block: Skip iotests when sanitizers are enabled") changed iotests to skip when sanitizers are enabled. The rationale is that AddressSanitizer emits warnings and reports leaks, which results in test breakage. Later, sanitizers that are enabled for production environments (safe-stack and cfi-icall) were exempted.However, this approach has a few problems. - It requires rebuild to disable sanitizers if the existing build has them enabled. - It disables other useful non-production sanitizers. - The exemption of safe-stack and cfi-icall is not correctly implemented, so qemu-iotests are incorrectly enabled whenever either safe-stack or cfi-icall is enabled *and*, even if there is another sanitizer like AddressSanitizer. To solve these problems, direct AddressSanitizer warnings to separate files to avoid changing the test results, and selectively disable leak detection at runtime instead of requiring to disable all sanitizers at buildtime. Signed-off-by: Akihiko Odaki <[email protected]> --- tests/qemu-iotests/meson.build | 8 -------- tests/qemu-iotests/testrunner.py | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-)
Nice. Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
