Comment 1 for bug 560948

Revision history for this message
Daniel Manrique (roadmr) wrote :

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
l' with args (<checkbox_gtk.gtk_interface.GTKInterface object at 0xb7701eec>, {'status': 'uninitiated', 'description': u'Detecting your netw
ork controller(s):\n\n$output\n\nIs this correct?', 'plugin': 'manual', 'requires': ["device.category == 'NETWORK'"], 'command': 'network_te
st', 'suite': 'network', 'type': 'test', 'resources': [{'category': 'NETWORK', 'subproduct_id': '30', 'product_id': '4110', 'bus': 'pci', 'v
endor_id': '32902', 'driver': 'e1000', 'path': '/devices/pci0000:00/0000:00:03.0', 'subvendor_id': '32902'}], 'name': 'network_test'}) {}.

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 resource data that is too big. Looks like the rest of the code always assumed resources to be a list, however resources.py only returned one-element lists, so everything else should generically handle lists without problems.