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 FAILs due to verbose in foll-fork.exp
Date: Wed, 11 Mar 2020 14:59:53 +0100	[thread overview]
Message-ID: <20200311135952.GA27968@delia> (raw)

Hi,

When running test-case gdb.base/foll-fork.exp, I see:
...
(gdb) catch fork^M
Catchpoint 2 (fork)^M
Reading in symbols for ../sysdeps/x86/libc-start.c...^M
(gdb) FAIL: gdb.base/foll-fork.exp: explicit child follow, set catch fork
...

The problem is that the test regexp does not expect the "Reading in symbols"
message:
...
    gdb_test "catch fork" "Catchpoint \[0-9\]* \\(fork\\)" \
        "explicit child follow, set catch fork"
...
which is generated due to the verbose setting.

Fix this by allowing the message in the regexp.

Tested on x86_64-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix FAILs due to verbose in foll-fork.exp

gdb/testsuite/ChangeLog:

2020-03-11  Tom de Vries  <tdevries@suse.de>

	* gdb.base/foll-fork.exp: Allow "Reading in symbols" messages.

---
 gdb/testsuite/gdb.base/foll-fork.exp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.base/foll-fork.exp b/gdb/testsuite/gdb.base/foll-fork.exp
index 27bbb44e53..788a6c950d 100644
--- a/gdb/testsuite/gdb.base/foll-fork.exp
+++ b/gdb/testsuite/gdb.base/foll-fork.exp
@@ -179,13 +179,17 @@ proc test_follow_fork { who detach cmd } {
     }
 }
 
+set reading_in_symbols_re {(?:\r\nReading in symbols for [^\r\n]*)?}
+
 proc catch_fork_child_follow {} {
     global gdb_prompt
     global srcfile
+    global reading_in_symbols_re
 
     set bp_after_fork [gdb_get_line_number "set breakpoint here"]
 
-    gdb_test "catch fork" "Catchpoint \[0-9\]* \\(fork\\)" \
+    gdb_test "catch fork" \
+	"Catchpoint \[0-9\]* \\(fork\\)$reading_in_symbols_re" \
 	"explicit child follow, set catch fork"
 
     # Verify that the catchpoint is mentioned in an "info breakpoints",
@@ -285,10 +289,12 @@ proc catch_fork_unpatch_child {} {
 proc tcatch_fork_parent_follow {} {
     global gdb_prompt
     global srcfile
+    global reading_in_symbols_re
 
     set bp_after_fork [gdb_get_line_number "set breakpoint here"]
 
-    gdb_test "catch fork" "Catchpoint \[0-9\]* \\(fork\\)" \
+    gdb_test "catch fork" \
+	"Catchpoint \[0-9\]* \\(fork\\)$reading_in_symbols_re" \
 	"explicit parent follow, set tcatch fork"
 
 # ??rehrauer: I don't yet know how to get the id of the tcatch


                 reply	other threads:[~2020-03-11 13:59 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=20200311135952.GA27968@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