Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix -readnow FAIL in gdb.base/style.exp
Date: Fri, 10 Apr 2020 09:51:09 +0200	[thread overview]
Message-ID: <20200410075108.GA31103@delia> (raw)

Hi,

When running test-case gdb.base/style.exp with target board readnow, we run
into:
...
FAIL: gdb.base/style.exp: filename is styled when loading symbol file
...

The problem is that with -readnow, an extra "Expanding full symbols" message
is generated:
...
(gdb) file $file^M
Reading symbols from $file...^M
Expanding full symbols from $file...^M
(gdb) FAIL: gdb.base/style.exp: filename is styled when loading symbol file
...
and the test does not expect this message.

Fix this by expecting the additional message for -readnow.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix -readnow FAIL in gdb.base/style.exp

gdb/testsuite/ChangeLog:

2020-04-10  Tom de Vries  <tdevries@suse.de>

	* gdb.base/style.exp: Expect "Expanding full symbols" message for
	-readnow.

---
 gdb/testsuite/gdb.base/style.exp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp
index 1071b023aa..129f1746a3 100644
--- a/gdb/testsuite/gdb.base/style.exp
+++ b/gdb/testsuite/gdb.base/style.exp
@@ -34,6 +34,8 @@ save_vars { env(TERM) } {
 	return -1
     }
 
+    set readnow [readnow]
+
     if {![runto_main]} {
 	fail "style tests failed"
 	return
@@ -140,8 +142,15 @@ save_vars { env(TERM) } {
 	    ]
 
     set quoted [string_to_regexp $binfile]
+    set pass_re "Reading symbols from [style $quoted file]\.\.\."
+    if { $readnow } {
+	set pass_re \
+	    [multi_line \
+		 $pass_re \
+		 "Expanding full symbols from [style $quoted file]\.\.\."]
+    }
     gdb_test "file $binfile" \
-	"Reading symbols from [style $quoted file]..." \
+	$pass_re \
 	"filename is styled when loading symbol file"
 
     gdb_test "pwd" "Working directory [style .*? file].*"


                 reply	other threads:[~2020-04-10  7:51 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=20200410075108.GA31103@delia \
    --to=tdevries@suse.de \
    --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