Skip to content

Fixes for test-autolaunch-win

Simon McVittie requested to merge smcv/dbus:autolaunch-win into master
  • test-autolaunch-win: Don't overwrite an error with another error

    An unrelated branch (!209 (merged)) 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.

  • test-autolaunch-win: Remove redundant check for ERROR message

    This seems to have been intended to give a more specific error message if the method call failed, but it will not have been effective, because dbus_connection_send_with_reply_and_block() ends with a check for ERROR messages using dbus_set_error_from_message(). This means that if the reply was an ERROR message, it will already have been converted into a DBusError by the time call_method() regains control.

Merge request reports