Commit graph

2831 commits

Author SHA1 Message Date
Simon McVittie
006dbd48fa NEWS 2011-07-18 19:33:00 +01:00
Simon McVittie
693e2fc463 Uninstall the installed docs
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:24:52 +01:00
Simon McVittie
39b6b898c5 Install man2html output to $(htmldir)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:24:47 +01:00
Simon McVittie
14dab0789e Install diagram.*, system-activation.txt to the $(docdir)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:24:23 +01:00
Simon McVittie
53af0b903c Install xmlto output to $(htmldir) automatically
Also rename HTML_FILES to XMLTO_OUTPUT, as a more self-describing name:
we have other HTML files which are not the output from xmlto.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:24:15 +01:00
Simon McVittie
37cb1522fe Install dbus.devhelp to $(htmldir), not $(apidir), and remove it in clean
It needs to be in $(htmldir) so that its relative paths will work.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:23:45 +01:00
Simon McVittie
b9f38fd024 configure.ac: fix check for xsltproc
Pre-setting XSLTPROC interferes with AC_CHECK_PROGS letting the user
override choice of program via the environment.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156
2011-07-18 19:23:24 +01:00
Simon McVittie
d54ea8a41b Use EXEEXT when running tests from another directory, and skip bus-test-launch-helper on non-Unix
This is necessary when cross-compiling from Linux to mingw32 and running
the resulting tests under Wine. (This partially works! Some tests fail,
though.)

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:14:59 +01:00
Simon McVittie
a45df5f10a Build docs after running tests, and remove redundant DIST_SUBDIRS
If DIST_SUBDIRS isn't set, it defaults to SUBDIRS, so it's just noise.

Running tests before building documentation is an easy way to speed up the
hack/make check/fix cycle, by not wasting time rebuilding the
documentation (which is often slow) until all the tests compile and pass.

