diff mbox series

[FYI] Patches that fix testing santiziers with qemu user mode

Message ID CA+=Sn1kH8UpByHo7FKAeZPT=RasJaLespsXw9sZtze_QG4eW_w@mail.gmail.com
State New
Headers show
Series [FYI] Patches that fix testing santiziers with qemu user mode | expand

Commit Message

Andrew Pinski Feb. 8, 2020, 9:14 a.m. UTC
Hi,
  These two patches are what I use to fix testing of the santizers
with qemu.  The first one disables coloring always as for some reason
when running with qemu (but not normally), coloring is detected.  I
have not gone and debugged the reason why the sanitizers does not
detect coloring when run under dejagnu even though, it is designed to
be running under a psedu-TTY.

The second patch disables LSAN when clone with the arguments that are
needed to stop the world fail.  This second patch should in theory go
upstream but I am not going to that right now; plus maybe it should
only disable it when used with asan instead of in general.

With these two patches, I get clean test results on aarch64-linux-gnu.
I am mainly sending them here as I think they are useful for people
who are doing testing; especially cross testing.

Thanks,
Andrew Pinski
From 7666c4ec5db5e99530f8ff9411b782326ce96655 Mon Sep 17 00:00:00 2001
From: Andrew Pinski <apinski@marvell.com>
Date: Thu, 6 Feb 2020 02:06:27 +0000
Subject: [PATCH 1/2] Set default coloring to never.

Auto does not work always.  So just disable coloring.

Change-Id: I68564c6b4c35ed6d7f4e2938d765f428995900e7
Signed-off-by: Andrew Pinski <apinski@marvell.com>
---
 libsanitizer/sanitizer_common/sanitizer_flags.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christophe Lyon Feb. 10, 2020, 1:37 p.m. UTC | #1
Hi Andrew,


On Sat, 8 Feb 2020 at 10:16, Andrew Pinski <pinskia@gmail.com> wrote:
>
> Hi,
>   These two patches are what I use to fix testing of the santizers
> with qemu.  The first one disables coloring always as for some reason
> when running with qemu (but not normally), coloring is detected.  I
> have not gone and debugged the reason why the sanitizers does not
> detect coloring when run under dejagnu even though, it is designed to
> be running under a psedu-TTY.

I looked at that a long time ago (2013 according to the list archives...), see
https://gcc.gnu.org/ml/gcc-patches/2013-05/msg00280.html

When I enabled ASAN on arm, I did update some of the expected outputs,
because of this coloring. I think I had to fix a few *SAN tests added
since then for that reason.

>
> The second patch disables LSAN when clone with the arguments that are
> needed to stop the world fail.  This second patch should in theory go
> upstream but I am not going to that right now; plus maybe it should
> only disable it when used with asan instead of in general.

On my side, I run the tests with ASAN_OPTIONS=detect_leaks=0

>
> With these two patches, I get clean test results on aarch64-linux-gnu.
> I am mainly sending them here as I think they are useful for people
> who are doing testing; especially cross testing.

Indeed, thanks for sharing them.

Christophe

>
> Thanks,
> Andrew Pinski
diff mbox series

Patch

diff --git a/libsanitizer/sanitizer_common/sanitizer_flags.inc b/libsanitizer/sanitizer_common/sanitizer_flags.inc
index 065258a5a6e..9caf442b2d1 100644
--- a/libsanitizer/sanitizer_common/sanitizer_flags.inc
+++ b/libsanitizer/sanitizer_common/sanitizer_flags.inc
@@ -108,7 +108,7 @@  COMMON_FLAG(
     uptr, clear_shadow_mmap_threshold, 64 * 1024,
     "Large shadow regions are zero-filled using mmap(NORESERVE) instead of "
     "memset(). This is the threshold size in bytes.")
-COMMON_FLAG(const char *, color, "auto",
+COMMON_FLAG(const char *, color, "never",
             "Colorize reports: (always|never|auto).")
 COMMON_FLAG(
     bool, legacy_pthread_cond, false,