! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfconf tests: xfconf_tests_start() is not checking Ping reply correctly
Status:
RESOLVED: FIXED

Comments

Description Michał Górny 2019-06-17 10:20:33 CEST
The xfconf_tests_start() function is issuing Ping method call in order to determine whether xfconfd has started. However, it wrongly assumes that the method call with fail if xfconfd is not running. In reality, D-Bus will issue an 'error' response. The test code should check for that response in order to correctly report missing xfconfd.

If I add g_dbus_message_print() to the code, I see that ret contains the following:

    Type:    error
    Flags:   no-reply-expected
    Version: 0
    Serial:  3
    Headers:
      error-name -> 'org.freedesktop.DBus.Error.ServiceUnknown'
      reply-serial -> uint32 2
      destination -> ':1.41'
      sender -> 'org.freedesktop.DBus'
      signature -> signature 's'
    Body: ('The name org.xfce.Xfconf was not provided by any .service files',)
    UNIX File Descriptors:
      (none)

For comparison, if xfconfd is started correctly, it contains:

    Type:    method-return
    Flags:   no-reply-expected
    Version: 0
    Serial:  301
    Headers:
      reply-serial -> uint32 2
      destination -> ':1.128'
      sender -> ':1.5'
    Body: ()
    UNIX File Descriptors:
      (none)

I'll attach a patch in a few minutes.
Comment 1 Michał Górny 2019-06-17 10:33:07 CEST
Created attachment 8640 
0001-tests-Explicitly-handle-error-reply-from-Ping-method.patch

This patch adds explicit check for non-method-return messages, and fails tests with explicit error message when it happens.
Comment 2 Git Bot editbugs 2019-06-20 18:01:00 CEST
Michał Górny referenced this bugreport in commit b4bed38222aa0c389b6ded430bcdfade27e77f73

tests: Explicitly handle error reply from Ping method call

https://git.xfce.org/xfce/xfconf/commit?id=b4bed38222aa0c389b6ded430bcdfade27e77f73
Comment 3 Skunnyk editbugs 2019-06-20 18:42:09 CEST
Thank you !

Bug #15616

Reported by:
Michał Górny
Reported on: 2019-06-17
Last modified on: 2019-06-20

People

Assignee:
Xfce Bug Triage
CC List:
1 user

Version

Version:
GIT Master

Attachments

Additional information