diff mbox series

lib/oe/qa: raise error on objdump failure

Message ID 20250313093437.95237-1-thomas.perrot@bootlin.com
State New
Headers show
Series lib/oe/qa: raise error on objdump failure | expand

Commit Message

Thomas Perrot March 13, 2025, 9:34 a.m. UTC
From: Thomas Perrot <thomas.perrot@bootlin.com>

Change the log level from 'note' to 'fatal' when objdump fails.
This ensures failures are treated with higher severity, providing
more visible feedback when objdump commands fail.

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
---
 meta/lib/oe/qa.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Purdie March 13, 2025, 2:29 p.m. UTC | #1
On Thu, 2025-03-13 at 10:34 +0100, Thomas Perrot via lists.openembedded.org wrote:
> From: Thomas Perrot <thomas.perrot@bootlin.com>
> 
> Change the log level from 'note' to 'fatal' when objdump fails.
> This ensures failures are treated with higher severity, providing
> more visible feedback when objdump commands fail.
> 
> Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
> ---
>  meta/lib/oe/qa.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
> index cd36cb5070d1..c1e295029abb 100644
> --- a/meta/lib/oe/qa.py
> +++ b/meta/lib/oe/qa.py
> @@ -155,7 +155,7 @@ class ELFFile:
>              self.objdump_output[cmd] = bb.process.run([objdump, cmd, self.name], env=env, shell=False)[0]
>              return self.objdump_output[cmd]
>          except Exception as e:
> -            bb.note("%s %s %s failed: %s" % (objdump, cmd, self.name, e))
> +            bb.fatal("%s %s %s failed: %s" % (objdump, cmd, self.name, e))
>              return ""
>  
>  def elf_machine_to_string(machine):
> 

Unfortunately this will break things:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/78/builds/1210/steps/13/logs/stdio

bb.process.ExecutionError: Execution of 'x86_64-poky-linux-objdump -p /srv/pokybuild/yocto-worker/build-appliance/build/build/tmp/work/core2-64-poky-linux/python3-packaging/24.2/packages-split/python3-packaging-ptest/usr/lib/python3-packaging/ptest/tests/manylinux/hello-world-x86_64-x32' failed with exit code 1:
x86_64-poky-linux-objdump: /srv/pokybuild/yocto-worker/build-appliance/build/build/tmp/work/core2-64-poky-linux/python3-packaging/24.2/packages-split/python3-packaging-ptest/usr/lib/python3-packaging/ptest/tests/manylinux/hello-world-x86_64-x32: file format not recognized


https://autobuilder.yoctoproject.org/valkyrie/#/builders/99/builds/1174
https://autobuilder.yoctoproject.org/valkyrie/#/builders/13/builds/1092

and more in that build.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index cd36cb5070d1..c1e295029abb 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -155,7 +155,7 @@  class ELFFile:
             self.objdump_output[cmd] = bb.process.run([objdump, cmd, self.name], env=env, shell=False)[0]
             return self.objdump_output[cmd]
         except Exception as e:
-            bb.note("%s %s %s failed: %s" % (objdump, cmd, self.name, e))
+            bb.fatal("%s %s %s failed: %s" % (objdump, cmd, self.name, e))
             return ""
 
 def elf_machine_to_string(machine):