From f89ea1685e114b881207819bbc6fe838f9b3931b Mon Sep 17 00:00:00 2001 From: Artur Harasimiuk Date: Mon, 18 Jul 2022 21:24:13 +0000 Subject: [PATCH] ocloc tests: handle SIGSEGV and SIGABRT Signed-off-by: Artur Harasimiuk --- opencl/test/unit_test/offline_compiler/main.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/opencl/test/unit_test/offline_compiler/main.cpp b/opencl/test/unit_test/offline_compiler/main.cpp index 5273a92201..fcfa51677b 100644 --- a/opencl/test/unit_test/offline_compiler/main.cpp +++ b/opencl/test/unit_test/offline_compiler/main.cpp @@ -41,7 +41,9 @@ std::string getRunPath() { int main(int argc, char **argv) { int retVal = 0; bool useDefaultListener = false; + bool enableAbrt = true; bool enableAlarm = true; + bool enableSegv = true; bool showTestStats = false; bool dumpTestStats = false; std::string dumpTestStatsFileName = ""; @@ -149,8 +151,19 @@ int main(int argc, char **argv) { gEnvironment = reinterpret_cast(::testing::AddGlobalTestEnvironment(new Environment(devicePrefix, familyNameWithType))); int sigOut = setAlarm(enableAlarm); - if (sigOut != 0) + if (sigOut != 0) { return sigOut; + } + + sigOut = setSegv(enableSegv); + if (sigOut != 0) { + return sigOut; + } + + sigOut = setAbrt(enableAbrt); + if (sigOut != 0) { + return sigOut; + } retVal = RUN_ALL_TESTS();