Ralf Habacker
667b153dce
cmake: Make gcc builds use similar compiler warnings to autotools
...
Fixes #356
2021-12-10 13:36:28 +00:00
Ralf Habacker
40c9655e91
cmake: use the string 'append' command to add compiler flags for convenience
...
The minimum version of cmake has been increased because the mentioned
string command has been added with cmake 3.4.
2021-12-10 13:36:28 +00:00
Simon McVittie
78c18f400f
Merge branch 'fix-issue-362' into 'master'
...
Fix `test applications do not display invalid test selection`
Closes #362
See merge request dbus/dbus!233
2021-12-10 12:46:13 +00:00
Ralf Habacker
0d0649145f
In _dbus_test_main() check if a specified test name is available
...
Fixes #362
2021-12-10 10:36:37 +01:00
Ralf Habacker
febafd863e
test/test-utils.c: Add command line option --list-tests to test applications
...
With this command line option a list of available tests is printed to
stdout.
2021-12-10 10:36:28 +01:00
Ralf Habacker
3432cd938d
test/test-utils.c: Add command line option --help to test applications
2021-12-10 10:21:35 +01:00
Simon McVittie
6ba6f5e870
Merge branch 'fix-issue-360' into 'master'
...
Fix test-bus related memory leaks on Windows
Closes #360
See merge request dbus/dbus!232
2021-12-09 15:34:07 +00:00
Ralf Habacker
3a2e0ba5fe
Avoid assertation in bus_activation_reload()
...
In the mentioned function a local DBusError instance is now used to
fulfill the requirement of dbus_error_has_name() that the parameter
'error' must not be null.
See #360
2021-12-09 12:54:22 +01:00
Ralf Habacker
5b804ed77d
Fix memory leaks in Windows variant of _dbus_directory_open()
...
If the memory is not sufficient, the created DBusString instance must be
released. This belongs to the mentioned function and
_dbus_string_init_from_string().
Fixes #360
2021-12-09 12:53:18 +01:00
Simon McVittie
1877922b80
Merge branch 'fix-test-dbus-daemon-windows' into 'master'
...
tools/ci-build.sh: Double maximum test time when running tests on Windows
Closes #320 and #359
See merge request dbus/dbus!231
2021-12-07 13:07:30 +00:00
Ralf Habacker
19d6954b05
tools/ci-build.sh: Double maximum test time when running tests on Windows
...
The currently timeout of 60 seconds is too short for test-dbus-daemon on
Windows, depending on the load of the CI system.
Fixes #359
2021-12-06 23:52:01 +01:00
Simon McVittie
475a4b78a7
Merge branch 'fix-issue-357' into 'master'
...
test-spawn-oom: Fix regression with recent Windows refactoring
Closes #357 and #279
See merge request dbus/dbus!228
2021-12-06 13:02:31 +00:00
Ralf Habacker
9a1f2608ee
Add returning oom error in _dbus_spawn_program() when building for WINCE
2021-12-06 10:09:20 +00:00
Ralf Habacker
0d37aeb41b
Adjust _dbus_spawn_async_with_babysitter() on Windows to follow Unix like OOM behavior
...
That way, the spawn-oom unit test could expect OOM on Windows to behave
the same as OOM on Unix, raising DBUS_ERROR_NO_MEMORY.
2021-12-06 10:09:20 +00:00
Ralf Habacker
d9dc2a74aa
_dbus_decrement_fail_alloc_counter(): Enable out of memory testing on Windows
2021-12-06 10:09:20 +00:00
Ralf Habacker
4e4d932fd9
Fix memory leak in protect_argv() in case of memory shortage
2021-12-06 10:09:20 +00:00
Ralf Habacker
b9a7744310
protect_argv(): Only set return variable in success case
...
This avoids overwriting the variable even if there is no result.
2021-12-06 10:09:20 +00:00
Ralf Habacker
649f46642b
Merge branch 'windows-error-oom' into 'master'
...
_dbus_win_set_error_from_last_error: Always set the error
See merge request dbus/dbus!229
2021-12-06 10:08:59 +00:00
Simon McVittie
0d40cd2385
_dbus_win_set_error_from_last_error: Always set the error
...
If we run out of memory while setting an error, we need to recover by
setting the error to "out of memory" instead of the original error.
Otherwise, the error indicator would be unset, breaking the rules of
our error model.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-12-03 15:55:59 +00:00
Ralf Habacker
e8b34b419e
Fix gcc compile error: redundant redeclaration of ‘environ’ [-Werror=redundant-decls]
...
Cherry picked from dbus/dbus!227
2021-11-30 14:35:01 +01:00
Ralf Habacker
05cc895444
Merge branch 'issue-355' into 'master'
...
Fix MinGW build error
Closes #355
See merge request dbus/dbus!226
2021-11-30 09:31:49 +00:00
Ralf Habacker
63f6530750
Fix MinGW build error: cast between incompatible function types from 'FARPROC' [-Werror=cast-function-type]'
...
The build error occurred in 'dbus/dbus-sysdeps-win.c:129:43:
Fixes #355
2021-11-29 15:20:10 +00:00
Ralf Habacker
acb9ca7422
tools/ci-*.sh: Show used command line for CI build scripts
...
This makes it much easier to determine the command line used for the
purpose of reproducing the build.
2021-11-29 15:20:10 +00:00
Simon McVittie
0873ca6fb9
Merge branch 'dbus-run-session-refactor' into 'master'
...
_dbus_spawn_program(): Add additional parameter to return error
See merge request dbus/dbus!223
2021-11-29 14:45:13 +00:00
Ralf Habacker
f93d85408e
dbus-spawn-win.c: Refactoring compose_string() and related functions to use DBusString
...
Since the code to compose strings is already used multiple times the
refactoring results in a new function _dbus_string_append_strings().
2021-11-29 13:07:04 +01:00
Ralf Habacker
0eef54ea1b
_dbus_spawn_program(): Add additional parameter to return error
...
By specifying an error instance via the additional parameter, errors that
occur in it are transported to the caller in a coordinated manner.
This eliminates the need to query GetLastError() outside the function,
which can return an incorrect value if the implementation changes.
2021-11-29 13:07:04 +01:00
Ralf Habacker
ba1dc32667
_dbus_spawn_program() now returns #NULL for unification in case of error
2021-11-29 13:07:04 +01:00
Ralf Habacker
15e1285a11
Add _DBUS_GNUC_PRINTF annotation to _dbus_win_set_error_from_last_error()
...
This makes printf like format string related issues visible.
2021-11-29 13:07:04 +01:00
Ralf Habacker
d2bab84329
Remove build: prefix from jobs to make labels more visible in pipeline page
...
The length if the displayed jobs is limited on the gitlab CI pipeline page
and is occupied partly be the prefix.
Cherry-picked from dbus/dbus/!192
2021-11-29 13:04:08 +01:00
Simon McVittie
f517a67017
Merge branch 'master' into 'master'
...
autotools: use pkg-config instead of AC_PATH_XTRA
See merge request dbus/dbus!212
2021-11-26 14:57:58 +00:00
SCOTT-HAMILTON
6bfaea0707
autotools: use pkg-config instead of AC_PATH_XTRA
2021-11-26 15:38:10 +01:00
Simon McVittie
3a04abdebf
Merge branch 'issue-354' into 'master'
...
dbus-run-session: also catches a server-exit under Windows
Closes #354
See merge request dbus/dbus!225
2021-11-25 15:55:42 +00:00
Ralf Habacker
fe84e9b0e5
dbus-run-session: also catches a server-exit under Windows
...
If the dbus-daemon fails before the --ready-event-handle is signalled,
then dbus-run-session now detects that, and exit unsuccessfully.
Fixes #354
2021-11-25 16:46:27 +01:00
Ralf Habacker
42e2dd56b4
Fix printf format string in _dbus_win_event_create_inheritable()
...
Fixup for commit 3f7c36f4 .
2021-11-25 09:46:06 +01:00
Ralf Habacker
de3b653bd7
Merge branch 'clarify-doc-win-code' into 'master'
...
Clarify NULL vs. INVALID_HANDLE_VALUE in _dbus_win_event_free()
Closes #352
See merge request dbus/dbus!224
2021-11-24 07:08:30 +00:00
Ralf Habacker
f9e568ba14
Clarify NULL vs. INVALID_HANDLE_VALUE in _dbus_win_event_free()
...
Fixes dbus/dbus#352
2021-11-24 07:58:29 +01:00
Simon McVittie
d4203c3ee5
Merge branch 'dbus-run-session-add-delay' into 'master'
...
tools/dbus-run-session: fix race between manual and automatically started dbus-daemon on Windows
Closes #297
See merge request dbus/dbus!195
2021-11-23 14:04:22 +00:00
Ralf Habacker
2334307fbd
tools/dbus-run-session.c: use _dbus_win_set_error_from_last_error() on remaining locations
...
The previously used function _dbus_win_stderr_win_error() has been removed
because it is no longer used.
2021-11-23 08:38:14 +01:00
Ralf Habacker
79df3d2811
tools/dbus-run-session: fix race between manual and automatically started dbus-daemon on Windows
...
dbus-run-session starts a dbus-daemon before the client application.
We must avoid letting the application try to connect before the
dbus-daemon's DBusServer is listening for connections.
In the Unix implementation, we already achieved this via the
--print-address option. If the client tried to connect too soon,
the server would not yet be listening and the client would fail.
In the Windows implementation, we communicate the bus address to
the client application as an autolaunch: address, so if the client
tried to connect too soon, it would autolaunch a new dbus-daemon
instead of using the one that it was intended to use.
We can avoid this by using a new option to pass in a Windows event
object, which will be set when the server has started and is ready
to process connections.
Fixes #297
2021-11-23 08:38:14 +01:00
Ralf Habacker
3f7c36f4b1
dbus-sysdeps-win.c: Add helper functions to handle events on Windows
...
These functions are in the dbus library to be used everywhere
2021-11-23 08:38:14 +01:00
Simon McVittie
18b8883213
Merge branch 'remove-nonexistent-match' into 'master'
...
bus: Don't return success from RemoveMatch if there was no such match-rule
See merge request dbus/dbus!222
2021-11-22 18:06:44 +00:00
Simon McVittie
ac5e65ef43
test: Exercise successful and failed RemoveMatch calls
...
Reproduces: https://gitlab.freedesktop.org/dbus/dbus/-/issues/351
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-11-22 16:10:51 +00:00
Simon McVittie
81a5731bcb
bus: Separate RemoveMatch into prepare and commit stages
...
This means we don't send a spurious successful reply if a caller removes
a match rule that they never added.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-11-22 16:10:51 +00:00
Simon McVittie
32278953a1
Merge branch 'cleanup-autolaunch-win' into 'master'
...
dbus-sysdeps-win.c: corrections of indentations and minor refactoring
See merge request dbus/dbus!221
2021-11-19 12:14:59 +00:00
Ralf Habacker
c6ff841326
dbus/dbus-sysdeps-win.c: Convert the character buffer 'dbus_args' to a DBusString instance
...
This is necessary to avoid possible stack overflows.
2021-11-19 11:04:59 +01:00
Ralf Habacker
2d0d8f6116
dbus/dbus-sysdeps-*win.c: correct indentation when calling functions
...
The normal style is <function-name><space>(<no-spaces>...<no-spaces>).
2021-11-19 11:04:59 +01:00
Ralf Habacker
017366e5df
dbus/dbus-sysdeps-win.c: correction of indentations in _dbus_get_autolaunch_address ()
2021-11-19 11:04:59 +01:00
Ralf Habacker
9b798640a4
Merge branch 'cmake-fix-include-path' into 'master'
...
cmake: In generated cmake support files get value for DBus1_INCLUDE_DIRS from related cmake target
Closes #346
See merge request dbus/dbus!214
2021-11-18 15:12:13 +00:00
Ralf Habacker
a2ccc6773b
cmake: In generated cmake support files get value for DBus1_INCLUDE_DIRS variable from related cmake target
...
This allows cmake to construct the resulting (relocatable) runtime paths.
Fixes dbus/dbus#346
2021-11-18 13:51:11 +00:00
Ralf Habacker
e36c7bf707
Merge branch 'master' into 'master'
...
CMake: Set IMPORTED_IMPLIB property
See merge request dbus/dbus!172
2021-11-18 13:20:22 +00:00