From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Sandra Loosemore <sandra@codesourcery.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch] gdb/testsuite: Adjust command completion output when TUI is disabled
Date: Tue, 23 Jun 2020 09:39:45 +0100 [thread overview]
Message-ID: <20200623083945.GN2737@embecosm.com> (raw)
In-Reply-To: <73d8a79e-8dea-cbbb-a29f-925eda3230dd@codesourcery.com>
* Sandra Loosemore <sandra@codesourcery.com> [2020-06-23 00:27:45 -0600]:
> This is another almost-obvious testsuite fix, for one of the
> command-completion tests that was failing due to an incorrect assumption
> that TUI commands are always present. OK to commit, or is this just a
> poorly-designed testcase that we should rewrite some other way instead?
>
> -Sandra
> commit 8e0cc2870a30390e745110d4c8181f010d09c17f
> Author: Sandra Loosemore <sandra@codesourcery.com>
> Date: Mon Jun 22 23:01:19 2020 -0700
>
> Adjust command completion output when TUI is disabled
>
> The history-scrolling commands "+", "-", "<" and ">" are only known to
> GDB when TUI is enabled. This means the "complete pipe " command
> produces different output depending on whether TUI is present, which
> in turn caused
>
> FAIL: gdb.base/shell.exp: cmd complete "pipe "
>
> This patch provides different patterns for that test depending on
> whether or not TUI is available.
>
> 2020-06-23 Sandra Loosemore <sandra@codesourcery.com>
>
> gdb/testsuite/
> * lib/completion-support.exp (test_gdb_completion_offers_commands):
> Adjust for omitted commands when TUI is disabled.
LGTM.
Thanks,
Andrew
>
> diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
> index d6c43e6..38f2188 100644
> --- a/gdb/testsuite/ChangeLog
> +++ b/gdb/testsuite/ChangeLog
> @@ -1,3 +1,8 @@
> +2020-06-23 Sandra Loosemore <sandra@codesourcery.com>
> +
> + * lib/completion-support.exp (test_gdb_completion_offers_commands):
> + Adjust for omitted commands when TUI is disabled.
> +
> 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
>
> * gdb.base/default-args.exp: New test.
> diff --git a/gdb/testsuite/lib/completion-support.exp b/gdb/testsuite/lib/completion-support.exp
> index 18eac82..51436cc 100644
> --- a/gdb/testsuite/lib/completion-support.exp
> +++ b/gdb/testsuite/lib/completion-support.exp
> @@ -555,10 +555,19 @@ proc test_gdb_completion_offers_commands {input_line} {
> # Force showing two commands.
> gdb_test_no_output "set max-completions 2" ""
>
> - test_gdb_complete_multiple $input_line "" "" {
> - "!"
> - "+"
> - } "" "" 1
> + # TUI adds additional commands to the possible completions, so we
> + # need different patterns depending on whether or not it is enabled.
> + if { [skip_tui_tests] } {
> + test_gdb_complete_multiple $input_line "" "" {
> + "!"
> + "actions"
> + } "" "" 1
> + } else {
> + test_gdb_complete_multiple $input_line "" "" {
> + "!"
> + "+"
> + } "" "" 1
> + }
>
> # Restore.
> gdb_test_no_output "set max-completions $max_completions" ""
next prev parent reply other threads:[~2020-06-23 8:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 6:27 Sandra Loosemore
2020-06-23 8:39 ` Andrew Burgess [this message]
2020-06-23 12:06 ` Pedro Alves
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=20200623083945.GN2737@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=sandra@codesourcery.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