summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2020-12-18 14:43:35 +0000
committerSteve Sakoman <steve@sakoman.com>2021-01-04 04:50:23 -1000
commita4339b1c958b736be951ae3142e6be72702ecad2 (patch)
treebc80f8020a1e5f524dd792d6b99a2c04fd70e481
parent0e0b43bf902963677c03b8e3ce7b976ae81158ae (diff)
downloadopenembedded-core-a4339b1c958b736be951ae3142e6be72702ecad2.tar.gz
openembedded-core-a4339b1c958b736be951ae3142e6be72702ecad2.tar.bz2
openembedded-core-a4339b1c958b736be951ae3142e6be72702ecad2.zip
lib/oe/qa: handle the 'no specific instruction set' ELF e_machine value
[RP: Update OEQA selftest to match change] Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b7cfc0f51cc0b4866f913f6eae4fcc6f72d2578c) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/lib/oe/qa.py1
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/elf.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index ea831b930a..e8a854a302 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -156,6 +156,7 @@ def elf_machine_to_string(machine):
"""
try:
return {
+ 0x00: "Unset",
0x02: "SPARC",
0x03: "x86",
0x08: "MIPS",
diff --git a/meta/lib/oeqa/selftest/cases/oelib/elf.py b/meta/lib/oeqa/selftest/cases/oelib/elf.py
index d0a28090f2..5a5f9b4fdf 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/elf.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/elf.py
@@ -21,6 +21,6 @@ class TestElf(TestCase):
self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
self.assertEqual(oe.qa.elf_machine_to_string(0xF7), "BPF")
- self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown (0)")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unset")
self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)")
self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown ('foobar')")