Merge lp://qastaging/~larsu/dbus-test-runner/fix-test-race into lp://qastaging/dbus-test-runner/15.10

Proposed by Lars Karlitski
Status: Merged
Approved by: Iain Lane
Approved revision: 96
Merged at revision: 96
Proposed branch: lp://qastaging/~larsu/dbus-test-runner/fix-test-race
Merge into: lp://qastaging/dbus-test-runner/15.10
Diff against target: 65 lines (+22/-3)
2 files modified
tests/Makefile.am (+2/-2)
tests/test-own-name.c (+20/-1)
To merge this branch: bzr merge lp://qastaging/~larsu/dbus-test-runner/fix-test-race
Reviewer Review Type Date Requested Status
Iain Lane Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+270488@code.qastaging.launchpad.net

Commit message

test-param-wait-system: fix race between tasks

Calling RequestName with gdbus-tool to signal the tested binary that a name is owned is racy: since the name is only owned very shortly, the watch might not have been established before the name is already gone again.

Fix this by holding on to the name a bit longer with the test-own-name helper (add a --system flag to that). A better fix would be to only start the second task when the watch has been established. dbus-test-runner always starts tasks in parallel though and changing this would further complicate its command line interface.

Description of the change

test-param-wait-system: fix race between tasks

Calling RequestName with gdbus-tool to signal the tested binary that a name is owned is racy: since the name is only owned very shortly, the watch might not have been established before the name is already gone again.

Fix this by holding on to the name a bit longer with the test-own-name helper (add a --system flag to that). A better fix would be to only start the second task when the watch has been established. dbus-test-runner always starts tasks in parallel though and changing this would further complicate its command line interface.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Iain Lane (laney) wrote :

thanks, let's upload this!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches