summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2020-12-18 14:43:35 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-20 00:03:05 +0000
commit949646a9e9ec1de3878f6392e0f04075dd25c580 (patch)
treee4e477036231010aeda6f95d2f2d274c18756b1a
parent78164a53c86db825a9514069b3811d9814fb65f5 (diff)
downloadpoky-949646a9e9ec1de3878f6392e0f04075dd25c580.tar.gz
lib/oe/qa: handle the 'no specific instruction set' ELF e_machine value
[RP: Update OEQA selftest to match change] (From OE-Core rev: b7cfc0f51cc0b4866f913f6eae4fcc6f72d2578c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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):
156 """ 156 """
157 try: 157 try:
158 return { 158 return {
159 0x00: "Unset",
159 0x02: "SPARC", 160 0x02: "SPARC",
160 0x03: "x86", 161 0x03: "x86",
161 0x08: "MIPS", 162 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):
21 self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64") 21 self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
22 self.assertEqual(oe.qa.elf_machine_to_string(0xF7), "BPF") 22 self.assertEqual(oe.qa.elf_machine_to_string(0xF7), "BPF")
23 23
24 self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown (0)") 24 self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unset")
25 self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)") 25 self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)")
26 self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown ('foobar')") 26 self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown ('foobar')")