hardware: bios_version rework without dmidecode 84/3384/2
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 23 Apr 2020 17:45:39 +0000 (19:45 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 24 Apr 2020 12:59:51 +0000 (14:59 +0200)
Instead of relying on `dmidecode` for reading and parsing various
machine information that we test using the `hardware` layer testcases,
read and parse the same information directly from sysfs:
- product name by simply dumping:
  /sys/class/dmi/id/product_name
- BIOS revision number (not to be confused with BIOS version number
  which is already available via sysfs /sys/class/dmi/...) by parsing
  /sys/firmware/dmi/tables/DMI according to the SMBIOS Reference
  Specification [1];
This mechanism assumes the target nodes support SMBIOS.

While at it, relax the matching condition for disk device names in
`lsblk` output, as well as the number of processors expected in `lscpu`
output; make the block device name regexp configurable via a new
variable named `blk_dev_regexp` in tests/variables.yaml.

JIRA: VAL-76
JIRA: VAL-110

[1] https://www.dmtf.org/sites/default/files/standards/documents/
    DSP0134_2.7.1.pdf

Change-Id: Iaa3be16e7f56aa672304861c57c659f3cfb19f4e
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>

No differences found