summaryrefslogtreecommitdiff
path: root/test/data
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-03-02 17:34:30 +0000
committerHavoc Pennington <hp@redhat.com>2003-03-02 17:34:30 +0000
commitf7d96bdf80129d95cf33f26a778ce2c94a818bd0 (patch)
treef1df8da8c12b134a5ab5e06eab9951394754b69b /test/data
parent7584a7bdccc6c7cf9f3d11c315f088794729b7e4 (diff)
downloaddbus-f7d96bdf80129d95cf33f26a778ce2c94a818bd0.tar.gz
2003-03-02 Havoc Pennington <hp@pobox.com>
* test/break-loader.c (randomly_set_extreme_ints): add test that sets really huge and small integers * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check that length of boolean array fits in the string, and that string has room for boolean value in single-bool case. * dbus/dbus-message-builder.c (_dbus_message_data_load): add optional value to "ALIGN" command which is what to fill the alignment with. * test/data/valid-messages/no-padding.message: add regression test for the message padding problem
Diffstat (limited to 'test/data')
-rw-r--r--test/data/invalid-messages/boolean-array-length-too-long.message-rawbin0 -> 27 bytes
-rw-r--r--test/data/invalid-messages/boolean-has-no-value.message-rawbin0 -> 102 bytes
-rw-r--r--test/data/valid-messages/no-padding.message19
3 files changed, 19 insertions, 0 deletions
diff --git a/test/data/invalid-messages/boolean-array-length-too-long.message-raw b/test/data/invalid-messages/boolean-array-length-too-long.message-raw
new file mode 100644
index 00000000..2326ec9d
--- /dev/null
+++ b/test/data/invalid-messages/boolean-array-length-too-long.message-raw
Binary files differ
diff --git a/test/data/invalid-messages/boolean-has-no-value.message-raw b/test/data/invalid-messages/boolean-has-no-value.message-raw
new file mode 100644
index 00000000..cba9e839
--- /dev/null
+++ b/test/data/invalid-messages/boolean-has-no-value.message-raw
Binary files differ
diff --git a/test/data/valid-messages/no-padding.message b/test/data/valid-messages/no-padding.message
new file mode 100644
index 00000000..c21c84d3
--- /dev/null
+++ b/test/data/valid-messages/no-padding.message
@@ -0,0 +1,19 @@
+## Message with no header padding
+
+## VALID_HEADER includes a LENGTH Header and LENGTH Body
+VALID_HEADER
+
+## this byte array is filled with zeros to the natural length
+## of the header
+FIELD_NAME unkn
+TYPE BYTE_ARRAY
+ALIGN 4
+LENGTH ThisByteArray
+START_LENGTH ThisByteArray
+BYTE 1
+ALIGN 8 1
+END_LENGTH ThisByteArray
+
+END_LENGTH Header
+START_LENGTH Body
+END_LENGTH Body