From: Keith Seitz <keiths@redhat.com>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/testsuite: Fix testing of "info copying"
Date: Wed, 24 Jan 2024 09:09:18 -0800 [thread overview]
Message-ID: <89c9eb1c-3463-4222-9d48-3ab04386d1db@redhat.com> (raw)
In-Reply-To: <20240111025921.781828-1-thiago.bauermann@linaro.org>
Hi,
On 1/10/24 18:59, Thiago Jung Bauermann wrote:
> gdb.base/default.exp has an incomplete test for the "info copying" command,
> as poetically pointed out by the FIXME removed by this patch.
Thank you for the patch... Oh, that FIXME! 🤣
> The test omits the pattern argument to gdb_test, which causes it to just
> check for a GDB prompt at the end of the command output.
>
> The problem is that the command output is the whole GPLv3 license, which
> due to its size causes the test to fail sometimes, making the testcase to
> be out of sync with GDB's output and failing the tests that follow
> it. E.g.,
>
> FAIL: gdb.base/default.exp: info copying (timeout)
> FAIL: gdb.base/default.exp: info display
> FAIL: gdb.base/default.exp: info frame "f" abbreviation
> PASS: gdb.base/default.exp: info frame
> FAIL: gdb.base/default.exp: info files
> FAIL: gdb.base/default.exp: info float
> FAIL: gdb.base/default.exp: info functions
> FAIL: gdb.base/default.exp: info locals
> FAIL: gdb.base/default.exp: info program
> FAIL: gdb.base/default.exp: info registers
> FAIL: gdb.base/default.exp: info stack "s" abbreviation
>
> Fix by by checking for a few excerpts at the beginning, middle and end of
> the license text. This makes the test consume the command's output in
> smallish chunks.
While I'm not really in favor of copying large swaths of text from
compiled code into the test suite, this text changes very infrequently.
I think the last time it was updated was around 2007?
So I think this is easily outweighed by the need to strive for
more deterministic test results.
Reviewed-by: Keith Seitz <keiths@redhat.com>
Thank you!
Keith
next prev parent reply other threads:[~2024-01-24 17:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 2:59 Thiago Jung Bauermann
2024-01-24 17:09 ` Keith Seitz [this message]
2024-02-08 16:20 ` Tom Tromey
2024-02-08 23:47 ` Thiago Jung Bauermann
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=89c9eb1c-3463-4222-9d48-3ab04386d1db@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=thiago.bauermann@linaro.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).