summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcrashhandler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QTest::CrashHandler: split into Unix and Windows (1/2)Thiago Macieira2025-05-231-676/+0
| | | | | | | | | | | This file is convoluted and hard to read due to #if all over the place. Let's split the two very different implementations. This is the first commit, which just copies the files around without any changes, to help with Git history. Change-Id: I758dad7a07d927ccb61dfffd0199fb5e1e544c98 Reviewed-by: Edward Welbourne <[email protected]>
* QTest::CrashHandler: ask GDB for the memory mapping layout on crash tooThiago Macieira2025-05-191-0/+1
| | | | | | | | | | | | Processes usually crash due to invalid pointers, but sometimes it's hard to know if a given value is valid or not just by eyeballing it. So let's ask GDB to print it. I don't think LLDB has a way to do it. Pick-to: 6.9 Change-Id: I35e35bd3b79eeba49192fffd61474054cd089301 Reviewed-by: Edward Welbourne <[email protected]>
* Fix bad signal restoration which can cause infinite loopEric Beuque2025-02-191-2/+2
| | | | | | | | | | | | This fix the FatalSignalHandler destructor to restore properly the signal handler which cause an infinite loop when a signal is emitted like SIGABRT or SIGINT and when we are using two QTest object in same program. Fixes: QTBUG-132121 Pick-to: 6.9 6.8 6.5 Change-Id: Ie9476e1ff9c0f29c3e35ae6dff565fab4a77ba86 Reviewed-by: Thiago Macieira <[email protected]>
* Testlib: wrap cycle_p.h headerGiuseppe D'Angelo2025-01-181-1/+1
| | | | | | | | | | | | | The header triggers compile warnings -- -Wundef, to begin with. Since it's included from multiple places, we either fix the header or wrap it. The header isn't maintained upstream (we actually keep patches "on the side"), so I'll go with the wrapping option, and suppress -Wundef in there. Task-number: QTBUG-132900 Change-Id: I8fdd32fa2ec1cde83ef28945259bce836439f73f Reviewed-by: Thiago Macieira <[email protected]>
* macOS: Completely disable lldb backtraces in QtTestLib on Apple SiliconTor Arne Vestbø2025-01-081-1/+7
| | | | | | | | | | | They result in lldb hanging, which was previously only a case when SIP was enabled, but can now be reproduced on macOS 15 even with SIP disabled. https://github.com/llvm/llvm-project/issues/53254 Pick-to: 6.9 6.8 Change-Id: Ifa09f8cf22522b5a1028db1f250ebe9e1543cf9d Reviewed-by: Timur Pocheptsov <[email protected]>
* Mark max length work buffers uninitializedAllan Sandfeld Jensen2024-11-301-1/+1
| | | | | | | | | Otherwise the hardening with initializing all buffers causes serious performance regressions Pick-to: 6.8 Change-Id: I3f7a0b7f0e0d08644b1dbb520cf1f6d5e052b270 Reviewed-by: Thiago Macieira <[email protected]>
* QTest::CrashHandler: allow debugging crashed tests on Linux+YAMAThiago Macieira2024-09-251-0/+6
| | | | | | | | | | | | | The YAMA LSM by default[1] prevents attaching the debugger to any process that isn't a child. Since our backtracer comes from a child process instead (i.e., tracing the parent), we must grant explicit permission. This also makes QTEST_PAUSE_ON_CRASH=1 work. [1] https://codebrowser.dev/linux/linux/security/yama/yama_lsm.c.html#ptrace_scope Pick-to: 6.8 Change-Id: Ic19d84a7a730c7f8fc0ffffd64e516447e4b1f35 Reviewed-by: Mitch Curtis <[email protected]>
* QTest: move crash-handling code out into qtestcrashhandler_p.hMitch Curtis2024-04-041-0/+663
In preparation for reusing it in Qt Quick, which currently doesn't print backtraces upon crashes. Task-number: QTQAINFRA-6146 Change-Id: Ib0384f514b348a398f53529ff3bcc7d4ac2daba7 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>