From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>,
Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb/testsuite/tui: start GDB with "set filename-display basename"
Date: Fri, 23 Sep 2022 10:22:47 -0400 [thread overview]
Message-ID: <ffe12e29-1bba-fee2-8303-320f22586f64@polymtl.ca> (raw)
In-Reply-To: <87k05u19p4.fsf@tromey.com>
On 2022-09-23 09:50, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Simon> And that causes `wait_for` to think the "step" command is complete.
> Simon> This is wrong, as the prompt at line 17 isn't the prompt drawn after the
> Simon> completion of the "step" command. The subsequent tests now run with a
> Simon> partially updated screen (what is shown above) and obviously fail.
>
> Simon> The ideal way to fix this would be for `wait_for` to be smarter, to
> Simon> avoid it confusing the different prompts drawn.
>
> This is actually ridiculously hard. Not being able to solve this is why
> we added the refresh-counting hack for TUI testing.
Ok, I'm not aware of that. But yeah I thought about this problem for a
day and didn't find any magic solution. The only semi-relevant idea I
had was to track at which line the last prompt was printed. And when
matching a prompt, it must be at a line >= where the last prompt was
printed. If it's above, it means it's a redraw of an old prompt.
> Simon> Doing this happens to fix my failures and makes my CI happy (which in
> Simon> turns makes me happy). To be clear, I understand that this does not fix
> Simon> the root issue of `proc wait_for` being confused. However, it makes TUI
> Simon> test runs be more similar for everyone, such that there's less chance of
> Simon> TUI tests randomly failing for somebody.
>
> It seems like an improvement to me.
>
> Simon> Note that there are other reasons why TUI tests could vary, like
> Simon> different curses library versions taking different re-drawing decisions.
> Simon> However, I think my change is a good step towards more stable test
> Simon> results.
>
> Indeed, I think this has happened already.
>
> Anyway the patch looks good to me.
Thanks, I'll push it.
Simon
prev parent reply other threads:[~2022-09-23 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 16:02 Simon Marchi
2022-09-23 13:50 ` Tom Tromey
2022-09-23 14:22 ` Simon Marchi [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=ffe12e29-1bba-fee2-8303-320f22586f64@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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).