diff options
author | Tom Tromey <tom@tromey.com> | 2021-01-23 08:52:45 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-01-23 08:52:45 -0700 |
commit | 1af4c9c4209c3478224f18dfb79dc09567b96705 (patch) | |
tree | 69748fcc2ecd7a1bc8702a739304f08d78ea494c /gdb | |
parent | e753591581e65890044b68823e624be0a235ed34 (diff) | |
download | gdb-1af4c9c4209c3478224f18dfb79dc09567b96705.zip gdb-1af4c9c4209c3478224f18dfb79dc09567b96705.tar.gz gdb-1af4c9c4209c3478224f18dfb79dc09567b96705.tar.bz2 |
Disable bracketed paste mode in GDB tests
I have a patch to import GNU readline 8.1 into GDB. However, when
running the tests, there were a number of failures due to "bracketed
paste mode". This is a terminal feature that readline 8.1 enables by
default.
The simplest way to work around this was to always make a ".inputrc"
for GDB tests that will tell readline to disable brackted paste mode.
gdb/testsuite/ChangeLog
2021-01-23 Tom Tromey <tom@tromey.com>
* lib/gdb.exp (default_gdb_init): Set INPUTRC to a cached file.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 15 |
2 files changed, 12 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b9522c8..cb3913c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2021-01-23 Tom Tromey <tom@tromey.com> + + * lib/gdb.exp (default_gdb_init): Set INPUTRC to a cached file. + 2021-01-22 Bernd Edlinger <bernd.edlinger@hotmail.de> * gdb.base/line65535.exp: Fix test expectation. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 3eebfa1..03653ab 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5186,13 +5186,14 @@ proc default_gdb_init { test_file_name } { setenv LC_CTYPE C setenv LANG C - # Don't let a .inputrc file or an existing setting of INPUTRC mess up - # the test results. Even if /dev/null doesn't exist on the particular - # platform, the readline library will use the default setting just by - # failing to open the file. OTOH, opening /dev/null successfully will - # also result in the default settings being used since nothing will be - # read from this file. - setenv INPUTRC "/dev/null" + # Don't let a .inputrc file or an existing setting of INPUTRC mess + # up the test results. Certain tests (style tests and TUI tests) + # want to set the terminal to a non-"dumb" value, and for those we + # want to disable bracketed paste mode. Versions of Readline + # before 8.0 will not understand this and will issue a warning. + # We tried using a $if to guard it, but Readline 8.1 had a bug in + # its version-comparison code that prevented this for working. + setenv INPUTRC [cached_file inputrc "set enable-bracketed-paste off"] # This disables style output, which would interfere with many # tests. |