]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/qa: handle the 'no specific instruction set' ELF e_machine value
authorRoss Burton <ross@burtonini.com>
Fri, 18 Dec 2020 14:43:35 +0000 (14:43 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 20 Dec 2020 00:03:01 +0000 (00:03 +0000)
[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>
meta/lib/oe/qa.py
meta/lib/oeqa/selftest/cases/oelib/elf.py

index ea831b930acc5d6a88c4b9217c2767ea1ce59195..e8a854a302a61ae87f66c8f099a1dcdf61f1bcee 100644 (file)
@@ -156,6 +156,7 @@ def elf_machine_to_string(machine):
     """
     try:
         return {
+            0x00: "Unset",
             0x02: "SPARC",
             0x03: "x86",
             0x08: "MIPS",
index d0a28090f2e591ad760b3f4fcc1adb8e1fbd84c6..5a5f9b4fdf6e9e9c5d5e94b7e149f0df414410a4 100644 (file)
@@ -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')")