public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michael Catanzaro <mcatanzaro@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/glib2] cve-2026-58016-f44: Add patch to fix GDBusConnection test failures
Date: Tue, 11 Aug 2026 10:38:15 GMT [thread overview]
Message-ID: <178644469526.1.6949526408348873365.rpms-glib2-fd3d3cab41c6@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/glib2
Branch : cve-2026-58016-f44
Commit : fd3d3cab41c69d53b45194336f979fd34f50deaf
Author : Michael Catanzaro <mcatanzaro@redhat.com>
Date : 2024-05-07T17:49:28-05:00
Stats : +106/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/glib2/c/fd3d3cab41c69d53b45194336f979fd34f50deaf?branch=cve-2026-58016-f44
Log:
Add patch to fix GDBusConnection test failures
---
diff --git a/gdbusconnection-signal-order-test.patch b/gdbusconnection-signal-order-test.patch
new file mode 100644
index 0000000..c30549c
--- /dev/null
+++ b/gdbusconnection-signal-order-test.patch
@@ -0,0 +1,103 @@
+From bfda6e1b163667b9d314233e47119c0434a4c35f Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode@redhat.com>
+Date: Tue, 7 May 2024 15:31:47 -0400
+Subject: [PATCH] gdbusconnection: Fix test signal subscription ordering
+
+The test case assumes signals will dispatched in a different order than
+they're subscribed. In fact, signals can be dispatched in any order,
+and are often dispatched in order.
+
+This commit reorders the subscriptions so they're in order, which is
+more logical, and also changes the code to only exit the event loops
+when there are no pending handlers ready to dispatch.
+---
+ gio/tests/gdbus-connection.c | 29 +++++++++++++++++------------
+ 1 file changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/gio/tests/gdbus-connection.c b/gio/tests/gdbus-connection.c
+index 95d2b846b..fc8816716 100644
+--- a/gio/tests/gdbus-connection.c
++++ b/gio/tests/gdbus-connection.c
+@@ -536,7 +536,12 @@ test_connection_signal_handler (GDBusConnection *connection,
+ interface_name,
+ signal_name);*/
+
+- g_main_loop_quit (loop);
++ /* We defer quitting to a G_PRIORITY_DEFAULT_IDLE function so other queued signal
++ * callbacks have a chance to run first. They get dispatched with a higher priority
++ * of G_PIORITY_DEFAULT, so as long as the queue is non-empty g_main_loop_quit won't
++ * run
++ */
++ g_idle_add_once ((GSourceOnceFunc) g_main_loop_quit, loop);
+ }
+
+ static void
+@@ -627,7 +632,7 @@ test_connection_signals (void)
+ "org.gtk.GDBus.ExampleInterface", /* interface */
+ "FooArg0", /* member */
+ "/org/gtk/GDBus/ExampleInterface", /* path */
+- "some-arg0",
++ NULL,
+ G_DBUS_SIGNAL_FLAGS_NONE,
+ test_connection_signal_handler,
+ &count_s4,
+@@ -637,7 +642,7 @@ test_connection_signals (void)
+ "org.gtk.GDBus.ExampleInterface", /* interface */
+ "FooArg0", /* member */
+ "/org/gtk/GDBus/ExampleInterface", /* path */
+- NULL,
++ "some-arg0",
+ G_DBUS_SIGNAL_FLAGS_NONE,
+ test_connection_signal_handler,
+ &count_s5,
+@@ -741,8 +746,8 @@ test_connection_signals (void)
+ g_assert_cmpint (count_s2, ==, 2);
+
+ /* Emit another signal on c2 with and without arg0 set, to check matching on that.
+- * Matching should fail on s4 when the signal is not emitted with an arg0. It
+- * should succeed on s5 both times, as that doesn’t require an arg0 match. */
++ * Matching should fail on s5 when the signal is not emitted with an arg0. It
++ * should succeed on s4 both times, as that doesn’t require an arg0 match. */
+ ret = g_dbus_connection_emit_signal (c2,
+ NULL, /* destination bus name */
+ "/org/gtk/GDBus/ExampleInterface",
+@@ -753,9 +758,9 @@ test_connection_signals (void)
+ g_assert_no_error (error);
+ g_assert_true (ret);
+
+- while (count_s5 < 1)
++ while (count_s4 < 1)
+ g_main_loop_run (loop);
+- g_assert_cmpint (count_s5, ==, 1);
++ g_assert_cmpint (count_s4, ==, 1);
+
+ ret = g_dbus_connection_emit_signal (c2,
+ NULL, /* destination bus name */
+@@ -767,10 +772,10 @@ test_connection_signals (void)
+ g_assert_no_error (error);
+ g_assert_true (ret);
+
+- while (count_s4 < 1)
++ while (count_s5 < 1)
+ g_main_loop_run (loop);
+- g_assert_cmpint (count_s4, ==, 1);
+- g_assert_cmpint (count_s5, ==, 2);
++ g_assert_cmpint (count_s4, ==, 2);
++ g_assert_cmpint (count_s5, ==, 1);
+
+ /*
+ * Also to check the total amount of NameOwnerChanged signals - use a 5 second ceiling
+@@ -784,8 +789,8 @@ test_connection_signals (void)
+ g_assert_cmpint (count_s1, ==, 1);
+ g_assert_cmpint (count_s2, ==, 2);
+ g_assert_cmpint (count_name_owner_changed, ==, 2);
+- g_assert_cmpint (count_s4, ==, 1);
+- g_assert_cmpint (count_s5, ==, 2);
++ g_assert_cmpint (count_s4, ==, 2);
++ g_assert_cmpint (count_s5, ==, 1);
+
+ g_dbus_connection_signal_unsubscribe (c1, s1);
+ g_dbus_connection_signal_unsubscribe (c1, s2);
+--
+2.44.0
+
diff --git a/glib2.spec b/glib2.spec
index 656f6b2..f3d67aa 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -18,6 +18,9 @@ Patch: default-terminal.patch
# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4049
Patch: gvariant-spec-installation.patch
+# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4044
+Patch: gdbusconnection-signal-order-test.patch
+
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gettext
reply other threads:[~2026-08-11 10:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178644469526.1.6949526408348873365.rpms-glib2-fd3d3cab41c6@fedoraproject.org \
--to=mcatanzaro@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox