]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
marshal-validate: run all the tests instead of just the even ones
authorNick Lewycky <nlewycky@google.com>
Thu, 28 Jan 2016 20:24:56 +0000 (12:24 -0800)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 8 Feb 2016 17:43:50 +0000 (17:43 +0000)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93908
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
[smcv: Re-enable the failing test that Nick disabled, and fix the
expected result; the result given by our current implementation is
reasonable.]

dbus/dbus-marshal-validate-util.c

index 2880a4d983c8e7de197ff6e77c31cc87c32bbd61..e11e1ace1a8b8cd485c0834bd90a528b79df5c37 100644 (file)
@@ -61,8 +61,6 @@ run_validity_tests (const ValidityTest *tests,
                       v, tests[i].data);
           _dbus_assert_not_reached ("test failed");
         }
-
-      ++i;
     }
 }
 
@@ -83,7 +81,7 @@ static const ValidityTest signature_tests[] = {
     DBUS_INVALID_EXCEEDED_MAXIMUM_STRUCT_RECURSION },
   { ")", DBUS_INVALID_STRUCT_ENDED_BUT_NOT_STARTED },
   { "i)", DBUS_INVALID_STRUCT_ENDED_BUT_NOT_STARTED },
-  { "a)", DBUS_INVALID_STRUCT_ENDED_BUT_NOT_STARTED },
+  { "a)", DBUS_INVALID_MISSING_ARRAY_ELEMENT_TYPE },
   { "(", DBUS_INVALID_STRUCT_STARTED_BUT_NOT_ENDED },
   { "(i", DBUS_INVALID_STRUCT_STARTED_BUT_NOT_ENDED },
   { "(iiiii", DBUS_INVALID_STRUCT_STARTED_BUT_NOT_ENDED },