All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Daniel Schultz <d.schultz@phytec.de>
Cc: holger.brunck@hitachienergy.com, hs@nabladev.com,
	sjg@chromium.org, jh80.chung@samsung.com, u-boot@lists.denx.de,
	upstream@lists.phytec.de
Subject: Re: [PATCH] cmd: Remove default prompt from output
Date: Fri, 15 Aug 2025 10:12:37 -0600	[thread overview]
Message-ID: <20250815161237.GT124814@bill-the-cat> (raw)
In-Reply-To: <20250815160635.3575367-1-d.schultz@phytec.de>

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]

On Fri, Aug 15, 2025 at 09:06:35AM -0700, Daniel Schultz wrote:

> Some commands include the U-Boot prompt (=>) in their output,
> which can interfere with tools like labgrid that rely on prompt
> detection to determine when a command has completed. This may cause
> such tools to misinterpret partial output.
> 
> To avoid this issue, it's better to update the command output itself
> rather than modifying the actual U-Boot prompt. Changing the prompt
> is not acceptable in many cases, as some boards have used the default
> prompt (=>) for years, and altering it - especially just for testing -
> could lead to inconsistencies or unintended side effects.
> Instead, replace instances of the prompt that appear within command
> output (not the real prompt) with an alternative like -> to ensure
> correct parsing by tools that rely on prompt recognition.
> 
> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> ---
>  cmd/i2c.c      |  2 +-
>  cmd/mtdparts.c | 12 ++++++------
>  common/hash.c  |  6 +++---
>  3 files changed, 10 insertions(+), 10 deletions(-)

This is two cases, and I'm not sure I like the proposal here, sorry. For
cmd/mtdparts.c, it's debug statements. We can change them, but are they
also enabled by default in anything? The other cases, we're changing
output along the lines of:

> -	printf ("CRC32 for %08lx ... %08lx ==> ", addr, addr + count - 1);
> +	printf("CRC32 for %08lx ... %08lx --> ", addr, addr + count - 1);

In each case, and I'm surprised there's not testing that globs on that
today. I see the wget case that uses "==>" and we do have a test that
checks it, today. Is your testing framework not able to handle "=>" in
the middle of a line? Thanks.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-08-15 16:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15 16:06 [PATCH] cmd: Remove default prompt from output Daniel Schultz
2025-08-15 16:12 ` Tom Rini [this message]
2025-08-19  9:14   ` Quentin Schulz
2025-09-01  5:12   ` Heiko Schocher

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=20250815161237.GT124814@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=d.schultz@phytec.de \
    --cc=holger.brunck@hitachienergy.com \
    --cc=hs@nabladev.com \
    --cc=jh80.chung@samsung.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=upstream@lists.phytec.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.