--ignore-return may cause processes to exit prematurely

Bug #1053168 reported by Charles Kerr
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DBus Test Runner
Fix Released
Medium
Ted Gould

Bug Description

I don't think that http://bazaar.launchpad.net/~indicator-applet-developers/dbus-test-runner/trunk.12.10/revision/39.1.46 is correct.

Ignore-return is for a task to always pass regardless of its return value, and that's how dbus_test_task_passed() uses it.

But all_tasks_finished_helper() probably shouldn't look at it. If the last task(s) running are ignore-return, they'll be killed prematurely when all_tasks_finished_helper() leaves 'all_finished' as TRUE s.t. dbus_test_service_run() exits. This doesn't seem desirable and I'm not sure what 39.1.46 is for.

Found by dbusmenu's test-json exiting prematurely because all of its tasks were ignore-return. On my machine, test-json-server was exiting before test-json-client even started. Sometimes. Or not. Depending on timing issues, the phase of the moon, and the polarity of the neutron flow.

Related branches

Charles Kerr (charlesk)
description: updated
Revision history for this message
Ted Gould (ted) wrote :

The idea was that if a task doesn't have results we care about, don't block on it. This could be used for things like mock services wouldn't have a explicit kill, but when the test is complete should be torn down.

Changed in dbus-test-runner:
status: New → Incomplete
Revision history for this message
Charles Kerr (charlesk) wrote :

That doesn't handle the case where we care about some task output other than its exit() value, such as test-json-client generating an output text file.

I've handled the test-json case by removing the ignore-return param there.

ignore-return feels like two features pushed into one, but maybe the test-json-client case is rare enough that it doesn't matter. Feel free to Invalid if you like.

Ted Gould (ted)
Changed in dbus-test-runner:
status: Incomplete → In Progress
assignee: nobody → Ted Gould (ted)
Changed in dbus-test-runner:
status: In Progress → Fix Committed
Charles Kerr (charlesk)
Changed in dbus-test-runner:
milestone: none → 12.10.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.