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 710092 - tracker-dbus tests depends on having G_MESSAGES_DEBUG set
tracker-dbus tests depends on having G_MESSAGES_DEBUG set
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
Depends on:
Blocks:
 
 
Reported: 2013-10-14 11:29 UTC by Aleksander Morgado
Modified: 2013-10-14 13:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (6.61 KB, patch)
2013-10-14 11:31 UTC, Aleksander Morgado
committed Details | Review

Description Aleksander Morgado 2013-10-14 11:29:39 UTC
$ cd tests/libtracker-common
$ ./tracker-dbus
        /libtracker-common/tracker-dbus/slist_to_strv_ok: OK
        /libtracker-common/tracker-dbus/request: **
        Tracker:ERROR:tracker-dbus-test.c:131:test_dbus_request: stdout of child process (12948) failed to match: *TestNewOK*
        Aborted (core dumped)
    
$ G_MESSAGES_DEBUG=all ./tracker-dbus
        /libtracker-common/tracker-dbus/slist_to_strv_ok: OK
        /libtracker-common/tracker-dbus/request: Tracker-DEBUG: <--- [1|0] Test request (--TestNewOK--))
        OK
        /libtracker-common/tracker-dbus/request_failed: Tracker-DEBUG: <--- [2|0] test_dbus_request_failed()
        OK

By default, g_debug() messages don't go to stdout, unless requested with G_MESSAGES_DEBUG.

Patch following.
Comment 1 Aleksander Morgado 2013-10-14 11:31:33 UTC
Created attachment 257244 [details] [review]
Patch

Setup a default log handler for every forked child. I find this cleaner than setting up one for the parent process, as then we would have debug logs from the parent being dumped.
Comment 2 Martyn Russell 2013-10-14 13:11:49 UTC
Comment on attachment 257244 [details] [review]
Patch

Thanks for the patch Aleksander, will help a lot!