public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: Luis Machado <luis.machado@arm.com>
Cc: "Tom Tromey" <tromey@adacore.com>,
	gdb-patches@sourceware.org,
	"Kévin Le Gouguec" <legouguec@adacore.com>
Subject: Re: [PATCH] Strip trailing newlines from input string
Date: Thu, 11 Apr 2024 13:17:44 -0300	[thread overview]
Message-ID: <87a5lzoouv.fsf@linaro.org> (raw)
In-Reply-To: <3bccdd10-eab7-4e73-acc3-2f160f62eaaf@arm.com> (Luis Machado's message of "Thu, 11 Apr 2024 15:45:02 +0100")

Luis Machado <luis.machado@arm.com> writes:

> On 4/11/24 14:45, Tom Tromey wrote:
>> Luis> Looks good to me.
>>
>> Luis> Approved-By: Luis Machado <luis.machado@arm.com>
>> Luis> Tested-By: Luis Machado <luis.machado@arm.com>
>>
>> Thanks.
>>
>> Unfortunately the CI didn't like it, but I have no idea why.
>> In the gdb.log the echo output doesn't appear at all.
>>
>> ^[[?2004h(gdb) ^[[7mecho hello^[[m^M
>> ^M^[[A(gdb) FAIL: gdb.base/paste-newline.exp: newline removed from paste
>>
>> I don't know why this would happen or how to debug it.
>>
>> Tom
>
> What particular builder was this? I ran a few checks on my end and the test passed OK.

This is with the Linaro CI:

https://patchwork.sourceware.org/project/gdb/patch/20240408171818.1856529-1-tromey@adacore.com/

> Maybe a different terminal setup or timing issue?

The Linaro CI uses the read1 tool which makes Expect read the GDB output
one byte at a time. We do that to make the testsuite results more
deterministic since otherwise Expect will read variable amounts of
output from GDB, which can trigger flaky failures in testcases that
aren't strict enough in their match patterns.

I can reproduce the problem when I do the same:

$ make -C gdb check-read1 TESTS=gdb.base/paste-newline.exp

It looks like reading output one byte at a time breaks ANSI sequences.

--
Thiago

  reply	other threads:[~2024-04-11 16:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08 17:18 Tom Tromey
2024-04-09 22:36 ` Luis Machado
2024-04-11 13:45   ` Tom Tromey
2024-04-11 14:45     ` Luis Machado
2024-04-11 16:17       ` Thiago Jung Bauermann [this message]
2024-04-15 15:04         ` Tom Tromey
2024-04-15 18:21 ` [PP?] " Simon Marchi
2024-04-15 18:28   ` Tom Tromey

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=87a5lzoouv.fsf@linaro.org \
    --to=thiago.bauermann@linaro.org \
    --cc=gdb-patches@sourceware.org \
    --cc=legouguec@adacore.com \
    --cc=luis.machado@arm.com \
    --cc=tromey@adacore.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).