diff options
| author | Dentomologist <dentomologist@gmail.com> | 2022-05-19 12:17:46 -0700 |
|---|---|---|
| committer | Dentomologist <dentomologist@gmail.com> | 2022-05-19 12:26:41 -0700 |
| commit | 6ffd938f98781b6bd2ddec0af4a514abc6d2cab7 (patch) | |
| tree | 509d9cb966545f2851e5a5ea2725eac21655c497 /Source/UnitTests/Core/PageFaultTest.cpp | |
| parent | 62601663e578bcd0b981e134c84fbc9d37850a15 (diff) | |
UnitTests: Skip PageFaultTest if exception handlers are not supported
Page faults should only occur on architectures that support exception
handlers, so skip the test on other architectures to avoid spurious test
failures.
Diffstat (limited to 'Source/UnitTests/Core/PageFaultTest.cpp')
| -rw-r--r-- | Source/UnitTests/Core/PageFaultTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/UnitTests/Core/PageFaultTest.cpp b/Source/UnitTests/Core/PageFaultTest.cpp index 841ba54609..e340ca7646 100644 --- a/Source/UnitTests/Core/PageFaultTest.cpp +++ b/Source/UnitTests/Core/PageFaultTest.cpp @@ -61,6 +61,11 @@ static void ASAN_DISABLE perform_invalid_access(void* data) TEST(PageFault, PageFault) { + if (!EMM::IsExceptionHandlerSupported()) + { + // TODO: Use GTEST_SKIP() instead when GTest is updated to 1.10+ + return; + } EMM::InstallExceptionHandler(); void* data = Common::AllocateMemoryPages(PAGE_GRAN); EXPECT_NE(data, nullptr); |
