glib/gio/tests
David Zeuthen 79d32c2fc1 GDBusMessage: Fix bug when deserializing a message
See https://bugzilla.gnome.org/show_bug.cgi?id=621838 for the whole
story. The problem was that we ended up reading data from arrays of
arrays when we were just supposed to be aligning the buffers.

Also add a host of debug infrastructure that was needed to find the
root cause. For now it can be turned on only via defining
DEBUG_SERIALIZER. In the future we might want to make it work via
G_DBUS_DEBUG. In a nutshell, the added debug info looks like this

Parsing blob (blob_len = 0x0084 bytes)
  0000: 6c 01 00 01  3c 00 00 00  41 00 00 00  37 00 00 00    l...<...A...7...
  0010: 08 01 67 00  08 61 61 79  61 7b 73 76  7d 00 00 00    ..g..aaya{sv}...
  0020: 01 01 6f 00  08 00 00 00  2f 66 6f 6f  2f 62 61 72    ..o...../foo/bar
  0030: 00 00 00 00  00 00 00 00  03 01 73 00  06 00 00 00    ..........s.....
  0040: 4d 65 6d 62  65 72 00 00  00 00 00 00  34 00 00 00    Member......4...
  0050: 03 00 00 00  63 77 64 00  01 73 00 00  23 00 00 00    ....cwd..s..#...
  0060: 2f 68 6f 6d  65 2f 64 61  76 69 64 7a  2f 48 61 63    /home/davidz/Hac
  0070: 6b 69 6e 67  2f 67 6c 69  62 2f 67 69  6f 2f 74 65    king/glib/gio/te
  0080: 73 74 73 00                                           sts.

Parsing headers (blob_len = 0x0084 bytes)
  Reading type a{yv} from offset 0x000c: array spans 0x0037 bytes
    Reading type {yv} from offset 0x0010
      Reading type y from offset 0x0010: 0x08 '
      Reading type v from offset 0x0011
        Reading type g from offset 0x0014: 'aaya{sv}'
    Reading type {yv} from offset 0x001e
      Reading type y from offset 0x0020: 0x01 ''
      Reading type v from offset 0x0021
        Reading type o from offset 0x0024: '/foo/bar'
    Reading type {yv} from offset 0x0031
      Reading type y from offset 0x0038: 0x03 ''
      Reading type v from offset 0x0039
        Reading type s from offset 0x003c: 'Member'
Parsing body (blob_len = 0x0084 bytes)
  Reading type (aaya{sv}) from offset 0x0047
    Reading type aay from offset 0x0048: array spans 0x0000 bytes
    Reading type a{sv} from offset 0x004c: array spans 0x0034 bytes
      Reading type {sv} from offset 0x0050
        Reading type s from offset 0x0050: 'cwd'
        Reading type v from offset 0x0058
          Reading type s from offset 0x005b: '/home/davidz/Hacking/glib/gio/tests'
