fwts snap: missing hint that --devmode is needed to access ACPI tables

Bug #2045910 reported by Heinrich Schuchardt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fwts (Ubuntu)
Fix Released
High
Ivan Hu

Bug Description

I am running the fwts V23.11.00 2023-11-29 (909) on a RISC-V Ubuntu Mantic as root in directory /root.

acpidump shows several tables:

# acpidump | grep '^\S'
MCFG @ 0x0000000000000000
APIC @ 0x0000000000000000
DSDT @ 0x0000000000000000
FACP @ 0x0000000000000000
RHCT @ 0x0000000000000000

/snap/bin/fwts -a results in

acpidump: Dump ACPI tables.
--------------------------------------------------------------------------------
Test 1 of 1: Dump ACPI tables.
Cannot find any ACPI tables.

When I use the deb package with /usr/bin/fwts -a

acpidump: Dump ACPI tables.
--------------------------------------------------------------------------------
Test 1 of 1: Dump ACPI tables.
APIC @ bff00000 (672 bytes) (loaded from file)
----
[000h 0000 004h] Signature : "APIC" [Multiple APIC Description Table (MADT)]
[004h 0004 004h] Table Length : 000002A0
[008h 0008 001h] Revision : 06
[009h 0009 001h] Checksum : DC

Shouldn't the snap be able to access the same tables?

Revision history for this message
Colin Ian King (colin-king) wrote (last edit ):

I believe to access the tables the snap version of fwts needs to be install using the --devmode snap install option.

Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

Hello Colin,

thanks for the hint. Installing snap fwts with --devmode resolves the issue.

We should add this information to the text displayed by snap info fwts and write a similar hint into results.log if reading ACPI tables fails. Environment variable $SNAP could be used to detect that fwts is running as snap.

Best regards

Heinrich

summary: - fwts snap: cannot find any ACPI tables
+ fwts snap: missing hint that --devmode is needed to access ACPI tables
Revision history for this message
Ivan Hu (ivan.hu) wrote (last edit ):

Hi Heinrich,

Please refer to fwts wiki, https://wiki.ubuntu.com/FirmwareTestSuite

I had added the install in devmode for fwts snap on this Tuesday.

Revision history for this message
Heinrich Schuchardt (xypron) wrote (last edit ):

Hello Ivan,

thanks for adding that bit to the wiki.

A user looking at https://snapcraft.io/fwts or running snap info fwts cannot be expected to know that the wiki exists and that --devmode is essential.

Wouldn't it be a more user friendly approach to set confinement=classic in snapcraft.yaml instead of relying on users knowing about the devmode switch? Cf. https://snapcraft.io/docs/snap-confinement.

Best regards

Heinrich

Revision history for this message
Colin Ian King (colin-king) wrote :

Historical context:

The original snap issue was that there were a limited set of snap interfaces allowing access to various ACPI tables and system related data, so --devmode was the only solution. The interfaces may have improved since the original snapcraft yaml file was created, so classic mode may be (eventually) doable. I implemented the original snapcraft file, but I left Canonical 2+ years ago, so I've not kept up to date with the support of snap interfaces.

Revision history for this message
Colin Ian King (colin-king) wrote :
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

"confinement: devmode" can be specified in snapcraft.yaml.

Revision history for this message
Colin Ian King (colin-king) wrote :

I'll leave that to the fwts maintainer to fix and update :-)

Ivan Hu (ivan.hu)
Changed in fwts (Ubuntu):
assignee: nobody → Ivan Hu (ivan.hu)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Ivan Hu (ivan.hu) wrote :
Changed in fwts (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Ivan Hu (ivan.hu) wrote :

Released in fwts 24.01.00

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