GNOME Bugzilla – Bug 646326
/gdbus/message-serialize-invalid test relies on a libdbus < 1.4.8 bug
Last modified: 2011-04-15 10:27:38 UTC
The /gdbus/message-serialize-invalid regression test relies on https://bugs.freedesktop.org/show_bug.cgi?id=16338 not having been fixed: it serializes invalid messages with libdbus, but we've changed this in git for dbus 1.4.8 and 1.5.0, so writing invalid UTF-8, invalid object paths or invalid signatures is now considered to be a programming error (fatal by default). I suggest that for the invalid-message case, you either: * serialize a valid message into a file, hack it with a hex-editor to get the desired error and check the resulting blobs into git/read them from the ${srcdir}, or * serialize a valid message into memory with libdbus (using a valid placeholder of the same length as the desired invalid string), replace the valid placeholder with the invalid string using memcmp/memcpy, and use the modified blob for testing
Created attachment 184799 [details] [review] /gdbus/message-serialize-invalid test: be compatible with D-Bus 1.4.8 Older versions of libdbus would let you construct an invalid DBusMessage, but that's a bug, which will be fixed in 1.4.8/1.5.0. Instead, construct a valid message of the same length, then replace substrings in the serialized blob with their invalid counterparts. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=646326
Pushed, thanks! http://git.gnome.org/browse/glib/commit/?id=c2387ddff164becd90654b459d8c6031c3656577
This should perhaps go to 2.28 too, since it'll break the regression tests with the latest stable libdbus (1.4.8 has now been released).
(In reply to comment #3) > This should perhaps go to 2.28 too, since it'll break the regression tests with > the latest stable libdbus (1.4.8 has now been released). Good point. Done.