Checkbox only reports the first resource found for a job requirement
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
Undecided
|
Marc Tardif | ||
checkbox (Ubuntu) |
Fix Released
|
Undecided
|
Marc Tardif | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The impact of this bug is that when test results are reported, partial device information might be linked to the results. This fix makes sure that all related devices are properly linked to the test results.
Checkbox uses job requirements in order to link resources to results. For example, the following requirement should like a result to all the network devices found on the system:
device.category == 'NETWORK'
So, if there are two network devices, such as an ethernet and a wireless controller, then these should be linked to the result. However, the checkbox.resource module seems to bail as soon as the first resource is found.
Note that the requirements assessment is still correct, whether to run a job or not. However, the details of the requirements are simply missing information.
Related branches
- Mathias Gug: Needs Fixing
-
Diff: 822 lines (+253/-247)20 files modifiedbackend (+12/-3)
checkbox/job.py (+1/-1)
checkbox/resource.py (+3/-2)
checkbox/user_interface.py (+7/-2)
debian/changelog (+17/-0)
debian/control (+1/-0)
jobs/disk.txt.in (+1/-2)
jobs/local.txt.in (+1/-1)
jobs/resource.txt.in (+1/-0)
plugins/backend_info.py (+15/-17)
plugins/begin_prompt.py (+33/-0)
plugins/launchpad_exchange.py (+2/-1)
plugins/persist_info.py (+2/-2)
po/checkbox.pot (+10/-10)
scripts/ansi_parser (+2/-1)
scripts/device_list (+0/-168)
scripts/disk_test (+0/-33)
scripts/run_templates (+142/-0)
scripts/suspend_test (+2/-3)
scripts/udev_resource (+1/-1)
- Stéphane Graber: Approve
-
Diff: 807 lines (+250/-246)19 files modifiedbackend (+12/-3)
checkbox/job.py (+1/-1)
checkbox/resource.py (+3/-2)
checkbox/user_interface.py (+7/-2)
debian/changelog (+16/-0)
debian/control (+1/-0)
jobs/disk.txt.in (+1/-2)
jobs/local.txt.in (+1/-1)
jobs/resource.txt.in (+1/-0)
plugins/backend_info.py (+15/-17)
plugins/begin_prompt.py (+33/-0)
plugins/launchpad_exchange.py (+2/-1)
plugins/persist_info.py (+2/-2)
po/checkbox.pot (+10/-10)
scripts/device_list (+0/-168)
scripts/disk_test (+0/-33)
scripts/run_templates (+142/-0)
scripts/suspend_test (+2/-3)
scripts/udev_resource (+1/-1)
Changed in checkbox: | |
assignee: | nobody → Marc Tardif (cr3) |
status: | New → In Progress |
status: | In Progress → Fix Committed |
Changed in checkbox: | |
status: | Fix Committed → Fix Released |
Changed in checkbox (Ubuntu Lucid): | |
status: | New → In Progress |
milestone: | none → lucid-updates |
Changed in checkbox (Ubuntu): | |
status: | New → Fix Released |
assignee: | nobody → Marc Tardif (cr3) |
description: | updated |
Hello, the following information should complete this bug as a valid SRU report, to hopefully upload this fix to Lucid.
Solution:
Checbox revision 786 adds code to ensure that all related devices are properly linked to the test results.
TEST CASE:
We need to be tricky when running this test case, as checkbox 0.9.1 doesn't log detailed information about each test that we can access after a test run.
1- Launch System Testing on a system with Ubuntu 10.04 and two network controllers (eth0 and eth1 for instance). A virtual machine with two interfaces works fine for this test.
2- On the test selection screen, press "Deselect All", then expand "Network tests" and select only "network_test". Press Next.
3- When the test runs, confirm that it detected both network controllers. DO NOT PRESS NEXT.
4- Here's the tricky part: close checkbox by pressing the X on the top left corner. This forces it to log an exception for the execution interruption, and in this case it *does* log the information we need.
Now look at the log file (~/.cache/ checkbox/ checkbox. log), near the end there's a log line starting with ERROR.
Without the fix:
Keyboard interrupt while running event handler None.ManualTest .prompt_ manual( ) for event type 'prompt-manua gtk.gtk_ interface. GTKInterface object at 0xb7701eec>, {'status': 'uninitiated', 'description': u'Detecting your netw s):\n\n$ output\ n\nIs this correct?', 'plugin': 'manual', 'requires': ["device.category == 'NETWORK'"], 'command': 'network_te pci0000: 00/0000: 00:03.0' , 'subvendor_id': '32902'}], 'name': 'network_test'}) {}.
l' with args (<checkbox_
ork controller(
st', 'suite': 'network', 'type': 'test', 'resources': [{'category': 'NETWORK', 'subproduct_id': '30', 'product_id': '4110', 'bus': 'pci', 'v
endor_id': '32902', 'driver': 'e1000', 'path': '/devices/
With the fix:
Keyboard interrupt while running event handler None.ManualTest .prompt_ manual( ) for event type 'prompt-manual' with args (<checkbox_ gtk.gtk_ interface. GTKInterface object at 0xb76b9eec>, {'status': 'uninitiated', 'description': u'Detecting your network controller( s):\n\n$ output\ n\nIs this correct?', 'plugin': 'manual', 'requires': ["device.category == 'NETWORK'"], 'command': 'network_test', 'suite': 'network', 'type': 'test', 'resources': [{'category': 'NETWORK', 'subproduct_id': '30', 'product_id': '4110', 'bus': 'pci', 'vendor_id': '32902', 'driver': 'e1000', 'path': '/devices/ pci0000: 00/0000: 00:03.0' , 'subvendor_id': '32902'}, {'category': 'NETWORK', 'subproduct_id': '30', 'product_id': '4110', 'bus': 'pci', 'vendor_id': '32902', 'driver': 'e1000', 'path': '/devices/ pci0000: 00/0000: 00:08.0' , 'subvendor_id': '32902'}], 'name': 'network_test'}) {}.
Notice how the resources array contains data for the two network cards with the fixed code, whereas the un-fixed version only shows the first card.
Regression potential:
The logic changes in themselves are quite harmless. They will potentially return larger sets of data, so if other parts of checkbox aren't ready to deal with this data, that might entail failures where there were previously none. However this hasn't happened in real-world usage of this code, and no subsequent bug fixes are related to r...