dbus/dbus
Ralf Habacker 5f1bc83d36 Add unit tests for platform-specific mutex implementation.
The tests are enabled with the embedded tests; the required
low-level functions from the dbus library are decorated with
DBUS_EMBEDDED_TESTS_EXPORT to indicate the appropriate usage.

On Windows, all tests are run; on unix-like operating systems,
individual tests are disabled:
- the tests on #NULL pointers of type DBus[C|R]Mutex, since they
  point to a data structure and would cause a segment violation
  when accessed.
- the multiple lock test for type DBusCMutex, since it would block
  the current thread.

Since the whole point of "rmutex" is to be able to lock multiple
times, the "rmutex double lock" test is enabled on unix-like
operating systems too.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-05-01 19:52:48 +02:00
..
.gitignore .gitignore: Ignore many more generated files 2018-12-14 13:28:50 +00:00
CMakeLists.txt dbus: Move DBUS_ENABLE_EMBEDDED_TESTS to a new dbus-macros-internal.h 2022-05-01 16:28:51 +00:00
dbus-address.c tests: Move address test out of libdbus 2019-07-03 11:19:19 +01:00
dbus-address.h Normalize C source files to end with exactly one newline 2020-06-10 10:47:31 +00:00
dbus-arch-deps.h.in build: Define DBUS_INT64_MODIFIER, analogous to G_GINT64_MODIFIER 2022-04-19 18:27:47 +00:00
dbus-asv-util.c Add _dbus_asv_add_fixed_array 2019-03-25 21:04:21 +01:00
dbus-asv-util.h Add _dbus_asv_add_fixed_array 2019-03-25 21:04:21 +01:00
dbus-auth.c auth: fix a no-memory case 2022-01-21 16:05:09 +04:00
dbus-auth.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-bus.c various: comment static variables that are locked or otherwise OK 2019-12-12 09:36:24 +01:00
dbus-bus.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-connection-internal.h Introduce a new macro to export symbols solely for tests 2019-07-03 11:17:27 +01:00
dbus-connection.c _dbus_modify_sigpipe: be thread-safe 2019-12-12 09:36:32 +01:00
dbus-connection.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-credentials.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-credentials.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-dataslot.c various: comment static variables that are locked or otherwise OK 2019-12-12 09:36:24 +01:00
dbus-dataslot.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-errors.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-errors.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-file-unix.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-file-win.c Normalize C source files to end with exactly one newline 2020-06-10 10:47:31 +00:00
dbus-file.c Normalize C source files to end with exactly one newline 2020-06-10 10:47:31 +00:00
dbus-file.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-hash.c test: Unembed hash test from libdbus and move it into test/ 2019-01-21 15:20:06 +00:00
dbus-hash.h test: Unembed hash test from libdbus and move it into test/ 2019-01-21 15:20:06 +00:00
dbus-init-win.cpp dbus_threads_init_default, dbus_threads_init: be safe to call at any time 2013-05-10 11:35:08 +01:00
dbus-internals.c Add unit tests for platform-specific mutex implementation. 2022-05-01 19:52:48 +02:00
dbus-internals.h Add unit tests for platform-specific mutex implementation. 2022-05-01 19:52:48 +02:00
dbus-keyring.c embedded tests: Conform to the same API for all tests 2018-12-17 14:12:59 +00:00
dbus-keyring.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-list.c test: Move _dbus_list_test() here 2019-01-21 15:22:07 +00:00
dbus-list.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-macros-internal.h dbus: Move DBUS_PRIVATE_EXPORT to private header 2022-05-01 16:28:51 +00:00
dbus-macros.h dbus: Move DBUS_PRIVATE_EXPORT to private header 2022-05-01 16:28:51 +00:00
dbus-mainloop.c Rename structure DBusSocketSet to DBusPollableSet and adjust the corresponding functions/files 2019-01-09 15:20:19 +01:00
dbus-mainloop.h Normalize C source files to end with exactly one newline 2020-06-10 10:47:31 +00:00
dbus-marshal-basic.c build: Define DBUS_INT64_MODIFIER, analogous to G_GINT64_MODIFIER 2022-04-19 18:27:47 +00:00
dbus-marshal-basic.h Don't cast user-supplied pointers to DBusBasicValue * 2018-12-11 12:23:06 +00:00
dbus-marshal-byteswap.c Fix warning: "pointer targets in assignment differ in signedness [-Wpointer-sign]". 2015-11-24 12:26:00 +01:00
dbus-marshal-byteswap.h Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests 2015-02-20 20:49:36 +00:00
dbus-marshal-header.c DBusMessage: Add a header field for the container instance 2018-02-16 15:27:37 +00:00
dbus-marshal-header.h _dbus_message_remove_unknown_fields: Add 2018-01-11 18:34:39 +00:00
dbus-marshal-recursive.c Don't cast user-supplied pointers to DBusBasicValue * 2018-12-11 12:23:06 +00:00
dbus-marshal-recursive.h Don't cast user-supplied pointers to DBusBasicValue * 2018-12-11 12:23:06 +00:00
dbus-marshal-validate.c validate_body_helper: Bounds-check before validating booleans 2018-08-02 19:20:32 +01:00
dbus-marshal-validate.h dbus-marshal-validate.h: Make self-contained 2018-12-17 14:12:59 +00:00
dbus-memory.c _dbus_decrement_fail_alloc_counter(): Enable out of memory testing on Windows 2021-12-06 10:09:20 +00:00
dbus-memory.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-mempool.c tests: Move mempool test out of libdbus 2019-07-03 11:19:47 +01:00
dbus-mempool.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-message-internal.h Move _dbus_check_fdleaks_* from dbus-message-util to tests 2019-07-02 20:44:33 +01:00
dbus-message-private.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-message-util.c dbus-message-util: Fix Doxygen annotations 2019-07-02 20:44:33 +01:00
dbus-message.c doxygen: fix example for dbus_message_append_args 2019-09-23 13:22:32 +01:00
dbus-message.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-misc.c test: Move _dbus_misc_test() here 2019-01-21 15:22:06 +00:00
dbus-misc.h Normalize C source files to end with exactly one newline 2020-06-10 10:47:31 +00:00
dbus-nonce.c nonce: Don't try to rmdir(NULL) on OOM 2018-08-02 17:15:29 +01:00
dbus-nonce.h DBusNonceFile: Don't rely on caller preallocating the object 2017-11-07 12:43:52 +00:00
dbus-object-tree.c embedded tests: Conform to the same API for all tests 2018-12-17 14:12:59 +00:00
dbus-object-tree.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-pending-call-internal.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-pending-call.c various: comment static variables that are locked or otherwise OK 2019-12-12 09:36:24 +01:00
dbus-pending-call.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-pipe-unix.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-pipe-win.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-pipe.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-pipe.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-pollable-set-epoll.c Rename structure DBusSocketSet to DBusPollableSet and adjust the corresponding functions/files 2019-01-09 15:20:19 +01:00
dbus-pollable-set-poll.c Rename structure DBusSocketSet to DBusPollableSet and adjust the corresponding functions/files 2019-01-09 15:20:19 +01:00
dbus-pollable-set.c Rename structure DBusSocketSet to DBusPollableSet and adjust the corresponding functions/files 2019-01-09 15:20:19 +01:00
dbus-pollable-set.h Rename structure DBusSocketSet to DBusPollableSet and adjust the corresponding functions/files 2019-01-09 15:20:19 +01:00
dbus-protocol.h dbus-protocol.h: fix DBUS_ERROR_SPAWN_NO_MEMORY comment 2020-06-10 14:26:03 +04:00
dbus-resources.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-resources.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-server-debug-pipe.c Normalize C source files to end with exactly one newline 2020-06-10 10:47:31 +00:00
dbus-server-debug-pipe.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-server-launchd.c Fix building on Mac OSX when using launchd 2022-03-31 08:58:46 +02:00
dbus-server-launchd.h Add launchd implementation. 2010-12-06 21:33:06 +01:00
dbus-server-protected.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-server-socket.c Normalize C source files to end with exactly one newline 2020-06-10 10:47:31 +00:00
dbus-server-socket.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-server-unix.c server-unix: Don't leak address of systemd server on success 2018-08-23 18:23:34 +01:00
dbus-server-unix.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-server-win.c Normalize C source files to end with exactly one newline 2020-06-10 10:47:31 +00:00
dbus-server-win.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-server.c test: Move _dbus_server_test() here 2019-01-21 15:22:07 +00:00
dbus-server.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-sha.c tests: Move _dbus_sha_test outside libdbus 2019-07-03 11:18:49 +01:00
dbus-sha.h tests: Move _dbus_sha_test outside libdbus 2019-07-03 11:18:49 +01:00
dbus-shared.h Disable the Containers interface 2021-12-10 16:48:51 +00:00
dbus-shell.c Add and use _dbus_list_clear_full 2018-08-02 15:26:27 +01:00
dbus-shell.h Normalize C source files to end with exactly one newline 2020-06-10 10:47:31 +00:00
dbus-signature.c test: Move _dbus_signature_test() here 2019-01-21 15:22:06 +00:00
dbus-signature.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-sockets-win.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-spawn-unix.c spawn-unix: Don't log an error if unable to reset Linux OOM score 2022-02-22 19:30:30 +00:00
dbus-spawn-win.c Add returning oom error in _dbus_spawn_program() when building for WINCE 2021-12-06 10:09:20 +00:00
dbus-spawn.h dbus-spawn: Don't take ownership of envp 2019-01-05 11:41:58 +01:00
dbus-string-private.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-string-util.c test: Move string tests (most of dbus-string-util.c) here 2019-01-21 15:21:43 +00:00
dbus-string.c dbus-string: Add _dbus_string_append_buffer_as_hex() 2022-05-01 16:28:51 +00:00
dbus-string.h dbus-string: Add _dbus_string_append_buffer_as_hex() 2022-05-01 16:28:51 +00:00
dbus-syntax.c Doc: fix incorrect param names, missing params, non-exist params 2013-08-22 20:01:08 +01:00
dbus-syntax.h Add dbus-syntax.[ch] 2012-02-24 12:43:55 +00:00
dbus-sysdeps-pthread.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-sysdeps-thread-win.c Add assertions to the [c|r]mutex related functions on Windows 2022-05-01 18:55:05 +02:00
dbus-sysdeps-unix.c sysdeps: On Linux, wrap close_range syscall directly if necessary 2022-04-21 11:02:44 +01:00
dbus-sysdeps-unix.h dbus-launch: Generalize support for discovering an existing bus 2022-03-29 14:38:43 +00:00
dbus-sysdeps-util-unix.c sysdeps-unix: check fd before calling _dbus_fd_set_close_on_exec() 2022-03-29 11:52:32 +00:00
dbus-sysdeps-util-win.c Fix memory leaks in Windows variant of _dbus_directory_open() 2021-12-09 12:53:18 +01:00
dbus-sysdeps-util.c test: Move sysdeps tests here 2019-01-21 15:22:05 +00:00
dbus-sysdeps-win.c In _dbus_get_autolaunch_address() avoid uninitialized mutex 2021-12-16 10:05:50 +01:00
dbus-sysdeps-win.h sysdeps: Make some functions Windows-specific 2021-12-15 11:55:06 +00:00
dbus-sysdeps-wince-glue.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-sysdeps-wince-glue.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-sysdeps.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-sysdeps.h dbus-launch: Generalize support for discovering an existing bus 2022-03-29 14:38:43 +00:00
dbus-test-tap.c test: Avoid misleading diagnostic when some tests are skipped 2021-12-16 07:52:46 +00:00
dbus-test-tap.h test: Move TAP helpers into dbus-testutils if embedded tests are disabled 2020-04-20 10:13:04 +01:00
dbus-test.h tests: Move userdb test out of libdbus 2019-07-03 11:19:50 +01:00
dbus-threads-internal.h Add unit tests for platform-specific mutex implementation. 2022-05-01 19:52:48 +02:00
dbus-threads.c various: comment static variables that are locked or otherwise OK 2019-12-12 09:36:24 +01:00
dbus-threads.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-timeout.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-timeout.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-transport-protected.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-transport-socket.c Normalize C source files to end with exactly one newline 2020-06-10 10:47:31 +00:00
dbus-transport-socket.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-transport-unix.c test: Move _dbus_transport_unix_test() here 2019-01-21 15:22:07 +00:00
dbus-transport-unix.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-transport-win.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-transport-win.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-transport.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-transport.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-types.h build: Define DBUS_INT64_MODIFIER, analogous to G_GINT64_MODIFIER 2022-04-19 18:27:47 +00:00
dbus-userdb-util.c userdb: Reference-count DBusUserInfo, DBusGroupInfo 2020-07-01 13:21:23 +01:00
dbus-userdb.c userdb: Reference-count DBusUserInfo, DBusGroupInfo 2020-07-01 13:21:23 +01:00
dbus-userdb.h userdb: Reference-count DBusUserInfo, DBusGroupInfo 2020-07-01 13:21:23 +01:00
dbus-uuidgen.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-uuidgen.h dbus: Move DBUS_PRIVATE_EXPORT to private header 2022-05-01 16:28:51 +00:00
dbus-valgrind-internal.h Fix building with newer Valgrind 2012-11-09 14:04:27 +00:00
dbus-watch.c trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus-watch.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
dbus.h trivial: Remove trailing whitespace from copyright notices 2018-12-17 11:22:39 +00:00
Makefile.am dbus: Move DBUS_ENABLE_EMBEDDED_TESTS to a new dbus-macros-internal.h 2022-05-01 16:28:51 +00:00
Version.in Link dbus-daemon and dbus-daemon-lauch-helper against libdbus 2015-02-20 20:49:45 +00:00
versioninfo.rc.in Update copyright year in file template for version info on Windows 2020-02-20 08:48:30 +01:00