From: Simon McVittie Date: Tue, 11 Oct 2022 17:36:00 +0000 (+0100) Subject: test-autolaunch-win: Don't overwrite an error with another error X-Git-Tag: dbus-1.15.4~31^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7bbff5baf1a9b9c64d7b92bfbef5406ebbdd710;p=thirdparty%2Fdbus.git test-autolaunch-win: Don't overwrite an error with another error An unrelated branch failed CI with this assertion failure: 26: dbus[6768]: error: arguments to dbus_set_error() were incorrect, assertion "(error) == NULL || !dbus_error_is_set ((error))" failed in file ...\dbus-errors.c line 365. Looking at the test, this seems to be the most likely candidate for this bug in error handling, which is masking whatever the real cause for the failure was (we can't tell from here). If dbus_connection_send_with_reply_and_block() returns NULL, then it should already have set the error. Fixing this bug in the error handling will hopefully give us a better error message for the actual failure if it happens again. Signed-off-by: Simon McVittie --- diff --git a/test/name-test/test-autolaunch-win.c b/test/name-test/test-autolaunch-win.c index 8a434e2ca..e5e0da7f3 100644 --- a/test/name-test/test-autolaunch-win.c +++ b/test/name-test/test-autolaunch-win.c @@ -71,7 +71,6 @@ call_method (DBusConnection *conn, dbus_message_unref (method); if (reply == NULL) { - dbus_set_error (error, DBUS_ERROR_FAILED, "Got no reply"); result = FALSE; goto out; }