efi_resource command returns unexpected strings making the EFI parser results totally wrong

Bug #1269807 reported by Sylvain Pineau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Resource
Fix Released
Medium
Unassigned

Bug Description

$ /usr/share/checkbox/scripts/efi_resource
path: /sys/class/dmi/id/bios_version
category: EFI
product: Lenovo
vendor: /var/log/kern.log:EFI v2.31

path: /sys/class/dmi/id/bios_version
category: EFI
product: Lenovo
vendor: /var/log/kern.log.1:EFI v2.31

==============================

Expected result:
path: /sys/class/dmi/id/bios_version
category: EFI
product: EFI v2.31
vendor: Lenovo

Tags: job

Related branches

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

First thing to fix is the command used by efi_resource:

-COMMAND = "[ -d /sys/firmware/efi ] && cat /var/log/kern.log* | grep -m 1 -o --color=never 'EFI v.*' || true"
+COMMAND = "[ -d /sys/firmware/efi ] && grep -m 1 -o --color=never 'EFI v.*' /var/log/kern.log* || true"

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

And the parser also has to be fixed in order to return product and vendor in the right order:

- r"^(?P<vendor>.*)\s+by\s+(?P<product>.*)$")
+ r"^(?P<product>.*)\s+by\s+(?P<vendor>.*)$")

Changed in checkbox:
importance: Undecided → Medium
status: New → Triaged
Daniel Manrique (roadmr)
tags: added: job
Zygmunt Krynicki (zyga)
affects: checkbox → plainbox-provider-resource
Ashley Lai (alai)
Changed in plainbox-provider-resource:
assignee: nobody → ashley (alai)
Ashley Lai (alai)
Changed in plainbox-provider-resource:
status: Triaged → In Progress
Changed in plainbox-provider-resource:
milestone: none → 0.6
Changed in plainbox-provider-resource:
milestone: 0.6 → 0.7
Revision history for this message
Daniel Manrique (roadmr) wrote :

OK, this is already fixed in trunk, thanks!

Changed in plainbox-provider-resource:
status: In Progress → Fix Committed
assignee: ashley (alai) → nobody
Daniel Manrique (roadmr)
Changed in plainbox-provider-resource:
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.