RFR: 8348029: Make gtest death tests work with real crash signals
Thomas Stuefe
stuefe at openjdk.org
Tue Jan 21 14:48:41 UTC 2025
On Tue, 21 Jan 2025 08:11:05 GMT, Matthias Baesken <mbaesken 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).
Thanks @MBaesken and @SoniaZaldana
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23191#issuecomment-2604932638
More information about the hotspot-dev
mailing list