From: Sandra Loosemore <sandra@codesourcery.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [patch] gdb/testsuite: Adjust command completion output when TUI is disabled
Date: Tue, 23 Jun 2020 00:27:45 -0600 [thread overview]
Message-ID: <73d8a79e-8dea-cbbb-a29f-925eda3230dd@codesourcery.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
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
[-- Attachment #2: tui-commands.patch --]
[-- Type: text/x-patch, Size: 2202 bytes --]
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.
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 reply other threads:[~2020-06-23 6:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 6:27 Sandra Loosemore [this message]
2020-06-23 8:39 ` Andrew Burgess
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=73d8a79e-8dea-cbbb-a29f-925eda3230dd@codesourcery.com \
--to=sandra@codesourcery.com \
--cc=gdb-patches@sourceware.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