From 71ea2b6be8228759230cef7d5a7ab0b45b77c26c Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Fri, 10 Apr 2020 09:50:11 +0200 Subject: [gdb/testsuite] Fix -readnow FAIL in gdb.base/style.exp 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. gdb/testsuite/ChangeLog: 2020-04-10 Tom de Vries * gdb.base/style.exp: Expect "Expanding full symbols" message for -readnow. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/style.exp | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 023f5a8..850607c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2020-04-10 Tom de Vries + * gdb.base/style.exp: Expect "Expanding full symbols" message for + -readnow. + +2020-04-10 Tom de Vries + PR cli/25808 * gdb.base/style.c: Add leading newlines. * gdb.base/style.exp: Use gdb_get_line_number to get specific lines. diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp index 1071b02..129f174 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].*" -- cgit v1.1