Commit Graph

2 Commits (5b697bb08c8e16dcaac428f17b4d95efd7862d07)

Author SHA1 Message Date
Thiago Macieira 5b697bb08c QTest::CrashHandler: allow debugging crashed tests on Linux+YAMA
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

Change-Id: Ic19d84a7a730c7f8fc0ffffd64e516447e4b1f35
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 731b1159f9da9d0a5f9871ceaef4b82b657b130c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-25 18:15:44 +00:00
Mitch Curtis c0014becca QTest: move crash-handling code out into qtestcrashhandler_p.h
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 <qt_ci_bot@qt-project.org>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-04-04 14:08:57 +08:00