OK

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-06-17 18:01:32 -04:00
..
schema-tests GSettings: enum/choices/aliases/range test cases 2010-06-17 00:03:44 -04:00
.gitignore GSettings: enum/choices/aliases/range test cases 2010-06-17 00:03:44 -04:00
appinfo-test.c Merge the wip/gapplication branch 2010-06-07 13:48:42 -04:00
appinfo-test.desktop Merge the wip/gapplication branch 2010-06-07 13:48:42 -04:00
appinfo.c Merge the wip/gapplication branch 2010-06-07 13:48:42 -04:00
application.c Rework GApplication API to use GInitable 2010-06-16 11:13:43 -04:00
async-close-output-stream.c Added test cases for g_output_stream_close_async 2010-05-12 09:21:12 +02:00
buffered-input-stream.c Add unit tests for some more methods 2009-12-08 17:05:09 +01:00
contexts.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
converter-stream.c Add a regression test for GConverterOutputStream corruption 2010-06-11 09:46:47 +02:00
data-input-stream.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
data-output-stream.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
de.po Merge GSettings tests 2010-04-17 01:48:05 -04:00
desktop-app-info.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
echo-server.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
enums.xml.template GSettings: major refactor. Add enums, range. 2010-06-16 18:17:53 -04:00
filter-cat.c Fix GZlibCompressorFormat names 2009-11-24 13:02:05 +01:00
filter-streams.c Fix warning 2010-06-09 10:32:36 +02:00
g-file-info.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
g-file.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
g-icon.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
gdbus-addresses.c More copyright year updates 2010-05-10 08:07:28 -04:00
gdbus-connection.c Bug 621213 – GDBusProxy and well-known names 2010-06-11 18:21:27 -04:00
gdbus-error.c More copyright year updates 2010-05-10 08:07:28 -04:00
gdbus-example-export.c remove the redundant interface_name parameter 2010-05-13 13:09:58 -04:00
gdbus-example-own-name.c Strip copyright headers from examples 2010-05-11 15:50:19 -04:00
gdbus-example-peer.c GDBusConnection.call(): add 'reply_type' argument 2010-05-24 17:00:04 -04:00
gdbus-example-proxy-subclass.c Bug 621213 – GDBusProxy and well-known names 2010-06-11 18:21:27 -04:00
gdbus-example-server.c Add missing gunixfdlist.h include in gdbus-example-server.c 2010-05-18 12:01:25 +10:00
gdbus-example-subtree.c Plug mem leaks in gdbus tests & examples 2010-05-15 00:12:18 +02:00
gdbus-example-unix-fd-client.c Clean up platform-specific includes 2010-05-13 20:29:04 -04:00
gdbus-example-watch-name.c Strip copyright headers from examples 2010-05-11 15:50:19 -04:00
gdbus-example-watch-proxy.c Bug 621213 – GDBusProxy and well-known names 2010-06-11 18:21:27 -04:00
gdbus-exit-on-close.c More copyright year updates 2010-05-10 08:07:28 -04:00
gdbus-export.c Bug 621213 – GDBusProxy and well-known names 2010-06-11 18:21:27 -04:00
gdbus-introspection.c Bug 621213 – GDBusProxy and well-known names 2010-06-11 18:21:27 -04:00
gdbus-names.c GDBusConnection.call(): add 'reply_type' argument 2010-05-24 17:00:04 -04:00
gdbus-peer.c Bug 621213 – GDBusProxy and well-known names 2010-06-11 18:21:27 -04:00
gdbus-proxy-well-known-name.c Bug 621213 – GDBusProxy and well-known names 2010-06-11 18:21:27 -04:00
gdbus-proxy.c Bug 621213 – GDBusProxy and well-known names 2010-06-11 18:21:27 -04:00
gdbus-serialization.c GDBusMessage: Fix bug when deserializing a message 2010-06-17 18:01:32 -04:00
gdbus-sessionbus.c More copyright year updates 2010-05-10 08:07:28 -04:00
gdbus-sessionbus.h Initial GDBus code-drop from GDBus-standalone repo 2010-05-06 14:21:32 -04:00
gdbus-tests.c GDBus: Add GDBusAuthObserver param in g_dbus_connection_new_for_address() 2010-05-13 16:32:11 -04:00
gdbus-tests.h Initial GDBus code-drop from GDBus-standalone repo 2010-05-06 14:21:32 -04:00
gdbus-testserver.py GDBus: Remove cached value if a property is invalidated 2010-05-14 12:56:09 -04:00
gdbus-threading.c Bug 621213 – GDBusProxy and well-known names 2010-06-11 18:21:27 -04:00
gschema-compile.c GSettings: enum/choices/aliases/range test cases 2010-06-17 00:03:44 -04:00
gsettings.c Bug 621266 - GSettings "context" clarification 2010-06-17 14:05:40 -04:00
httpd.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
live-g-file.c Don't fail a couple of tests when running as root 2010-02-22 19:54:38 +01:00
live-g-file.txt Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
Makefile.am Only run the schema compiler from the test cases 2010-06-17 14:33:50 -04:00
memory-input-stream.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
memory-output-stream.c Fix warnings 2010-06-09 10:32:12 +02:00
org.gtk.test.gschema Merge GSettings tests 2010-04-17 01:48:05 -04:00
org.gtk.test.gschema.xml GSettings: major refactor. Add enums, range. 2010-06-16 18:17:53 -04:00
readwrite.c Test for unexisting files in $TMP and not in $HOME 2010-02-23 18:37:39 +01:00
resolver.c Bug 591216 - Warning building resolver.o 2009-11-11 23:21:48 -05:00
send-data.c Fix leaks in GSocketClient and GThreadedResolver 2009-07-23 16:27:01 -04:00
simple-async-result.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
sleepy-stream.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
socket-client.c remove broken useless initialization in socket-client/socket-server 2010-05-07 19:08:13 -04:00
socket-common.c gio/tests/socket-client, socket-server: fix for win32 2010-04-23 12:24:30 -04:00
socket-server.c remove broken useless initialization in socket-client/socket-server 2010-05-07 19:08:13 -04:00
srvtarget.c Revert "Move gio tests from gio/tests/ to tests/gio/" 2009-07-05 22:49:24 -04:00
testapp.c Rework GApplication API to use GInitable 2010-06-16 11:13:43 -04:00
testapps.c Switch to using variants for timestamps, split out signals 2010-06-14 16:36:23 -04:00
testenum.h GSettings: major refactor. Add enums, range. 2010-06-16 18:17:53 -04:00
unix-fd.c GUnixSocketAddress: handle abstract sockets with non-0-padded names 2010-04-22 11:54:41 -04:00
unix-streams.c Fix compilation warning: Initialize the variable 2009-11-17 20:44:16 +01:00
win32-streams.c Add GWin32InputStream and GWin32OutputStream classes 2010-04-19 11:54:56 +03:00