udev_resource script fails to parse device properties on kvm

Bug #556824 reported by Marc Tardif on 2010-04-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Marc Tardif
checkbox (Ubuntu)
Marc Tardif

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>
  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

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) on 2010-06-10
Changed in checkbox:
status: Fix Committed → Fix Released
Marc Tardif (cr3) on 2010-06-10
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) on 2010-06-10
description: updated
Daniel Manrique (roadmr) wrote :

Hello, the following information should complete this bug as a valid SRU report, to hopefully upload this fix to Lucid.

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.

1 - Install KVM and related packages:
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.

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

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
Chad A. Davis (chadadavis) wrote :

Verified fix from checkbox 0.9.2 on Lucid in kvm.

Martin Pitt (pitti) on 2011-07-21
tags: added: verification-done
removed: verification-needed
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  Edit
Everyone can see this information.

Other bug subscribers