Bug 99999 - Typo fixes to sd-activation test
Summary: Typo fixes to sd-activation test
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: D-Bus Maintainers
QA Contact: D-Bus Maintainers
URL:
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-02-28 09:08 UTC by Philip Withnall
Modified: 2017-03-20 15:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
test: Fix copy-paste error in waiting for a message in the tests (1.07 KB, patch)
2017-02-28 09:08 UTC, Philip Withnall
Details | Splinter Review
test: Remove an unnecessary NULL check in sd-activation (1.76 KB, patch)
2017-02-28 09:08 UTC, Philip Withnall
Details | Splinter Review

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.