public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: fix test failure when building against readline v7 Date: Tue, 29 Mar 2022 13:40:37 +0000 (GMT) [thread overview] Message-ID: <20220329134037.7FD423858C50@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=47b8bb38fcb8ea1df70a932f7fe9fedca8993ec7 commit 47b8bb38fcb8ea1df70a932f7fe9fedca8993ec7 Author: Andrew Burgess <aburgess@redhat.com> Date: Sat Mar 26 13:41:33 2022 +0000 gdb/testsuite: fix test failure when building against readline v7 The test added in the commit: commit a6b413d24ccc5d76179bab866834e11fd6fec294 Date: Fri Mar 11 14:44:03 2022 +0000 gdb: work around prompt corruption caused by bracketed-paste-mode Was not written with readline 7 in mind, only readline 8+. Between readline 7 and 8 the escape sequence used to disable bracketed paste mode changed, an additional '\r' character was added to the end. In fact, it was the addition of this '\r' character that triggered the issue for which the above commit is part of the solution. Anyway, the test tries to spot the case where the output from GDB is not perfect, but does have the above work around applied. However, the pattern in the test assumes that the problematic '\r' will be present, and this is only true for readline 8+. With readline 7 the test was failing. In this commit I generalise the pattern a little so that the test will still KFAIL with readline 7. It's a little unfortunate that the test is KFAILing with readline 7, as without the problematic '\r' there's actually no reason that GDB couldn't "do the right thing" in this case, in which case, the test would PASS, but that would require changes within GDB itself. My preference then is that initially we patch the test to get it KFAILing, then in a separate commit I can modify GDB so that it can PASS with readline 7. Diff: --- gdb/testsuite/gdb.base/eof-exit.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/eof-exit.exp b/gdb/testsuite/gdb.base/eof-exit.exp index d604d029974..2d9530ccebe 100644 --- a/gdb/testsuite/gdb.base/eof-exit.exp +++ b/gdb/testsuite/gdb.base/eof-exit.exp @@ -38,7 +38,7 @@ proc run_test {} { -re "$::gdb_prompt \[^\n\]*\r\[^\n\]*quit" { fail "$gdb_test_name (misplaced \\r)" } - -re "$::gdb_prompt \[^\n\]*\r\[^\n\]*\r\nquit\r\n" { + -re "$::gdb_prompt (?:\[^\n\]*\r)?\[^\n\]*\r\nquit\r\n" { # For versions of readline that don't include the # RL_STATE_EOF patch, then the 'quit' is printed on the # subsequent line.
reply other threads:[~2022-03-29 13:40 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220329134037.7FD423858C50@sourceware.org \ --to=aburgess@sourceware.org \ --cc=gdb-cvs@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: linkBe 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).