qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] iotests: Run iotests with sanitizers
@ 2025-10-23  8:10 Akihiko Odaki
  2025-10-23  8:10 ` [PATCH 1/2] qemu-img: Fix amend option parse error handling Akihiko Odaki
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Akihiko Odaki @ 2025-10-23  8:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Hanna Reitz, qemu-block, Akihiko Odaki

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.

Enabling AddressSanitizer actually revealed a use-after-free so a patch
to fix it is placed before one that enables iotests with sanitizers.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
---
Akihiko Odaki (2):
      qemu-img: Fix amend option parse error handling
      iotests: Run iotests with sanitizers

 qemu-img.c                       |  2 +-
 tests/qemu-iotests/meson.build   |  8 --------
 tests/qemu-iotests/testrunner.py | 12 ++++++++++++
 3 files changed, 13 insertions(+), 9 deletions(-)
---
base-commit: c85ba2d7a4056595166689890285105579db446a
change-id: 20251023-iotests-8697350cf968

Best regards,
--  
Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-11-04 16:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-23  8:10 [PATCH 0/2] iotests: Run iotests with sanitizers Akihiko Odaki
2025-10-23  8:10 ` [PATCH 1/2] qemu-img: Fix amend option parse error handling Akihiko Odaki
2025-10-23  8:10 ` [PATCH 2/2] iotests: Run iotests with sanitizers Akihiko Odaki
2025-10-23  8:16   ` Philippe Mathieu-Daudé
2025-11-04 16:36 ` [PATCH 0/2] " Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).