Bug 99999

Summary: Typo fixes to sd-activation test
Product: dbus Reporter: Philip Withnall <bugzilla>
Component: coreAssignee: D-Bus Maintainers <dbus>
Status: RESOLVED FIXED QA Contact: D-Bus Maintainers <dbus>
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard: review+
i915 platform: i915 features:
Attachments: test: Fix copy-paste error in waiting for a message in the tests
test: Remove an unnecessary NULL check in sd-activation

Description Philip Withnall 2017-02-28 09:08:21 UTC
Two trivial patches attached, courtesy of Coverity.

(Are these the first reports it’s produced for non-pre-existing issues?)

(If it’s of interest, Coverity produced four reports for the sd-activation changes: two were false positives where it detected infinite loops which weren’t actually infinite due to callbacks in the main context; and these two.)
Comment 1 Philip Withnall 2017-02-28 09:08:24 UTC
Created attachment 129975 [details] [review]
test: Fix copy-paste error in waiting for a message in the tests

The parameters to the test_pending_call_store_reply() call should match
those to the dbus_pending_call_set_notify() immediately after.

Coverity ID: 141876

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 2 Philip Withnall 2017-02-28 09:08:27 UTC
Created attachment 129976 [details] [review]
test: Remove an unnecessary NULL check in sd-activation

test_transient_services() was checking whether (config == NULL), then
shortly afterwards dereferencing config->bus_name (which is in fact
dereferenced on all branches of the function). Remove the check and add
some assertions to ensure a Config struct is always passed into the test
(which it currently is).

Coverity ID: 141877

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 3 Philip Withnall 2017-02-28 09:10:24 UTC
(Also, bug #99999, woohoo!)
Comment 4 Simon McVittie 2017-02-28 11:44:49 UTC
Comment on attachment 129975 [details] [review]
test: Fix copy-paste error in waiting for a message in the tests

Review of attachment 129975 [details] [review]:
-----------------------------------------------------------------

Looks good
Comment 5 Simon McVittie 2017-02-28 11:45:19 UTC
Comment on attachment 129976 [details] [review]
test: Remove an unnecessary NULL check in sd-activation

Review of attachment 129976 [details] [review]:
-----------------------------------------------------------------

Looks fine
Comment 6 Simon McVittie 2017-03-20 15:11:13 UTC
Fixed in git for 1.11.12. Let's see what Coverity thinks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.