From 6ffd938f98781b6bd2ddec0af4a514abc6d2cab7 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Thu, 19 May 2022 12:17:46 -0700 Subject: 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. --- Source/UnitTests/Core/PageFaultTest.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Source/UnitTests/Core/PageFaultTest.cpp') 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); -- cgit v1.2.3