diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-05-03 20:05:49 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-06-28 00:39:35 +0000 |
commit | 5e67e7efaa2669252fd8c55392b7bc35b72c6079 (patch) | |
tree | 3009e897ea69d3cf774e21fcb761c2bb846e915b /tests | |
parent | 68a1f9582b38b30add7c061caae1fd8acb356da9 (diff) |
FatalSignalHandler: print some more information from siginfo_t
The siginfo_t parameter allows us to show what process sent a signal or
the crashing address. Additionally, it allows us to determine if the
crashing signal was indeed sent due to a crash.
The selftest tst_crashes produces now:
$ QTEST_DISABLE_STACK_DUMP=1 ./crashes
********* Start testing of tst_Crashes *********
Config: Using QtTest library 6.4.0, Qt 6.4.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 11.2.1 20220420 [revision 691af15031e00227ba6d5935c1d737026cda4129]), opensuse-tumbleweed 20220428
PASS : tst_Crashes::initTestCase()
Received signal 11 (SIGSEGV), code 1, for address 0x0000000000000004
Function time: 0ms, total time: 0ms
[1] 201995 segmentation fault (core dumped) QTEST_DISABLE_STACK_DUMP=1 ./crashes
The last line comes from the shell. The code isn't decoded, but on Linux
it's a SEGV_MAPERR. macOS prints exactly the same thing.
I've updated one of the expected_crashes_*.txt output that doesn't seem
possible (the "Received a fatal error" message does not appear in Qt
anywhere).
Pick-to: 6.4
Change-Id: I5ff8e16fcdcb4ffd9ab6fffd16ebc8391234f0e2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/testlib/selftests/expected_crashes_3.txt | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/auto/testlib/selftests/expected_crashes_3.txt b/tests/auto/testlib/selftests/expected_crashes_3.txt index c32ea53675..b0d69009d1 100644 --- a/tests/auto/testlib/selftests/expected_crashes_3.txt +++ b/tests/auto/testlib/selftests/expected_crashes_3.txt @@ -1,8 +1,5 @@ ********* Start testing of tst_Crashes ********* Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Crashes::initTestCase() -QFATAL : tst_Crashes::crash() Received signal 11 - Function time: ms Total time: ms -FAIL! : tst_Crashes::crash() Received a fatal error. -Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted -********* Finished testing of tst_Crashes ********* +Received signal 11 (SIGSEGV), code 1, for address 0x0000000000000004 + Function time: ms, total time: ms |