RFR: 8348029: Make gtest death tests work with real crash signals
Thomas Stuefe
stuefe at openjdk.org
Sun Jan 19 07:55:07 UTC 2025
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).
-------------
Commit messages:
- start
Changes: https://git.openjdk.org/jdk/pull/23191/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23191&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8348029
Stats: 26 lines in 2 files changed: 24 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/23191.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23191/head:pull/23191
PR: https://git.openjdk.org/jdk/pull/23191
More information about the hotspot-dev
mailing list