GNOME Bugzilla – Bug 404631
[check] print stack trace on segfault in unit tests
Last modified: 2015-03-17 15:17:52 UTC
Today there was a spurious unit test crash on one of the build bots, which turned out not to be reproducable. It would be nice if in cases like that we could print a stack trace automatically, so the build bot log gives us at least a hint as to what might have caused the crash. Attaching proposed patch. Works fine for me.
Created attachment 81937 [details] [review] patch, prints a stack trace when a unit test crashes (if supported)
Obviously no interest, closing (also it doesn't print the very last frame, so it's not quite as useful as it looks).
Created attachment 299605 [details] [review] Re-base of patch to gst-1.5 Rebase of the patch to gstreamer 1.5. Ignore the gst-indent cruft at the end of the patch. Wasn't worth fighting git for a "won't fix" ticket. Shame there wasn't much interest in the patch, it's certainly helping me try to find why my check is seg-faulting!
It might be worth reconsidering this patch, it might be useful when run on build bots (once the buildbots actually show the info output by the tests and not just the failure). If you're trying to debug a crash in a unit test, you'd typically do: tests/check $ make foo/bar.gdb or tests/check $ make foo/bar.valgrind