scripts/memory_compare fails on arm due to lack of dmidecode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
Medium
|
Brendan Donegan |
Bug Description
$ sudo /usr/share/
/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
- Jeff Lane : Approve
-
Diff: 114 lines (+43/-20)3 files modifiedcheckbox-old/checkbox/parsers/lshwjson.py (+23/-0)
checkbox-old/debian/changelog (+3/-0)
checkbox-old/scripts/memory_compare (+17/-20)
Changed in checkbox: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in checkbox: | |
status: | Triaged → In Progress |
assignee: | nobody → Brendan Donegan (brendan-donegan) |
Changed in checkbox: | |
status: | In Progress → Fix Committed |
Changed in checkbox: | |
status: | Fix Committed → Fix Released |
lshw has come to the forefront as one possibility