After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 662491 - Test failure with clang
Test failure with clang
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-10-23 00:21 UTC by Elias Pipping
Modified: 2011-10-24 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (875 bytes, patch)
2011-10-23 00:21 UTC, Elias Pipping
accepted-commit_now Details | Review
Fix 'make check' with clang (1.39 KB, patch)
2011-10-24 17:44 UTC, Matthias Clasen
committed Details | Review

Description Elias Pipping 2011-10-23 00:21:08 UTC
Created attachment 199741 [details] [review]
fix

When compiled with clang, glib fails a test:

Test failed: does not print assertion message
FAIL: run-assert-msg-test.sh

The test shouldn't fail. It assumes that an assertion failure leads to a message like

[..]assert-msg-test.c:5:main: assertion failed: (42 < 0)

since that is what gcc does. When clang is used, the full signature of main() is printed, though, thus "int main()" instead of just "main".

I'm attaching a patch that relaxes the check a bit and makes it pass with clang.
Comment 1 Matthias Clasen 2011-10-23 04:21:40 UTC
Review of attachment 199741 [details] [review]:

Sure, looks fine
Comment 2 Matthias Clasen 2011-10-24 17:44:16 UTC
The following fix has been pushed:
94a46ea Fix 'make check' with clang
Comment 3 Matthias Clasen 2011-10-24 17:44:18 UTC
Created attachment 199852 [details] [review]
Fix 'make check' with clang

Patch by Elias Pipping