summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-06-30Merge branch 'dbus-1.10' into dbus-1.10-cidbus-1.10-ciSimon McVittie3-10/+34
2016-06-30activation: set children oom_score_adj to 0WaLyong Cho1-0/+20
If dbus is running as systemd service, dbus daemon is running with oom_score_adj -900 by OOMScoreAdjust=-900. And children will also have same value with dbus daemon. To avoid this, set the child itself values after fork () to 0. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32851 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-06-30Use dbus_set_error_from_message() to check for an errorРуслан Ижбулатов1-9/+13
Do not rely on dbus_message_get_args() to turn an ERROR message into DBusError. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=96653 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-06-30Quote the DBUS_SESSION_BUS_ADDRESS variable in the shell fileThiago Macieira1-1/+1
Some D-Bus daemon versions set multiple addresses separated by semi-colon, which breaks sourcing of the file. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94746 Signed-off-by: Thiago Macieira <thiago@kde.org> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-18travis: compile with mingw in both production and debug flavoursSimon McVittie1-0/+1
This should detect anything that is only a build failure when embedded tests or verbose mode are enabled, such as the missing include fixed in commit 4858faf. I'm not enabling embedded tests and verbose mode orthogonally because we don't want CI builds to take too long. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> (cherry picked from commit 8f6fe1451ead14b82475177f40bbc2c256cba876)
2016-05-18Merge branch 'dbus-1.10' into dbus-1.10-ciSimon McVittie5-15/+69
2016-05-18test-segfault: add missing include of <stdio.h> on WindowsSimon McVittie1-0/+1
Needed for fprintf (stderr, ...). Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> (cherry picked from commit 07b7dcd7178f927cd0b3a3282396b7f99c0b1d29)
2016-05-16Fix ambiguous setup of DBusBabySitter struct member child_handle on Windows.Ralf Habacker1-3/+7
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-13On Windows make access to member 'refcount' of struct DBusBabysitter thread ↵Ralf Habacker3-7/+32
safe. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-13Eliminates a race condition accessing DBusBabysitter instance at startup of ↵Ralf Habacker1-3/+1
babysitter() on Windows. Ensure that the babysitter thread already owns its one reference to the babysitter when it starts up, and eliminates the race condition. This patch requires that DBusBabysitter refcounting is thread-safe and is based on an analysis and proposal of Simon Mc Vittie. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-09Suppress Windows popups and jit debugger when app crashes with exception.Ralf Habacker1-0/+25
Based on a patch from Yiyang Fei. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95155 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-04-29Fix crash in test-spawn unit test app on Windows.Yiyang Fei1-1/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95160 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-04-29Fix assert in test-spawn caused by missing initialization of DBusError ↵Ralf Habacker1-1/+1
instance on gcc builds. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95160 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> (cherry picked from commit 9323a621e868d6a5b628b89696b1efe0300ff939)
2016-03-07Merge branch 'dbus-1.10' into dbus-1.10-ciSimon McVittie2-2/+9
2016-03-071.10.9Simon McVittie2-1/+6
2016-03-071.10.8dbus-1.10.8Simon McVittie2-2/+4
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-02Disable travis-ci apt source for Google ChromeSimon McVittie1-0/+2
This prevents adding i386 as a foreign architecture. We don't need Chrome anyway. Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-02Merge branch 'dbus-1.10' into dbus-1.10-ciSimon McVittie6-5/+66
2016-03-02update NEWSSimon McVittie1-0/+8
2016-03-02dbus-test-tool echo: fix sleep documentationDmitri Iouchtchenko2-3/+3
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94244 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-03-02Statically assert that the DBusMessageIter struct has no paddingSimon McVittie1-0/+5
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Thiago Macieira <thiago@kde.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136
2016-03-02DBusMessageIter: eliminate padding on 64-bit platformsSimon McVittie2-1/+30
Previously, 64-bit (LP64 or LLP64) platforms would have had 32 bits of padding between pad2 and pad3. We want to guarantee that an ISO C compiler will copy the entire struct when assigning between structs, but padding is not guaranteed to be copied, so we want to ensure that the struct is "packed". Statically assert that the old ABI is compatible with the new ABI. Reviewed-by: Thiago Macieira <thiago@kde.org> [smcv: change >= to == as Thiago requested] Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136
2016-03-02DBusMessage: assert the properties we need DBusMessageIter to haveSimon McVittie1-0/+3
We already asserted that DBusMessageIter must be at least as large as DBusMessageRealIter (so that casting DBusMessageIter * to DBusMessageRealIter * does not result in overflowing the stack variable). Also assert that it must have alignment requirements at least as strict as those of DBusMessageRealIter * (so that casting does not increase the required alignment). Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Thiago Macieira <thiago@kde.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136
2016-03-02dbus-internals: add _DBUS_ALIGNOFSimon McVittie1-0/+3
This is useful when making static assertions about our types' properties. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Thiago Macieira <thiago@kde.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136
2016-02-24NEWS so farSimon McVittie1-1/+14
2016-02-12Merge branch 'dbus-1.10' into dbus-1.10-ciSimon McVittie0-0/+0
2016-02-12Revert "Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH"Simon McVittie9-11/+17
This reverts commit 8fd2be6013e3d0ff6a6ff63ea022f9606d9a87c6. This change was intended for 1.11.
2016-02-12Revert "name-test C tests: produce structured (TAP) output"Simon McVittie7-57/+25
This reverts commit fec99c9b3d8318e3abae432f2aca50802a87f90e. This change was intended for 1.11.
2016-02-12Revert "name-test: run most C tests directly, not via run-test.sh"Simon McVittie2-29/+9
This reverts commit d893121efdea39d2b32037b32e336ea483829b2e. This change was intended for 1.11.
2016-02-12Revert "Rename function string_array_length() to _dbus_string_array_length() ↵Simon McVittie3-24/+15
and move it to dbus-internals.c." This reverts commit 1370b44035da90a7fbcebea17074c66c832de0b1. This change was intended for 1.11.
2016-02-12Revert "Add new functions _dbus_hash_table_to_array() and ↵Simon McVittie3-139/+92
_dbus_hash_table_from_array() from related activation code." This reverts commit 610ff8d9646c1bb944bc5e56f22750f1754b308e. This change was intended for 1.11.
2016-02-11Add new functions _dbus_hash_table_to_array() and ↵Ralf Habacker3-92/+139
_dbus_hash_table_from_array() from related activation code. These functions are required for dbus-run-session. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-11Rename function string_array_length() to _dbus_string_array_length() and ↵Ralf Habacker3-15/+24
move it to dbus-internals.c. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-11name-test: run most C tests directly, not via run-test.shSimon McVittie2-9/+29
The exception is test-autolaunch, which is really not particularly useful as a build-time test. The only way we can really test autolaunch is as a whole-system integration test, and "make check" is not that. The two tests written in Python and one test based on dbus-send are also not run directly yet; in particular, that includes both the tests in run-test-systemserver.sh. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-11name-test C tests: produce structured (TAP) outputSimon McVittie7-25/+57
Similar to commit 58eefa1031e14cb402ed0aae85e6bce1ba030a28. test-privserver is a helper executable, not a test. I moved its output from stdout to stderr so it can't be misinterpreted as the test's stdout. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-11Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCHSimon McVittie9-17/+11
Instead of using $DBUS_USE_TEST_BINARY to control whether to use the hard-coded test binary TEST_BUS_LAUNCH_BINARY, we can just use $DBUS_TEST_DBUS_LAUNCH to control what we launch directly, as we were already doing for $DBUS_TEST_DAEMON. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-08Merge branch 'dbus-1.10' into dbus-1.10-ciSimon McVittie1-3/+1
2016-02-08marshal-validate: run all the tests instead of just the even onesNick Lewycky1-3/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93908 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> [smcv: Re-enable the failing test that Nick disabled, and fix the expected result; the result given by our current implementation is reasonable.]
2016-02-08Merge branch 'dbus-1.10' into dbus-1.10-ciSimon McVittie1-0/+1
2016-02-08configure.ac: support large-file for stat64Simon McVittie1-0/+1
dbus-daemon is not expected to open files with large *sizes*, but without large file support, calling [f]stat() on a file that happens to have a large inode number will fail with EOVERFLOW (see stat(2)). For example, files mounted from an NFS server might have large inode numbers. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93545 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> [smcv: shorten and clarify commit message; move AC_SYS_LARGEFILE after AC_USE_SYSTEM_EXTENSIONS because nothing should compile C before that point] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-01-25Merge branch 'dbus-1.10' into dbus-1.10-ciSimon McVittie1-4/+2
2016-01-25test/name-test/run-test.sh: output correct result if a C test failsSimon McVittie1-4/+2
Loosely based on a patch from amit tewari. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93379 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-12-02add travis-ci.org build machinerySimon McVittie3-0/+271
The idea is that .travis.yml is specific to Travis-CI, but most of the actual work is done in tools/ci-build.sh, which should be reasonably CI-platform-agnostic (it currently assumes that build-dependendencies are preinstalled, that the "native" platform we're building on is GNU/Linux or something very close, and that "mingw" means mingw-w64 as packaged in Debian and Ubuntu). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-12-02Don't try to run manual tests in installcheckSimon McVittie1-1/+1
We were mistakenly running all installed executables, even manual tests that never terminate. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-12-02Fix shell syntax for installcheck-local with no DESTDIRSimon McVittie1-1/+1
A closing brace must be preceded by a semicolon. The CI integration added later in this branch actually runs "make installcheck" with no DESTDIR; apparently nobody else has ever tried that. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-12-02Do not require systemd to have a service file if using it for activationSimon McVittie1-12/+31
With --systemd-activation we special-case the name org.freedesktop.systemd1 by assuming that it will eventually connect to the bus. With that in mind, we can ignore whether it has a .service file, and let it be "activated" regardless. This fixes a regression test failure on non-systemd systems such as the Ubuntu 14.04 OS on travis-ci.org: UpdateActivationEnvironment failed, because it tried to update the (fake) systemd environment, but because systemd was not actually installed, there was no service file for it in the system's search paths. We could address this by placing a dummy service file with Exec=/bin/false in our search path like the real systemd does, but it seems cleaner to not require this; this would eventually enable the real systemd to stop installing that dummy service file. This would not happen outside the regression tests, because there is no sense in using --systemd-activation without systemd installed. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-12-02_dbus_test_oom_handling: allow disabling it as documentedSimon McVittie1-0/+6
We documented DBUS_TEST_MALLOC_FAILURES=0 in HACKING, but it didn't actually work: we'd iterate from i=-1 to i=0. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-12-02cmake: run all automated tests with --tap for better diagnosticsSimon McVittie1-2/+2
For GLib-based tests it's useful, because it means g_test_message() gets logged. For the embedded tests it's now accepted and ignored. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-12-02embedded tests: accept and ignore --tap argumentSimon McVittie4-4/+4
This makes them semi-command-line-compatible with a way we can invoke the GLib-based tests to get more useful debug logs. These tests still do not actually produce TAP output yet; I tried implementing that, but it requires changing a lot of noise on stdout to come out of stderr, and there was something weird going on with subprocesses restarting the test numbering which will need further investigation before making that change. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-12-02cmake: copy the systemd-activation directory tooSimon McVittie1-0/+1
It is needed for a couple of test-cases. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93194 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>