RFR: 8348029: Make gtest death tests work with real crash signals

Matthias Baesken mbaesken at openjdk.org
Tue Jan 21 08:13:38 UTC 2025


On Sat, 18 Jan 2025 17:05:19 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Small change adds a new macro to the gtest TEST macro zoo: `TEST_VM_CRASH_SIGNAL`. This one is a companion to `TEST_VM_FATAL_ERROR_MSG` and `TEST_VM_ASSERT_MSG` and allows to write gtest that test expected crashes to happen. I will need that for a regression test for https://bugs.openjdk.org/browse/JDK-8330174 , among other things.
> 
> You use it like this:
> 
> 
> TEST_VM_CRASH_SIGNAL(Testtest, test, "SIGSEGV") {
>   ... do something that you expect should result in a specific crash ...
> }
> 
> Note that the string provided is platform dependent (signal names on Posix, SEH names on Windows).

Marked as reviewed by mbaesken (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/23191#pullrequestreview-2563757641


More information about the hotspot-dev mailing list