resource expression "device.category == 'CARDREADER'" evaluates to false

Bug #1334224 reported by Taihsiang Ho
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
High
Taihsiang Ho
HEXR
Fix Released
High
Unassigned

Bug Description

A SRU automation test skipped this device and showed
job cannot be started: resource expression "device.category == 'CARDREADER'" evaluates to false
(from this URL: https://certification.canonical.com/hardware/201009-6503/submission/99415/)

However the machine does has this device and manual test of the device shows it is working.

Steps to reproduce this bug:
1. launch_testrun 12.04.1 desktop -p --plainbox --ppa=stable 201009-6503
2. wait for the automatic installation and testing
3. check the result of the URL above.

Expected result:
SD test is automatically tested.

Actual result:
SD test is skipped.

-- more information --

$ uname -a
Linux 201009-6503 3.2.0-65-generic #98-Ubuntu SMP Wed Jun 11 20:27:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ dpkg -l | grep -E 'checkbox|plainbox|certification'
ii canonical-certification-client 0.1~ppa~ubuntu12.04.1 Client Certification Launcher
ii checkbox 0.17.9.1~ubuntu12.04.1 System testing application
ii checkbox-autostart-desktop 0.1+bzr3093+pkg1~ubuntu12.04.1 Automatic system testing for desktop systems
ii checkbox-gui 0.18~ppa~ubuntu12.04.1 QML based interface for system testing based on PlainBox.
ii checkbox-ng 0.4~ppa~ubuntu12.04.1 PlainBox based test runner
ii checkbox-ng-service 0.4~ppa~ubuntu12.04.1 CheckBox D-Bus service
ii checkbox-qt 0.17.9.1~ubuntu12.04.1 QT4 interface for checkbox
ii plainbox-insecure-policy 0.6~ppa~ubuntu12.04.1 policykit policy required to use plainbox (insecure version)
ii plainbox-provider-certification-client 0.1~ppa~ubuntu12.04.1 Client Certification
ii plainbox-provider-checkbox 0.5~ppa~ubuntu12.04.1 CheckBox provider for PlainBox
ii plainbox-provider-resource-generic 0.4~ppa~ubuntu12.04.1 CheckBox generic resource jobs provider
ii python3-checkbox 0.17.9.1~ubuntu12.04.1 CheckBox python3 library
ii python3-checkbox-ng 0.4~ppa~ubuntu12.04.1 PlainBox based test runner (Python 3 library)
ii python3-checkbox-support 0.3~ppa~ubuntu12.04.1 collection of Python modules used by PlainBox providers
ii python3-plainbox 0.6~ppa~ubuntu12.04.1 toolkit for software and hardware testing (python3 module)

Related branches

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

Hi, can you please run this command?

udevadm info --export-db > udev-1334224.txt

then attach udev-1334224.txt to this bug. I'll run it through the parser and see which devices it's recognizing.

It may be identifying the card reader as a disk device of some sort.

Changed in plainbox-provider-checkbox:
status: New → Incomplete
Revision history for this message
Taihsiang Ho (tai271828) wrote :

udevadm info --export-db > udev-1334224.txt

Revision history for this message
Taihsiang Ho (tai271828) wrote :

I also attached the output by the following command:

1. udevadm monitor --property > udevadm-monitor--property.txt
2. physically eject the SD card
3. re plug-in the SD card

I think this may help you to identify which device are the SD cardreader in this case.

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

OK, here's the device:

path: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0
bus: usb
category: USB
driver: usb-storage
product_id: 25446
vendor_id: 1423

path: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/host8/target8:0:0/8:0:0:0
bus: scsi
category: DISK
driver: sd
product: Mass Storage Device
vendor: Generic

path: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/host8/target8:0:0/8:0:0:0
bus: scsi
category: DISK
driver: sd
product: Card Reader
vendor: Multiple

Indeed it's not identified as a card reader, that's why the test was skipped.

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

What's interesting is that the device is presented as a USB storage device, which is why it's always identified as a disk. Can you tell me whether the icon when you insert a card looks like a card, or like a usb stick?

the USB stick icon is this: https://lh4.googleusercontent.com/_1QSDkzYY2vc/Tbcd2N9QLFI/AAAAAAAAEH0/XhJJKJ9UPCo/mounted-media-unity-launcher.png

We could maybe look at the ID_MODEL to determine if it's a card reader:
ID_MODEL=Card_Reader
ID_MODEL_ENC=Card\x20\x20Reader\x20\x20\x20\x20

I'll wait for your information, then I'll look into making this change in the parser.

Changed in plainbox-provider-checkbox:
status: Incomplete → Confirmed
importance: Undecided → High
milestone: none → 0.9
Revision history for this message
Taihsiang Ho (tai271828) wrote :

The icon looks like an usb stick.

By the way,
if I plug-in a USB 2.0 stick, the icon popped up as an usb external disk.
The usb external disk icon looks like
http://i.stack.imgur.com/wnmCj.png

Taihsiang Ho (tai271828)
Changed in plainbox-provider-checkbox:
assignee: nobody → Taihsiang Ho (taihsiangho)
status: Confirmed → In Progress
Taihsiang Ho (tai271828)
Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
Revision history for this message
Taihsiang Ho (tai271828) wrote :

201201-10399 with the card reader 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
has the same issue.

Changed in plainbox-provider-checkbox:
status: Fix Committed → In Progress
Daniel Manrique (roadmr)
Changed in plainbox-provider-checkbox:
status: In Progress → Fix Released
Revision history for this message
Daniel Manrique (roadmr) wrote :

On HEXR/c3, this bug is apparent because the "Multiple: Card Reader" device is shown with no category. After upgrading the parser, the device is correctly marked as CARDREADER in staging when uploading the offending submission.

Observe:

https://certification.canonical.com/hardware/201009-6503/submission/99415/devices/?page=4

https://certification.staging.canonical.com/hardware/201112-10259/submission/96862/devices/?page=4

Compare the third device's category and rejoice.

Changed in hexr:
status: New → Fix Committed
importance: Undecided → High
milestone: none → 2014.10.2
James Jesudason (jamesj)
Changed in hexr:
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

Related blueprints

Remote bug watches

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