[compiler-rt] Fix uncaught-exception.test. (PR #146181)
Qinkun Bao via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 18:59:34 PDT 2025
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/146181
>From e71cd4b13cd67d5145f351e5e8141a256c012e21 Mon Sep 17 00:00:00 2001
From: Qinkun Bao <qinkun at google.com>
Date: Sat, 28 Jun 2025 00:56:51 +0000
Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=
=?UTF-8?q?itial=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.6
---
compiler-rt/test/fuzzer/uncaught-exception.test | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/compiler-rt/test/fuzzer/uncaught-exception.test b/compiler-rt/test/fuzzer/uncaught-exception.test
index d1b98cfb7c74b..337267fc947ac 100644
--- a/compiler-rt/test/fuzzer/uncaught-exception.test
+++ b/compiler-rt/test/fuzzer/uncaught-exception.test
@@ -6,8 +6,6 @@ RUN: %cpp_compiler %S/UncaughtException.cpp -o %t-UncaughtException
# Clang will fail the test with 'deadly signal', but other compilers may fail with different error messages.
# For example, msvc fails with 'uncaught C++ exception'. So the error we check depends on the compiler target.
-RUN: not %run %t-UncaughtException 2>&1 | FileCheck %s --check-prefixes=CHECK-CRASH,%if target={{.*-windows-msvc.*}} %{CHECK-MSVC%} %else %{CHECK-ERROR%}
+RUN: not %run %t-UncaughtException 2>&1 | FileCheck %s
-CHECK-ERROR: ERROR: libFuzzer: deadly signal
-CHECK-MSVC: ERROR: libFuzzer: uncaught C++ exception
-CHECK-CRASH: Test unit written to ./crash
+CHECK: {{{{.*}}ERROR: libFuzzer: deadly signal|{{.*}}ERROR: libFuzzer: uncaught C++ exception}}
>From 9c9d73f3f7e4d894f781aa1e53226575fecbd615 Mon Sep 17 00:00:00 2001
From: Qinkun Bao <qinkun at google.com>
Date: Sat, 28 Jun 2025 01:03:12 +0000
Subject: [PATCH 2/4] Update tests
Created using spr 1.3.6
---
compiler-rt/test/fuzzer/uncaught-exception.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/test/fuzzer/uncaught-exception.test b/compiler-rt/test/fuzzer/uncaught-exception.test
index 337267fc947ac..177c354190696 100644
--- a/compiler-rt/test/fuzzer/uncaught-exception.test
+++ b/compiler-rt/test/fuzzer/uncaught-exception.test
@@ -8,4 +8,4 @@ RUN: %cpp_compiler %S/UncaughtException.cpp -o %t-UncaughtException
# For example, msvc fails with 'uncaught C++ exception'. So the error we check depends on the compiler target.
RUN: not %run %t-UncaughtException 2>&1 | FileCheck %s
-CHECK: {{{{.*}}ERROR: libFuzzer: deadly signal|{{.*}}ERROR: libFuzzer: uncaught C++ exception}}
+CHECK: {{=={{.*}}== ERROR: libFuzzer: deadly signal|=={{.*}}== ERROR: libFuzzer: uncaught C++ exception}}
>From e7de0f5c8f73081a8d4cfefc313df10dd4fdc5e2 Mon Sep 17 00:00:00 2001
From: Qinkun Bao <qinkun at google.com>
Date: Sat, 28 Jun 2025 01:13:45 +0000
Subject: [PATCH 3/4] Fix RE
Created using spr 1.3.6
---
compiler-rt/test/fuzzer/uncaught-exception.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/test/fuzzer/uncaught-exception.test b/compiler-rt/test/fuzzer/uncaught-exception.test
index 177c354190696..35e9f0e9d1741 100644
--- a/compiler-rt/test/fuzzer/uncaught-exception.test
+++ b/compiler-rt/test/fuzzer/uncaught-exception.test
@@ -8,4 +8,4 @@ RUN: %cpp_compiler %S/UncaughtException.cpp -o %t-UncaughtException
# For example, msvc fails with 'uncaught C++ exception'. So the error we check depends on the compiler target.
RUN: not %run %t-UncaughtException 2>&1 | FileCheck %s
-CHECK: {{=={{.*}}== ERROR: libFuzzer: deadly signal|=={{.*}}== ERROR: libFuzzer: uncaught C++ exception}}
+CHECK: {{==.*== ERROR: libFuzzer: deadly signal|==.*== ERROR: libFuzzer: uncaught C++ exception}}
>From 97db8d62f5677588dab4ef7e5173dd214ae95729 Mon Sep 17 00:00:00 2001
From: Qinkun Bao <qinkun at google.com>
Date: Sat, 28 Jun 2025 01:59:25 +0000
Subject: [PATCH 4/4] Address reviewers' feedback
Created using spr 1.3.6
---
compiler-rt/test/fuzzer/uncaught-exception.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/test/fuzzer/uncaught-exception.test b/compiler-rt/test/fuzzer/uncaught-exception.test
index 35e9f0e9d1741..984001056f1d5 100644
--- a/compiler-rt/test/fuzzer/uncaught-exception.test
+++ b/compiler-rt/test/fuzzer/uncaught-exception.test
@@ -8,4 +8,4 @@ RUN: %cpp_compiler %S/UncaughtException.cpp -o %t-UncaughtException
# For example, msvc fails with 'uncaught C++ exception'. So the error we check depends on the compiler target.
RUN: not %run %t-UncaughtException 2>&1 | FileCheck %s
-CHECK: {{==.*== ERROR: libFuzzer: deadly signal|==.*== ERROR: libFuzzer: uncaught C++ exception}}
+CHECK: ERROR: libFuzzer: {{deadly signal|uncaught C++ exception}}
More information about the llvm-commits
mailing list