summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2011-05-25Check for X even if X11 autolaunching is disabledSimon McVittie1-1/+1
DBUS_ENABLE_X11_AUTOLAUNCH obviously requires DBUS_BUILD_X11. However, the converse is not true. If DBUS_BUILD_X11 is defined, dbus-launch will be able to connect to the X server to determine when the session ends; most distributors will want this, but it can be disabled with the standard Autoconf option --without-x. If DBUS_ENABLE_X11_AUTOLAUNCH is *also* defined, dbus-launch and libdbus will be willing to perform autolaunch. Again, most distributors will want this, but it can be disabled with --disable-x11-autolaunch. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997 Reviewed-by: Colin Walters <walters@verbum.org>
2011-05-25test-autolaunch: don't expect autolaunching to work if X11 is disabledSimon McVittie1-0/+19
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997 Reviewed-by: Colin Walters <walters@verbum.org>
2011-03-14Revert merge of master (dbus-1.5) into dbus-1.4Simon McVittie1-1/+1
This reverts commits d1d395774435..09c9d6406b75f, keeping Lennart's addition of UnknownInterface etc.
2011-03-10Make dbus_type_is_valid into public APISimon McVittie1-1/+1
This is just as useful for bindings as dbus_signature_validate, and I think it's a good design principle to say that anything checked in a _dbus_return_if_fail should be something the caller could check for themselves. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=20496 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-02-17Import compiler.m4 and lcov.am from telepathy-glib, and use them to replace gcovSimon McVittie2-2665/+1
Reviewed-by: Colin Walters <walters@verbum.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=10887
2011-02-02Merge branch 'dist-30285' into dbus-1.4Simon McVittie1-2/+11
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-02-02Merge branch 'serverdata-33277' into dbus-1.4Simon McVittie2-14/+72
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-02-01Don't distribute generated files that embed our builddirSimon McVittie1-2/+11
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=30285
2011-01-25test/name-test: remove dangling references to test-names.c, which is absentSimon McVittie1-6/+0
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-01-21test-privserver-client: wait for server to die between iterationsSimon McVittie1-14/+66
This fixes a race condition: the server exits while the client continues to the next iteration. If the server wins, the test passes. If the client wins, it sends a message to the dying service, never gets a reply, and the test fails. My branch to refactor the main loop for fd.o #23194 seems to make the client more likely to win this race, resulting in intermittent test failures. This is an instance of the general problem described by fd.o #11454.
2011-01-21test_server_shutdown: disconnect the server before causing it to be freedSimon McVittie1-0/+2
Otherwise we die with an assertion failure. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33277
2011-01-21test_server_setup: allocate two server-data blobs, for watches and timeoutsSimon McVittie1-0/+4
This is similar to how ConnectionData works. Without this change, we deserve to segfault: when the first set of callbacks (either watches or timeouts) is cleaned up, we unref the server and loop, and free sd; when the second set of callbacks is cleaned up, we use-after-free sd, the server and the loop, then double-free sd. However, due to fd.o #33277 we don't even get that far, because we've already died with an assertion failure. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33277
2011-01-21test_server_setup: on OOM while setting up watch/timeout, don't leak sdSimon McVittie1-2/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33128 Reviwed-by: Colin Walters <walters@verbum.org>
2011-01-06Add autolaunch test to .gitignoreSimon McVittie1-0/+1
2010-12-17policy tests: Use bin rather than nogroup, wheel, or rootWill Thompson1-2/+2
This group seems to exist on all of Debian, Fedora and Mac OS X. (I mistakenly believed that nogroup exists on Fedora.)
2010-12-15Revert "test-autolaunch is only known to work in launchd environments."Will Thompson1-5/+1
This reverts commit 4626b405609900812125a407ef5fdd31c7b89868. test-autolaunch works fine in non-launchd environments (and non-X11 environments, based on a quick test passing enable_x11=no to configure). On the contrary: this commit *broke* the build on non-launchd environments, because test/name-test/run-test.sh still tried to run this test even if it hadn't been built.
2010-12-15policy tests: Use 'nogroup' rather than 'wheel' or 'root'Will Thompson1-2/+2
The excellently-titled commit 197bef8 “Fix test failures on OSX.” broke the tests on Linux, since there's no wheel group on this side of the tracks. So here's a group everyone should enjoy. (If anyone comes along and tells me that DragonflyBSD doesn't have 'nogroup' …)
2010-12-04Fix test failures on OSX.Mike McQuaid1-2/+2
2010-12-04test-autolaunch is only known to work in launchd environments.Mike McQuaid1-1/+5
2010-12-04Added a test-autolaunch.Colin Walters3-1/+48
* test/name-test/test-autolaunch.c: New file, unsets DBUS_SESSION_BUS_ADDRESS so we should fall back to autolaunch:. * test/name-test/run-test.sh: Run it. * test/name-test/Makefile.am: Build it.
2010-10-05Update a load of .gitignoresWill Thompson1-2/+6
2010-10-05Silence silent build a bit more.Will Thompson1-1/+1
2010-09-03Make dbus-uuidgen atomicColin Walters1-1/+1
A Red Hat QA engineer hit in practice a race condition in dbus-uuidgen where it could leave an empty file. dbus-uuidgen (_dbus_create_uuid_file_exclusively) formerly created an empty file in the path to the uuid, then filled it in. At some point, the internal libdbus _dbus_string_save_to_file became atomic on Unix at least (doing the save to temp file, fsync(), rename() dance). So _dbus_create_uuid_file_exclusively doesn't need to create the file beforehand anymore. However, it *does* need the file to be world-readable, unlike all other consumers of _dbus_string_save_to_file. So add a "world_readable" argument.
2010-08-10Applied patches from cygwin port.Yaakov Selkowitz1-1/+1
2010-04-13Port test-privserver to windows by using the TEST_LISTEN bus address.Ralf Habacker1-0/+4
2010-04-11Cmake support for cross plattform usable test files.Ralf Habacker2-0/+32
Recent test configuration files contains 'unix:...' bus adresses which do not work on windows. For cross plattform usable test files the whole listen tag entry has to be set by the build system, which is available with a new build system variable named TEST_LISTEN. To have the client client side definition in sync, TEST_CONNECTION has been moved from c file into cmake build system.
2010-03-23Renamed libdbus-convenience to libdbus-internal for automake (to stay in ↵Ralf Habacker2-9/+9
sync with cmake).
2010-03-23Update dll export for autoconf (to stay in sync with cmake).Marcus Brinkmann2-0/+3
2010-03-22Merge branch 'dbus-1.2'Colin Walters3-576/+1
Conflicts: bus/dispatch.c configure.in test/name-test/test-names.c
2010-03-22Make more signal and locale interface use conditional.Marcus Brinkmann1-0/+2
2010-03-19Consistently include <config.h> in all C source files and never in header files.Marcus Brinkmann18-3/+16
2010-03-16Delete name-test/test-namesColin Walters3-575/+1
This test, while extensive, has the serious flaw of effectively spinning on _dbus_connection_do_iteration_unlocked. Any tests like this should be using the internal DBus mainloop, which I don't have time to port it to before doing a release.
2010-01-28Merge branch 'my-dbus-1.2'Colin Walters1-1/+4
Conflicts: bus/Makefile.am dbus/dbus-sysdeps-util-unix.c dbus/dbus-transport.c test/test-service.c
2010-01-28Ignore exit code zero from activated servicesColin Walters5-4/+99
A variety of system components have migrated from legacy init into DBus service activation. Many of these system components "daemonize", which involves forking. The DBus activation system treated an exit as an activation failure, assuming that the child process which grabbed the DBus name didn't run first. While we're in here, also differentiate in this code path between the servicehelper (system) versus direct activation (session) paths. In the session activation path our error message mentioned a helper process which was confusing, since none was involved. Based on a patch and debugging research from Ray Strode <rstrode@redhat.com>
2009-12-18windows does not support fork, skip itRalf Habacker1-2/+5
2009-12-15Ignore exit code zero from activated servicesColin Walters5-4/+99
A variety of system components have migrated from legacy init into DBus service activation. Many of these system components "daemonize", which involves forking. The DBus activation system treated an exit as an activation failure, assuming that the child process which grabbed the DBus name didn't run first. While we're in here, also differentiate in this code path between the servicehelper (system) versus direct activation (session) paths. In the session activation path our error message mentioned a helper process which was confusing, since none was involved. Based on a patch and debugging research from Ray Strode <rstrode@redhat.com>
2009-12-07fixed memory leakRalf Habacker1-1/+3
2009-12-01readded test files required for windowsRalf Habacker2-0/+29
2009-12-01Makefile.am's: reorder libraries so static libs come first (fixes linking on ↵Marc Mutz1-5/+5
W32) (cherry picked from commit f88bd88d6b4b318f9401fae595343c8b1bacf654)
2009-11-30use dbus provided wait functionRalf Habacker1-1/+3
2009-11-30fix warning, use Sleep, not _sleep on windows (cherry picked from commit ↵Frank Osterfeld1-1/+7
ea36c743ad60a2dd5c6286571d1a475903519809)
2009-09-18Fix link order: system libraries should come after libdbus-convenienceColin Watson1-1/+1
libdbus-convenience may use system libraries, but not the other way round. Most platforms don't care, but on some platforms this means that system libraries need to be listed after libdbus-convenience.la on the link line.
2009-07-16Fix running tests when builddir != srcdir.Thiago Macieira1-1/+1
This script is not deployed to the builddir, so it cannot be run with relative paths.
2009-07-14Bug 21161 - Update the FSF addressTobias Mueller2-2/+2
No comment. Signed-off-by: Colin Walters <walters@verbum.org> (cherry picked from commit 5baf2f856a9c6625993234855b07680da1c8916f)
2009-07-14Add missing include for unistd.h in test-service.cColin Walters1-0/+1
We use usleep here. (cherry picked from commit e5310abd6cbc4c2e1a9df54f097d6642ad0833c6)
2009-07-14Add tests for pending call timeoutsScott James Remnant5-1/+173
* test/test-service.c (handle_delay_echo, path_message_func): Add a variant of the Echo method which sleeps for a short time. * test/name-test/test-pending-call-timeout.c: Run tests with default, specified and infinite timeout to make sure we get the reply. * test/name-test/run-test.sh: Run the new test * test/name-test/Makefile.am: Build the new test Signed-off-by: Scott James Remnant <scott@ubuntu.com> (cherry picked from commit c1f165261afcc3bafa9b24ff916bb231628e3782)
2009-07-10Bug 21161 - Update the FSF addressTobias Mueller2-2/+2
No comment. Signed-off-by: Colin Walters <walters@verbum.org>
2009-07-10Add missing include for unistd.h in test-service.cColin Walters1-0/+1
We use usleep here.
2009-05-28Add tests for pending call timeoutsScott James Remnant5-1/+173
* test/test-service.c (handle_delay_echo, path_message_func): Add a variant of the Echo method which sleeps for a short time. * test/name-test/test-pending-call-timeout.c: Run tests with default, specified and infinite timeout to make sure we get the reply. * test/name-test/run-test.sh: Run the new test * test/name-test/Makefile.am: Build the new test Signed-off-by: Scott James Remnant <scott@ubuntu.com>
2009-05-06Bug 19502 - Sparse warning cleanupsKjartan Maraas2-2/+2
This patch makes various things that should be static static, corrects some "return FALSE" where it should be NULL, etc. Signed-off-by: Colin Walters <walters@verbum.org>