[compiler-rt] [libFuzzer] Change sig-trap test to allow expected output strings in any order (PR #157407)

Dan Blackwell via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 8 02:08:38 PDT 2025


https://github.com/DanBlackwell created https://github.com/llvm/llvm-project/pull/157407

I have seen some flakiness in this test where the 2 checked strings appear in a different order. Due to buffering of writes, and that one of these strings is written during the signal handler, I think this is valid. This PR relaxes the test to allow those strings to appear in either order.

>From 497acb5a4346659534552e2bf552b8fa47d38606 Mon Sep 17 00:00:00 2001
From: Dan Blackwell <dan_blackwell at apple.com>
Date: Mon, 8 Sep 2025 10:02:27 +0100
Subject: [PATCH] [libFuzzer] Change sig-trap test to allow expected output
 strings in any order

---
 compiler-rt/test/fuzzer/sig-trap.test | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler-rt/test/fuzzer/sig-trap.test b/compiler-rt/test/fuzzer/sig-trap.test
index 30d9d47f4d81f..60208c486a87a 100644
--- a/compiler-rt/test/fuzzer/sig-trap.test
+++ b/compiler-rt/test/fuzzer/sig-trap.test
@@ -5,7 +5,7 @@ UNSUPPORTED: target={{.*windows.*}}
 RUN: %cpp_compiler %S/SigTrapTest.cpp -o %t
 
 RUN: not %run %t            2>&1 | FileCheck %s
-CHECK: BINGO
-CHECK: ERROR: libFuzzer: deadly signal
+CHECK-DAG: BINGO
+CHECK-DAG: ERROR: libFuzzer: deadly signal
 
 RUN: trap "%run %t -handle_trap=0" TRAP



More information about the llvm-commits mailing list