scripts/memory_compare fails on arm due to lack of dmidecode

Bug #1184661 reported by Daniel Manrique
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
Medium
Brendan Donegan

Bug Description

$ sudo /usr/share/checkbox/scripts/memory_compare
/bin/sh: 1: dmidecode: not found
Results:
 /proc/meminfo reports: 4233412608 kB
 dmi reports: 0 kB

FAIL: Either dmi or /proc/meminfo returned a memory size of 0 kB

This script uses dmi information to try to determine the installed memory size, and automatically determine if this matches what the kernel sees. Absence of dmidecode on arm means this fails miserably.

I found a possible alternative in dmesg:

[ 0.000000] Memory: 4089MB = 4089MB total
[ 0.000000] Memory: 4115372k/4115372k available, 71764k reserved, 3408896K highmem

The first line is NOT present on x86 kernels, but here on arm it seems to give a good indication of the installed memory total.

Possibilities:
- Finding an equivalent to dmidecode information on arm, and having the script use that if dmidecode is unavailable.
- Parse for the first "Memory" line in dmesg and use that, if dmidecode is unavailable.
- Failing everything else, maybe just reporting installed memory total and a message indicating that automated validation couldn't be performed. This is more or less what the script does right now, says "I couldn't do it" and flags the test as failed to bring to a human's attention.

Related branches

Daniel Manrique (roadmr)
Changed in checkbox:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

lshw has come to the forefront as one possibility

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

hyperscale team have confirmed lshw is suitable for use - I'm trying to write a parser for that so we can use it in the memory_compare script

Changed in checkbox:
status: Triaged → In Progress
assignee: nobody → Brendan Donegan (brendan-donegan)
Daniel Manrique (roadmr)
Changed in checkbox:
status: In Progress → Fix Committed
Daniel Manrique (roadmr)
Changed in checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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