From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 750023861C30 for ; Wed, 11 Mar 2020 13:59:56 +0000 (GMT) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6E712ADE4 for ; Wed, 11 Mar 2020 13:59:55 +0000 (UTC) Date: Wed, 11 Mar 2020 14:59:53 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix FAILs due to verbose in foll-fork.exp Message-ID: <20200311135952.GA27968@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2020 13:59:57 -0000 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 * 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