mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-07 16:38:43 +02:00
GDBus: Avoid use of libdbus-1 in authentication tests
This greatly simplifies the test since everything is now in a single process and possible bugs / quirks in libdbus-1 will not interfere with the tests. On the other hand, we no longer test interoperability with libdbus-1. This is somewhat moot, however, since other tests that involve a message bus (e.g. GTestDBus users which include most of the GDBus test suite itself) will test this. Also ensure that we don't pollute existing D-Bus keyrings for the DBUS_COOKIE_SHA1 authentication method (e.g. files in the ~/.dbus-keyrings directory) by setting the environment variables G_DBUS_COOKIE_SHA1_KEYRING_DIR and G_DBUS_COOKIE_SHA1_KEYRING_DIR_IGNORE_PERMISSION. All in all, this change avoids some thorny issues where the GDBus and libdbus-1 implementations disagree on whether an item in the D-Bus keyring is still valid (items have an age etc.). In reality, since the DBUS_COOKIE_SHA1 authentication method is never used in production, this is never hit in production. This bug was, however, frequently hit if you just ran the test suite repeatedly for 15 minutes or so. Also add TODO items to mention that we currently don't test corner cases involving - DBUS_COOKIE_SHA1 timeouts - libdbus-1 interoperability Signed-off-by: David Zeuthen <zeuthen@gmail.com>
This commit is contained in:
@@ -194,12 +194,10 @@ gdbus_serialization_CFLAGS = $(DBUS1_CFLAGS)
|
||||
gdbus_serialization_LDADD = $(LDADD) $(DBUS1_LIBS)
|
||||
endif
|
||||
|
||||
if HAVE_DBUS1
|
||||
TEST_PROGS += gdbus-auth
|
||||
gdbus_auth_SOURCES = gdbus-auth.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
|
||||
gdbus_auth_CFLAGS = $(DBUS1_CFLAGS)
|
||||
gdbus_auth_LDADD = $(LDADD) $(DBUS1_LIBS)
|
||||
endif
|
||||
|
||||
gdbus_bz627724_SOURCES = gdbus-bz627724.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
|
||||
|
||||
|
Reference in New Issue
Block a user