File: tests-Avoid-more-GDBusConnection-leaks.patch

package info (click to toggle)
libayatana-indicator 0.9.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 804 kB
  • sloc: ansic: 4,858; makefile: 36; xml: 14; sh: 8
file content (36 lines) | stat: -rw-r--r-- 1,408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Alessandro Astone <alessandro.astone@canonical.com>
Date: Mon, 6 Oct 2025 15:43:52 +0200
Subject: tests: Avoid more GDBusConnection leaks

The atk-bridge has started "leaking" a GDBusConnection since 2.57.0; disable
it since it's not needed for the test.

The GTK Wayland backend also "leaks" a GDBusConnection used to read settings
in place of xsettings; force using the X11 backend.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1114169
Bug-Ubuntu: https://launchpad.net/bugs/2124957
Forwarded: https://github.com/AyatanaIndicators/libayatana-indicator/pull/80
---
 tests/test-indicator-ng.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/test-indicator-ng.c b/tests/test-indicator-ng.c
index 774b000..2b93236 100644
--- a/tests/test-indicator-ng.c
+++ b/tests/test-indicator-ng.c
@@ -174,11 +174,13 @@ test_menu (void)
 int
 main (int argc, char **argv)
 {
-  /* gvfs, dconf, and appmenu-gtk leak GDbusConnections, which confuses
+  /* gvfs, dconf, appmenu-gtk, atk-bridge and gdk-wayland leak GDbusConnections, which confuses
    * g_test_dbus_down.  Make sure we're not using any of those.
    */
   g_setenv ("GIO_USE_VFS", "local", TRUE);
   g_setenv ("GSETTINGS_BACKEND", "memory", TRUE);
+  g_setenv ("NO_AT_BRIDGE", "1", TRUE);
+  g_setenv ("GDK_BACKEND", "x11", TRUE);
   g_unsetenv ("UBUNTU_MENUPROXY");
 
   g_test_init (&argc, &argv, NULL);