test_complex_file_got_info in cm.c fails with GLib 2.77.3 or 2.76.5
On telepathy-glib 0.24.2, $ make check
fails with GLib 2.77.3 or 2.76.5
(and above) like:
FAIL: test-cm
../../build-aux/test-driver: line 107: 22494 Aborted (core dumped) "$@" > $log_file 2>&1
Looking at tests/dbus/test-cm.log , this shows (with GLib 2.77.3):
304 # tp-glib/params-DEBUG: _tp_protocol_parse_manager_file: test_manager_file: reading protocol 'somewhat-pathological' from manager file
341 # tp-glib/params-DEBUG: _tp_protocol_parse_manager_file: Param name: escaped-semicolon
342 # tp-glib/params-DEBUG: _tp_protocol_parse_manager_file: Param flags: 0x0
343 # tp-glib/params-DEBUG: _tp_protocol_parse_manager_file: Param sig: s
344 # tp-glib/params-DEBUG: _tp_protocol_parse_manager_file: Param default value: NULL of type gchararray
- while with GLib 2.77.2:
304 # tp-glib/params-DEBUG: _tp_protocol_parse_manager_file: test_manager_file: reading protocol 'somewhat-pathological' from manager file
341 # tp-glib/params-DEBUG: _tp_protocol_parse_manager_file: Param name: escaped-semicolon
342 # tp-glib/params-DEBUG: _tp_protocol_parse_manager_file: Param flags: 0x4
343 # tp-glib/params-DEBUG: _tp_protocol_parse_manager_file: Param sig: s
344 # tp-glib/params-DEBUG: _tp_protocol_parse_manager_file: Param default value: "foo\\;bar" of type gchararray
This is perhaps because of the following change: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3555 (and the above is backported to 2.76.x branch: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3557 )
So tests/dbus/telepathy/managers/test_manager_file.manager
shows:
45 [Protocol somewhat-pathological]
82 # this is probably technically a Desktop Entry spec violation?
83 # we should be permissive, interpreting this as either "foo\;bar" or "foo;bar"
84 # seems reasonable
85 param-escaped-semicolon = s
86 default-escaped-semicolon = foo\;bar
With the above MR, the value of key "default-escaped-semicolon", which is
"foo;bar", is "no longer" accepted, and g_key_file_parse_value_as_string
(which is called from g_key_file_get_string
) returns NULL.
Note that it is found that even with GLib 2.77.2, with key value = "foo;bar";
g_key_file_parse_value_as_string
sets non-null GError,
and so g_key_file_get_string
sets non-null GError (if explicitly tries
to get GError), however with GLib 2.77.2, g_key_file_get_string
returns
non-null "result" (even if GError is set). With GLib 2.77.3, now
g_key_file_get_string
returns null "result".