Blob Blame History Raw
From 71c74425b70a32cdedcde42925e5be6b62070aeb Mon Sep 17 00:00:00 2001
From: j-b-o <61712105+j-b-o@users.noreply.github.com>
Date: Mon, 24 Jan 2022 17:50:38 +0100
Subject: [PATCH] Remove tests depending on UB

---
 tests/unit/src/test_bout++.cxx | 29 -----------------------------
 1 file changed, 29 deletions(-)

diff --git a/tests/unit/src/test_bout++.cxx b/tests/unit/src/test_bout++.cxx
index 050901ddb8..1c895fffbc 100644
--- a/tests/unit/src/test_bout++.cxx
+++ b/tests/unit/src/test_bout++.cxx
@@ -6,7 +6,6 @@
 #include "utils.hxx"
 
 #include <algorithm>
-#include <csignal>
 #include <iostream>
 #include <string>
 #include <vector>
@@ -313,34 +312,6 @@ TEST_F(PrintStartupTest, CommandLineArguments) {
   }
 }
 
-#ifdef SIGHANDLE
-
-#ifdef BOUT_FPE
-#include <fenv.h>
-#endif
-
-class SignalHandlerTest : public ::testing::Test {
-public:
-  SignalHandlerTest() = default;
-  virtual ~SignalHandlerTest() {
-    std::signal(SIGUSR1, SIG_DFL);
-    std::signal(SIGFPE, SIG_DFL);
-    std::signal(SIGSEGV, SIG_DFL);
-#ifdef BOUT_FPE
-    std::signal(SIGFPE, SIG_DFL);
-    fedisableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
-#endif
-  }
-};
-
-using SignalHandlerTestDeathTest = SignalHandlerTest;
-
-TEST_F(SignalHandlerTestDeathTest, SegFault) {
-  bout::experimental::setupSignalHandler(bout::experimental::defaultSignalHandler);
-  // This test is *incredibly* expensive, maybe as much as 1s, so only test the one signal
-  EXPECT_DEATH(std::raise(SIGSEGV), "SEGMENTATION FAULT");
-}
-#endif
 
 TEST(BoutInitialiseFunctions, SetRunStartInfo) {
   WithQuietOutput quiet{output_info};