summaryrefslogtreecommitdiff
path: root/test/name-test
AgeCommit message (Collapse)AuthorFilesLines
2014-09-15Imported Upstream version 1.8.8upstream/1.8.8Simon McVittie1-1/+0
2014-01-06Imported Upstream version 1.7.10upstream/1.7.10Simon McVittie4-150/+507
2014-01-06Make sure tests run with a temporary XDG_RUNTIME_DIRSimon McVittie3-0/+12
We don't want the regression tests' "session" getting mixed up in system-wide "sessions". This doesn't actually matter yet, but it is likely to matter in future. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61301 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com> [merged with earlier line-wrapping of TESTS_ENVIRONMENT -smcv] Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-11-01Imported Upstream version 1.7.8upstream/1.7.8Simon McVittie1-494/+150
2013-10-09Imported Upstream version 1.7.6upstream/1.7.6Simon McVittie4-52/+66
2013-10-08Unify the way to find dbus-daemon test binaryChengwei Yang1-0/+1
There are two ways to find the dbus-daemon for testing. The first one is defined as string at compile stage and the second one is export it from test environment. The first way has limitation that after defined, it's static string, so it's impossible to run installable check. So let's unify to the second way. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37849 [added missing "}" -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13Don't assume that X11 autolaunch will work if DISPLAY is unsetSimon McVittie1-3/+5
In practice, it won't; other forms of autolaunch (like Mac OS launchd) might, but we can't really assert either way. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40352 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com> [amended to reinstate use of dbus/dbus-sysdeps.h which was removed by 412538b3b9 -smcv] Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-13Use test binaries in build dir to do testChengwei Yang1-1/+6
When do autolaunch testing, libdbus will try to start dbus-launch in installed direcotry, if fail then fall back to dbus-launch in $PATH. dbus-launch does a relative better thing to start dbus-daemon in build directory, however, in most of case, the build $prefix is different from the real prefix where dbus-daemon installed. So dbus-daemon will fail to start due to can't find its config file. And then dbus-launch will fall back to finally the installed dbus-daemon. This patch fix this behavior and will start dbus-launch and dbus-daemon in build directory in test environment. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37849
2013-09-05run-with-tmp-session-bus.sh: create a unique temporary file per processSimon McVittie1-1/+1
This makes the regression tests OK to run in parallel. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-03Tests: allow dbus-glib to be replaced with use of libdbus-internalSimon McVittie1-4/+5
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>
2013-08-23Export dbus_setenv() as a utility functionSimon McVittie1-2/+1
It's sufficiently portable that GLib has an equivalent, and I really don't want to have to either open-code it in dbus-run-session or link dbus-run-session statically. We have enough statically-linked rubbish already. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39196 Reviewed-by: Colin Walters <walters@verbum.org>
2013-06-28tests to embedded tests: replaced in automake filesChengwei Yang1-2/+2
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
2013-06-17Make taking a global lock automatically initialize locking if neededSimon McVittie1-5/+9
This lets them be thread-safe by default, at the cost that they can now fail. init_uninitialized_locks() and init_global_locks() must now both reimplement the equivalent of _dbus_register_shutdown_func(), by using _dbus_platform_rmutex_lock() on the same underlying mutex around a call to _dbus_register_shutdown_func_unlocked(). This is because if they used the usual _DBUS_LOCK() API (as _dbus_register_shutdown_func() does), it would automatically try to initialize global locking, leading to infinite recursion. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk> Reviewed-by: Anas Nashif <anas.nashif@intel.com>
2013-06-12Imported Upstream version 1.7.4upstream/1.7.4Simon McVittie1-150/+492
2013-04-25Imported Upstream version 1.7.2upstream/1.7.2Simon McVittie1-0/+1
2013-02-22Imported Upstream version 1.7.0upstream/1.7.0Simon McVittie2-2/+4
2013-02-22Include config.h as the first thing in every .c fileSimon McVittie1-0/+2
...except for CheckForAbstractSockets.c, which runs before config.h is generated, and sd-daemon.c, which is externally-maintained. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59971 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Colin Walters <walters@verbum.org>
2012-07-18Imported Upstream version 1.6.4upstream/1.6.4Simon McVittie1-1/+1
2012-06-27Imported Upstream version 1.6.2upstream/1.6.2Simon McVittie1-0/+1
2012-06-05Imported Upstream version 1.6.0upstream/1.6.0Simon McVittie3-5/+27
2012-04-12Avoid using monotonic time in the DBUS_COOKIE_SHA1 authentication methodDavid Zeuthen2-4/+4
When libdbus-1 moved to using monotonic time support for the DBUS_COOKIE_SHA1 authentication was broken, in particular interoperability with non-libdbus-1 implementations such as GDBus. The problem is that if monotonic clocks are available in the OS, _dbus_get_current_time() will not return the number of seconds since the Epoch so using it for DBUS_COOKIE_SHA1 will violate the D-Bus specification. If both peers are using libdbus-1 it's not a problem since both ends will use the wrong time and thus agree. However, if the other end is another implementation and following the spec it will not work. First, we change _dbus_get_current_time() back so it always returns time since the Epoch and we then rename it _dbus_get_real_time() to make this clear. We then introduce _dbus_get_monotonic_time() and carefully make all current users of _dbus_get_current_time() use it, if applicable. During this audit, one of the callers, _dbus_generate_uuid(), was currently using monotonic time but it was decided to make it use real time instead. Signed-off-by: David Zeuthen <davidz@redhat.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48580
2012-02-21Imported Upstream version 1.5.10upstream/1.5.10Simon McVittie1-50/+50
2011-09-21Imported Upstream version 1.5.8upstream/1.5.8Simon McVittie5-6/+17
2011-09-21Merge branch 'dbus-1.4'Simon McVittie3-4/+7
Conflicts: NEWS
2011-09-21Check for Python; skip Python tests if not foundSimon McVittie3-4/+7
As with the optional test-dependencies on GLib and dbus-glib, we make this a hard dependency if --enable-tests[=yes], but not if --enable-tests=auto. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37847 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05Remove various never-used variablesSimon McVittie1-1/+0
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-29Imported Upstream version 1.5.6upstream/1.5.6Simon McVittie2-276/+90
2011-07-29test, test/name-test: remove SOURCES where they can be inferred from the ↵Simon McVittie1-30/+0
name of the executable
2011-07-29test/name-test: remove useless CFLAGSSimon McVittie1-4/+0
2011-07-29test/name-test: use AM_CPPFLAGS instead of INCLUDESSimon McVittie1-2/+6
2011-07-29Simplify linking for tests that use libdbus-testutilsSimon McVittie1-4/+4
This is the library used by tests that link libdbus-internal and DBusLoop. By linking libdbus-internal into it, we can avoid having to repeat that dependency all over the place - libtool and cmake both know how to follow recursive dependencies. In cmake, also use libdbus-testutils for more tests, in preference to repeating its source files.
2011-07-29Don't explicitly link thread and network libs into various testsSimon McVittie1-8/+8
These tests get everything they need from the public or internal API of libdbus-internal.la, and libtool knows how to pull in libraries' dependencies, so we don't need explicit linking. spawn-test and break-loader don't actually need test-utils.[ch] either.
2011-07-29Simplify linking by moving -export-dynamic to AM_LDFLAGSSimon McVittie1-8/+3
2011-07-29Remove DBUS_GLIB_CFLAGS from name-test subdirectory (not used/needed)Simon McVittie1-1/+1
This appears to be left over from when dbus-glib was part of dbus.
2011-07-29Remove DBUS_CLIENT_CFLAGS, which is always emptySimon McVittie1-1/+1
2011-07-29Remove DBUS_TEST_CFLAGS, which is emptySimon McVittie1-1/+1
2011-06-10Imported Upstream version 1.5.4upstream/1.5.4Simon McVittie1-1/+4
2011-06-01Imported Upstream version 1.5.2upstream/1.5.2Simon McVittie2-7/+25
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-04-08Imported Upstream version 1.4.8upstream/1.4.8Simon McVittie1-3/+3
2011-02-17Imported Upstream version 1.4.6upstream/1.4.6Simon McVittie1-2/+0
2011-02-17Imported Upstream version 1.4.4upstream/1.4.4Simon McVittie4-118/+71
2011-02-02Merge branch 'serverdata-33277' into dbus-1.4Simon McVittie1-14/+66
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-01-31Imported Upstream version 1.4.1upstream/1.4.1Simon McVittie14-32/+159
2011-01-31Imported Upstream version 1.2.24upstream/1.2.24Simon McVittie15-0/+2063
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-06Add autolaunch test to .gitignoreSimon McVittie1-0/+1
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.