summaryrefslogtreecommitdiff
path: root/test/dbus-daemon-eavesdrop.c
Commit message (Collapse)AuthorAgeFilesLines
* tests: Detach most connections from main loop before closingSimon McVittie2018-08-021-0/+4
| | | | | | | | | We don't need to do this for connections that were never set up with the main loop. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194
* tests: Call dbus_shutdown()Simon McVittie2018-08-021-1/+5
| | | | | | | | | | Not all of these tests will be fully valgrind-clean yet (or perhaps ever), but it's easier to add this to all of them than to think about it. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194
* tests: Consistently don't try to kill pid 0Simon McVittie2017-02-211-2/+6
| | | | | | | | | daemon_pid will still be 0 if any tests were skipped. In particular this happens during `make installcheck`. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99825 Reviewed-by: Philip Withnall <withnall@endlessm.com> Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* test_get_dbus_daemon: Take a custom XDG_RUNTIME_DIR as an argumentSimon McVittie2017-02-201-1/+1
| | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99825 Reviewed-by: Philip Withnall <withnall@endlessm.com> Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* test: Add some OOM paths to the dbus-daemon-eavesdrop pathPhilip Withnall2017-02-131-8/+12
| | | | | | | | | | | This will shut Coverity up. All the paths are checks on the return value from dbus_message_set_destination(). Coverity IDs: 54822, 54823, 54824, 54825 Signed-off-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99712 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Add a common test_init() for GLib tests which prevents hanging foreverSimon McVittie2015-02-041-2/+1
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
* Add infrastructure to run bits of tests under an alternative uidSimon McVittie2015-02-031-1/+1
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810 Reviewed-by: Philip Withnall
* Factor out some utility functions from test/dbus-daemon*Simon McVittie2015-02-031-156/+13
| | | | | | | | | | | In the process, make test_kill_pid() safer: do not try to terminate more than one pid, or the NULL handle. Also stop leaking the address_fd in spawn_dbus_daemon, a pre-existing bug that was spotted by Philip Withnall during review. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810 Reviewed-by: Philip Withnall
* Handle 0x0d0a EOLs in spawn_dbus_daemon()Руслан Ижбулатов2014-04-301-0/+2
| | | | | | | | On W32 dbus daemon will print output in text mode, with 0x0d0a EOLs instead of just 0x0a. Be able to handle that. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75863 Reviewed-by: Simon McVittie
* test/dbus-daemon, test/dbus-daemon-eavesdrop: allow external dbus-daemonSimon McVittie2014-01-071-1/+8
| | | | | | | | | | It's easier to automate these tests if they launch their own dbus-daemon, but easier to debug them if they don't: you can launch a dbus-daemon separately, under gdb. However, tests that need a specially-configured dbus-daemon will have to be skipped. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Tests: allow dbus-glib to be replaced with use of libdbus-internalSimon McVittie2013-09-031-10/+17
| | | | | | | | | | | | | | | | | | | | | | We only use dbus-glib for its main loop; within dbus, DBusLoop is available as an alternative, although it isn't thread-safe and isn't public API. For tests that otherwise only use libdbus public API, it's desirable to be able to avoid DBusLoop, so we can run them against an installed libdbus as an integration test. However, if we don't have dbus-glib, we're going to have to use an in-tree main loop, which might as well be DBusLoop. The major disadvantage of using dbus-glib is that it isn't safe to link both dbus-1 and dbus-internal at the same time. This is awkward for a future test case that wants to use _dbus_getsid() in dbus-daemon.c, but only on Windows (fd.o #54445). If we use the same API wrapper around both dbus-glib and DBusLoop, we can compile that test against dbus-glib or against DBusLoop, depending on the platform. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Remove more never-used variablesSimon McVittie2011-09-191-4/+0
|
* dbus-daemon-eavesdrop test: apply the same Windows fixes as dbus-daemon testSimon McVittie2011-08-121-2/+3
| | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40003
* Add testsuite for eavesdrop=true DBusMatchRuleCosimo Alfarano2011-07-141-0/+558
[with some typos fixed during commit -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37890 Bug-NB: NB#269748