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 670218 - Do not fail unit test due to gdb abbreviating strings
Do not fail unit test due to gdb abbreviating strings
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-02-16 14:06 UTC by Peter Kjellerstedt
Modified: 2012-02-19 00:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow gdb to print unlimited strings (1.39 KB, patch)
2012-02-16 14:07 UTC, Peter Kjellerstedt
committed Details | Review

Description Peter Kjellerstedt 2012-02-16 14:06:22 UTC
gdb by default will only print strings up to 200 characters. After that
it abbreviates them. This affects the run-assert-msg-test.sh script if
the path to the glib installation is too long (in our case it was 133
characters, 132 would still have worked...)

By having gdb execute "set print elements 0" before printing the assert
string, the limit on maximum number of characters to print is set to
unlimited.

I tested this with glib 2.28.8 but as the run-assert-msg-test.sh script has looked more or less the same since its introduction this problem should be present in all versions of glib.
Comment 1 Peter Kjellerstedt 2012-02-16 14:07:32 UTC
Created attachment 207775 [details] [review]
Allow gdb to print unlimited strings
Comment 2 Colin Walters 2012-02-16 16:31:39 UTC
Review of attachment 207775 [details] [review]:

Sure.
Comment 3 Colin Walters 2012-02-16 16:31:57 UTC
Do you have commit access, Peter?
Comment 4 Peter Kjellerstedt 2012-02-17 09:35:21 UTC
Not that I know...
Comment 5 Peter Kjellerstedt 2012-02-17 19:54:37 UTC
Will it be backported to 2.28 (the version we use) and 2.30 "automatically", or do I have to poke someone for that to happen?
Comment 6 Colin Walters 2012-02-19 00:23:20 UTC
(In reply to comment #5)
> Will it be backported to 2.28 (the version we use) and 2.30 "automatically", or
> do I have to poke someone for that to happen?

I'm not aware of a documented process, but I've just gone ahead and pushed it to glib-2-28 and glib-2-30.