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 755126 - testattributes fails when built with --disable-debug
testattributes fails when built with --disable-debug
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.37.x
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2015-09-16 17:22 UTC by Andreas Henriksson
Modified: 2015-10-04 03:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: testattributes needs assertions enabled (805 bytes, patch)
2015-09-28 01:24 UTC, Andreas Henriksson
committed Details | Review

Description Andreas Henriksson 2015-09-16 17:22:44 UTC
Building latest pango on Debian revealed this testcase problem:

FAIL: testattributes
====================

/attributes/basic: OK
/attributes/equal: OK
/attributes/list/basic: OK
/attributes/list/change: OK
/attributes/list/splice: OK
/attributes/list/filter: OK
/attributes/iter/basic: **
ERROR:/build/pango1.0-1.37.5/./tests/testattributes.c:392:test_iter: assertion failed (start == 10): (0 == 10)
FAIL testattributes (exit status: 134)


This failure occurs (only) when built with --disable-debug !!


Running gdb on debian/build/udeb/tests/.libs/lt-testattributes seems to indicate the _range, _next, _range calls made at
https://git.gnome.org/browse/pango/tree/tests/testattributes.c#n387
have been reordered into _next, _range, _range.
Comment 1 Andreas Henriksson 2015-09-28 01:24:21 UTC
Created attachment 312253 [details] [review]
tests: testattributes needs assertions enabled

This test failed when configured with --disable-debug since
assertions would get disabled. Don't allow disabling them
when building this tests as it relies on assertions.
Comment 2 Andreas Henriksson 2015-09-28 07:53:14 UTC
Hello Matthias Clasen.

Adding you to CC for this bug report because you seem to be the original author of the test ( https://git.gnome.org/browse/pango/commit/?id=b137e7b099a1 )

Could you please have a look and give me a thumbs up for ok to push my trivial patch?
Comment 3 Matthias Clasen 2015-09-28 12:37:59 UTC
A better fix would be to replace all instances of g_assert with g_assert_true.
Comment 4 Andreas Henriksson 2015-09-28 14:47:11 UTC
I was considering adding -UG_DISABLE_ASSERT to tests/Makefile.am which I think would avoid future problems more efficiently, but went for adding #undef in the source file to follow the already existing pattern used in other tests.

I'll look at making a new version.... Thanks for reviewing.