summaryrefslogtreecommitdiffstats
path: root/src/tests/sbus_tests.c
Commit message (Collapse)AuthorAgeFilesLines
* SBUS: Add org.freedesktop.DBus.Properties.GetAll to IntrospectionJakub Hrozek2014-05-271-0/+4
| | | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* SBUS: Implement org.freedesktop.DBus.Properties.GetAll for primitive typesJakub Hrozek2014-05-271-0/+1
| | | | | | | | | | | | This patch implements the GetAll method of the org.freedesktop.DBus.Properties interface by iterating over the available getters and putting all the results into a single getter. The patch includes a unit test that exercies all currently supported array types. Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* SBUS: Add org.freedesktop.DBus.Properties.Get to IntrospectionJakub Hrozek2014-05-221-0/+7
| | | | | Reviewed-by: Stef Walter <stefw@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* SBUS: Add a convenience function sbus_error_newJakub Hrozek2014-05-131-0/+32
| | | | | | | | | Adds a convenience function that constructs a DBusError on top of a talloc context and as such can be used to mark an sbus request as failed without having to create a DBusError instance by the caller. Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Stef Walter <stefw@redhat.com>
* sbus_tests: fix missing invoker in initializerPavel Březina2014-04-191-0/+2
|
* SBUS: Generate introspection from the interface meta structureJakub Hrozek2014-04-151-0/+49
| | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/2234 This patch generates the introspection data from the sbus interface meta structure. The generated XML conforms to http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format The XML description of the interface also always includes the org.freedesktop.DBus.Introspectable interface, which this patch also allows in the policy settings.
* tests: Don't set the check fork mode explicitlyJakub Hrozek2014-04-101-1/+0
| | | | | | | Instead, let the user pick the fork mode with CK_FORK variable (see info check) Reviewed-by: Sumit Bose <sbose@redhat.com>
* sbus: Add the sbus_request_parse_or_finish() methodStef Walter2014-03-141-0/+99
| | | | | | | | | | | | | | | | | | | | | | Some DBus types returned from dbus_message_get_args() require memory to be released when done. We automatically attach these to the talloc struct sbus_request memory context in this function. This accepts varargs similar to dbus_message_get_args(), which are rather awkward. However instead of reworking them completely, future generated marshalling code will replace most uses of these varargs. If parsing the dbus message fails, then it responds to the DBus caller with an appropriate error such as o.f.D.Error.InvalidArgs. In these cases (ie: when it returns FALSE) the sbus_request is finished. Migrated some, but not all, uses of dbus_message_get_args() to the new function. Some instances have uncommon semantics such as terminating the connection upon failure to parse a message. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* sbus_tests: Add some testing of dispatch and handler codeStef Walter2014-03-141-0/+231
This starts a DBus server with some handlers, and runs some method calls against it. Note that we don't use the codegen in the sbus_tests, as we sorta want to test this non-codegen related functionality on its own before we run the sbus_codegen_tests. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>