From f20edffcc8089fe573e03bd5e092dafc9b0ce568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 23 May 2021 18:31:29 +0200 Subject: [PATCH] testlib: Disable automatic backtrace when test crashes on macOS on ARM The trick we use by spawning lldb to print the backtrace doesn't work for some reason, and just results in: Process 91619 stopped * thread #1, stop reason = signal SIGSTOP frame #0: 0xffffffffffffffff Target 0: (No executable module.) stopped. Architecture set to: . (lldb) bt all * thread #1, stop reason = signal SIGSTOP frame #0: 0xffffffffffffffff thread #2 frame #0: 0xffffffffffffffff thread #3 frame #0: 0xffffffffffffffff thread #4 frame #0: 0xffffffffffffffff Debugging the stopped process manually with lldb works fine. Change-Id: If5582803a11f1c5c84c31b42d1ae52bdd245bbbb Reviewed-by: Alexandru Croitor --- src/testlib/qtestcase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index fbb73d5e483..daaa1bc390b 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -213,7 +213,7 @@ static void stackTrace() if (debuggerPresent() || hasSystemCrashReporter()) return; -#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS) +#if defined(Q_OS_LINUX) || (defined(Q_OS_MACOS) && !defined(Q_PROCESSOR_ARM_64)) const int msecsFunctionTime = qRound(QTestLog::msecsFunctionTime()); const int msecsTotalTime = qRound(QTestLog::msecsTotalTime()); fprintf(stderr, "\n=== Received signal at function time: %dms, total time: %dms, dumping stack ===\n",