https://bugs.freedesktop.org/show_bug.cgi?id=34405
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:14:57 +01:00
Simon McVittie
b354cfc84a Run bus tests from test/
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34405
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:14:55 +01:00
Simon McVittie
e07a8f8e44 Run dbus-test from test/, not dbus/
This avoids failures caused by test/data not having been set up yet.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34405
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:14:54 +01:00
Simon McVittie
68b17dbb4c dbus tests: don't warn on skipped tests
We should treat _dbus_warn as fatal when we run tests, like bus/ does.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34405
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:14:52 +01:00
Simon McVittie
cf9ee7ae80 test/Makefile.am: list tests one per line
This improves clarity, and makes conflicts less likely and merges more
obviously correct.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34405
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:14:49 +01:00
Simon McVittie
41d7854cea Opt-in to modern OS features on Solaris, to get file descriptor passing
Surely it's broken to define SCM_RIGHTS but not the necessary structs to
do something useful with it, but whatever.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33465
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-07-18 19:14:47 +01:00
Simon McVittie
af13ae7e43 _dbus_connect_tcp_socket_with_nonce: don't create an extra fd (which is then leaked)
This block should have been deleted in 2007, when IPv6 support was added:
previously, the fd allocated at the beginning of the function was used
for connect(), but for IPv6 support, the socket() call has to be inside
the loop over getaddrinfo() results so its address family can be changed.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37258
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-07-18 15:11:47 +01:00
Simon McVittie
c6c1874179 DBusServer: exclusively use atomic operations on the refcount
Same reasoning as for fd.o #38005, commit 50732523a7.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
Bug-NB: NB#263436
2011-07-14 16:37:46 +01:00
Simon McVittie
6d65b409f9 DBusPendingCall: exclusively use atomic operations on the refcount
Same reasoning as for fd.o #38005, commit 50732523a7.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
Bug-NB: NB#263436
2011-07-14 16:37:05 +01:00
Simon McVittie
fa1a85e121 Cope with platforms whose vsnprintf violates both POSIX and C99 - part 1 2011-07-08 11:00:12 +02:00
Simon McVittie
7b63fe3cfa In Windows _dbus_printf_string_upper_bound, don't crash on malloc failure 2011-07-08 11:00:02 +02:00
Ralf Habacker
110e06a78c Added DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools. 2011-07-08 10:55:46 +02:00
Ralf Habacker
0161eb8c34 Visual Studio Professional uses a different ide starter - pointed out by Romain Pokrzywka 2011-07-08 10:55:16 +02:00
Ralf Habacker
836b84a05a Collected cmake doc into README.cmake. 2011-07-08 10:55:03 +02:00
Ralf Habacker
1fd58d6db4 win32 fix: Keep server autolaunch mutex settings according to client detection algorithmus. 2011-07-05 19:45:23 +02:00
Jiří Klimeš
0dcb911251 DBusConnection: use DBUS_ERROR_OBJECT_PATH_IN_USE instead of DBUS_ERROR_ADDRESS_IN_USE
While registering an object path the possible error is
DBUS_ERROR_OBJECT_PATH_IN_USE, not DBUS_ERROR_ADDRESS_IN_USE (the error
is set by _dbus_object_tree_register()).

Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38874
2011-07-01 14:48:48 +01:00
Simon McVittie
5bfe1310c4 version bump 2011-06-10 22:45:46 +01:00
Simon McVittie
78ba729412 prepare 1.4.12 2011-06-10 21:56:16 +01:00
Simon McVittie
88c6b7ac73 fix installable tests to not install if unwanted 2011-06-10 21:52:39 +01:00
Simon McVittie
5b68cf3ed9 NEWS 2011-06-10 18:52:01 +01:00
Simon McVittie
1250da8f7b Fix copyright dates
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:33:22 +01:00
Simon McVittie
6ace0a5cbd Use DBUS_TIMEOUT_INFINITE in dbus-daemon.c
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:33:20 +01:00
Simon McVittie
719ada0e22 Add and use DBUS_TIMEOUT_INFINITE and DBUS_TIMEOUT_USE_DEFAULT
The documentation claimed that INT_MAX (whatever that means) meant the
default, but the value that has actually always been checked for is
0x7fffffff (aka INT32_MAX on the competent platforms we sadly don't
restrict our portability to), so we should use that. (In practice D-Bus
probably never worked on platforms where int wasn't 32 bits, though.)

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:33:04 +01:00
Simon McVittie
0fa7d26c8e Test that a message with the byte order mangled causes disconnection but no crash
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120
2011-06-10 18:32:58 +01:00
Simon McVittie
b92612945a marshal test: test dbus_message_demarshal_bytes_needed
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120
2011-06-10 18:32:49 +01:00
Simon McVittie
bf421f5a30 Add a test for marshalling and endian-swapping
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120
2011-06-10 18:32:43 +01:00
Simon McVittie
983fd36264 installcheck: don't run installed tests against installed library if in a DESTDIR
That probably won't work, because it'll find the system-wide library
which might be older.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:32:40 +01:00
Simon McVittie
715fa5c0d5 Alter test-dbus-daemon so it tests the installed dbus-daemon by default
For installcheck, adjust it to use things from DESTDIR.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:32:37 +01:00
Simon McVittie
a2f3b17504 Add support for installing most of the modular tests
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:32:35 +01:00
Simon McVittie
f43d76a83b new test for being disconnected by a corrupt message stream
This was meant to reproduce fd.o #15578, but doesn't; the cause of that
bug isn't this simple.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:32:27 +01:00
Simon McVittie
59da5cb2a6 modular tests: depend on GIO 2.22 for GSocket
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:32:25 +01:00
Simon McVittie
da6b4d0426 Test nonce-tcp transport
Regression test for https://bugs.freedesktop.org/show_bug.cgi?id=34569

Reviewed-by: David Zeuthen <davidz@redhat.com>
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:32:10 +01:00
Simon McVittie
ae5524d632 dbus-daemon test: sanity-check the just-installed config file when using DESTDIR
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:32:06 +01:00
Simon McVittie
ba9c274f33 Add a simple integration test for dbus-daemon
This just pushes 2000 messages (or 100000 in performance-testing mode)
through the dbus-daemon, to an echo service and back.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:32:02 +01:00
Simon McVittie
7f25b33f1f Run integration tests on the installed dbus binaries during installcheck
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:31:57 +01:00
Simon McVittie
1c485fc7be Give the tests DBUS_TEST_DAEMON and DBUS_TEST_DATA in their environment
This will allow modular tests to spawn a dbus-daemon with a specified
config file; nothing uses this just yet.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:31:51 +01:00
Simon McVittie
841352a73a Attempt to reproduce fd.o #34393 via another regression test
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:31:47 +01:00
Simon McVittie
65de5fd80a loopback test: unref messages after use
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:31:46 +01:00
Simon McVittie
163d3b2154 Add an end-to-end sanity check for TCP and Unix DBusServer/DBusConnection
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:31:42 +01:00
Simon McVittie
90f36efbc3 Add support for building "modular" tests, which require GLib and dbus-glib
For the moment, the CMake build system only knows about the existing
"embedded tests"; make it define both symbols, though.

We use GLib because it has GTester (and life's too short to write yet another
JUnit clone), and dbus-glib for the main-loop integration only (see
fd.o #31515 for thoughts on incorporating just those two functions in a
separate library in the dbus tarball).

I'm not using DBusLoop for the main loop because I specifically don't
want to use non-public API or ABI of libdbus in the modular tests. If we make
sure they work against a shared libdbus, we can use them to test the
installed system, with "make installcheck".

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:31:31 +01:00
Simon McVittie
77e208ac1d Don't disable GLib assertions when disabling our own assertions
We no longer use GLib internally, and assertions are how it'll report test
failures when we add GTest-based tests.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
2011-06-10 18:31:07 +01:00
Simon McVittie
90ac05171d dbus_message_demarshal_bytes_needed: correct a wrong assertion
It's entirely possible for a message to indicate how many bytes we need,
without actually being complete.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-06-10 18:10:17 +01:00