udev_resource script fails to parse device properties on kvm

Bug #556824 reported by Marc Tardif
12
This bug affects 1 person
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 the udev_resource script fails to run, then some tests never get run and no hardware information is submitted to Launchpad. This fix simply adds support for periods (.) sometimes generated in the udevadm output.

The udev_resource script fails to parse device properties on some configurations of kvm. The following backtrace is generated:

Traceback (most recent call last):
  File "/usr/share/checkbox/scripts/udev_resource", line 544, in <module>
    sys.exit(main())
  File "/usr/share/checkbox/scripts/udev_resource", line 531, in main
    for device in udev.devices:
  File "/usr/share/checkbox/scripts/udev_resource", line 504, in devices
    "Device property not supported: %s" % value
Exception: Device property not supported: ID_INPUT.tags=vmmouse

Related branches

Revision history for this message
Marc Tardif (cr3) wrote :

The problem is that the udev_resource script assumes that the property names strictly consist of words (\w):

  multi_pattern = re.compile(r"(?P<key>\w+)=(?P<value>.*)")

Changed in checkbox:
assignee: nobody → Marc Tardif (cr3)
status: New → Confirmed
status: Confirmed → Fix Committed
Marc Tardif (cr3)
Changed in checkbox:
status: Fix Committed → Fix Released
Marc Tardif (cr3)
Changed in checkbox (Ubuntu):
status: New → Fix Released
Changed in checkbox (Ubuntu Lucid):
milestone: none → lucid-updates
status: New → In Progress
Changed in checkbox (Ubuntu):
assignee: nobody → Marc Tardif (cr3)
Marc Tardif (cr3)
description: updated
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:
Checkbox revision 783 changes udev_resource script to be more resilient, using a regexp that takes everything before the "=" as a property name, thus allowing dots and other extraneous characters as property names.

TEST CASE:
1 - Install KVM and related packages:
 https://help.ubuntu.com/community/KVM/Installation
2- Obtain a Lucid ISO image
3- Boot KVM using the Lucid ISO image:
  sudo kvm -vga vmware -m 512 -smp 1 -cdrom ubuntu-10.04.2-desktop-i386.iso -boot once=d
4- Choose to "Try Ubuntu without installing"
5- Once on the Desktop, launch System Testing
6- Perform a test run (all tests can be disabled in the selection screen)

Notice that a trace appears in /var/crash/_usr_share_checkbox_scripts_udev_resource.999.crash

Regression potential:
Since the initial assumption was that udev property names cannot contain non-word characters, and with this change they potentially can, there could be a regression if some other parts of the code expect udev property names to not contain dots or other extraneous characters. However none of the code changes since this fix was introduced are related to strange characters in udev property names, so this fix apparently doesn't cause any problems higher up in the process.

Revision history for this message
Ara Pulido (ara) wrote :

This bug is awaiting verification that the checkbox version in lucid-proposed solves the problem. Please test checkbox and update this bug with the results. If the problem is solved, change the tag 'verification-needed' to 'verification-done'.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Marc, or anyone else affected,

Accepted checkbox into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in checkbox (Ubuntu Lucid):
status: In Progress → Fix Committed
Revision history for this message
Chad A Davis (chadadavis) wrote :

Verified fix from checkbox 0.9.2 on Lucid in kvm.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package checkbox - 0.9.2

---------------
checkbox (0.9.2) lucid-proposed; urgency=low

  New upstream release (LP: #567568):
  * Added referer when sending submissions to Launchpad (LP: #550973)
  * Added suggests to checkbox package in debian/control file (LP: #352740)
  * Fixed udev_resource script to be more resilient (LP: #556824)
  * Fixed cdimage_resource script to read casper.log (LP: #558728)
  * Fixed reporting all resources found for a job (LP: #560948)
  * Fixed stalling when using kdesudo to start backend (LP: #557443)
  * Fixed starting the appropriate default browser on UNR (LP: #563050)
  * Fixed opening the report with the gconf preferred browser (LP: #562580)
  * Fixed suspend_test to use relative time for wakealarm (LP: #349768)
  * Fixed backend not getting terminated upon closing (LP: #553328)
 -- Daniel Manrique <email address hidden> Wed, 22 Jun 2011 14:18:08 -0400

Changed in checkbox (Ubuntu Lucid):
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.