Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Bruce Ashfield <bruce.ashfield@gmail.com>
To: Mikko Rapeli <mikko.rapeli@linaro.org>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2] kernel-yocto.bbclass: capture stderr from subprocess.check_output()
Date: Mon, 23 Nov 2026 08:21:39 -0800 (PST)	[thread overview]
Message-ID: <6b046813.f3e70d7f.2d799.38cb@mx.google.com> (raw)
In-Reply-To: <20261113125300.1188997-1-mikko.rapeli@linaro.org>

On Fri, Nov 13, 2026 at 7:53 AM Mikko Rapeli via openembedded-core
<mikko.rapeli=linaro.org@lists.openembedded.org> wrote:
>
> Hard to debug failures without stderr in output.

I went and looked at what the tools actually send to stderr, to see
how much this would help.

Not a lot, as it turns out .. symbol_why.py and scc report their
errors on stdout (with a non-zero exit), which the existing exception
handling already prints. kgit --meta always exits 0, so that new
try/except won't ever trigger. Where this does help is a python
traceback out of symbol_why.py (Kconfig parse errors, etc), and
previously that was only in the task log, so it is still an
improvement (which is what bit Mikko).

One minor thing: with stderr=subprocess.PIPE, anything written to
stderr on a successful run is now captured and dropped, where before
it ended up in the task log. Nothing important goes there today, so
I'm not worried about it, but if you do a v3 for any other reason,
it might be worth logging it on success.

To be clear, I'm actually working on modernizing symbol_why (I wrote a
lot of that code fairly early in my python hacking career). So there's
an opportunity to make it throw exceptions, fix exit codes and better
separate stderr/sdout.

As a first step I'll look at having the tools send their errors to
stderr, so this gets more useful over time.

Acked-by: Bruce Ashfield <bruce.ashfield@gmail.com>

Bruce

      parent reply	other threads:[~2026-11-23 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 12:53 [PATCH v2] kernel-yocto.bbclass: capture stderr from subprocess.check_output() Mikko Rapeli
2026-11-13 13:01 ` Patchtest results for " patchtest
2026-11-23 16:21 ` Bruce Ashfield [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b046813.f3e70d7f.2d799.38cb@mx.google.com \
    --to=bruce.ashfield@gmail.com \
    --cc=mikko.rapeli@linaro.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox