Skip attach tests on FreeBSD due to bug in GDB.
ClosedPublic

Authored by arrowd on Jul 30 2018, 12:54 PM.

Details

Summary

Despite successful attach GDB MI spits out a error message "Can't allocate registers". This gets caught by KDevMI layer and gets interpreted as error.
I've reported the problem to GDB upstream.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
arrowd created this revision.Jul 30 2018, 12:54 PM
Restricted Application added a project: KDevelop. · View Herald TranscriptJul 30 2018, 12:54 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
arrowd requested review of this revision.Jul 30 2018, 12:54 PM

Yay for work on getting the failed unit test count -> 0 :)

plugins/gdb/unittests/test_gdb.cpp
982

Please use QSKIP, so things are properly documented in the log.

990

Unrelated change?

1016

QSKIP

arrowd updated this revision to Diff 38776.Jul 30 2018, 1:36 PM
arrowd marked 3 inline comments as done.

Address comments.

arrowd added inline comments.Jul 30 2018, 1:37 PM
plugins/gdb/unittests/test_gdb.cpp
982

Was just following what SKIP_IF_ATTACH_FORBIDDEN(); does.

kossebau added inline comments.Jul 30 2018, 2:03 PM
plugins/gdb/unittests/test_gdb.cpp
982

... which though inside KDevMI::isAttachForbidden(...) calls QTest::qSkip(...) :)
Was also initially confused by the name of KDevMI::isAttachForbidden(...) but it is actually from the testhelper part. Someone(tm) should improve that for some explicit namespace or method name...

For the text, i would propose to be more explicit "GDB on FreeBSD produces an unexpected error message, on which KDevelop chokes") and perhaps leave the link to the bug report only as normal comment in the code, not sure how nice multi-line skip messages are in the output?

Please note the actual error directly in the sources, so one does not have to hunt for the commit message or open a browser to read the bug report.

Long nitpicking, let me give a short example how I personally would prefer it: :)

#ifdef Q_OS_FREEBSD
    // Despite successful attach GDB MI spits out a error message "Can't allocate registers". This gets caught by KDevMI layer and gets interpreted as error.
    // PR: https://sourceware.org/bugzilla/show_bug.cgi?id=23464
    QSKIP("GDB on FreeBSD produces an unexpected error message, on which KDevelop chokes");
#endif

That should serve the purpose of keeping the test log short. And allow any reader/editor of the code to directly see what the issue is. What do you think?

arrowd updated this revision to Diff 38782.Jul 30 2018, 2:10 PM
arrowd marked an inline comment as done.

Address comment.

kossebau accepted this revision.Aug 4 2018, 4:33 PM

If no-one else is commenting until upcoming Monday, please push it that day (or when you have time) :)

This revision is now accepted and ready to land.Aug 4 2018, 4:33 PM
This revision was automatically updated to reflect the committed changes.