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 605C53947C11 for ; Fri, 20 Mar 2020 13:59:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 605C53947C11 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de 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 730DBABDE for ; Fri, 20 Mar 2020 13:59:53 +0000 (UTC) Date: Fri, 20 Mar 2020 14:59:51 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix timeouts in gdb.threads/step-over-*.exp Message-ID: <20200320135950.GA25342@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, KAM_DMARC_STATUS, 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: Fri, 20 Mar 2020 13:59:55 -0000 Hi, When running test-cases gdb.threads/step-over-lands-on-breakpoint.exp and gdb.threads/step-over-trips-on-watchpoint.exp with target board unix/-flto/-O0/-flto-partition=none/-ffat-lto-objects, we run into timeouts due not being able to set a breakpoint and then trying to continue to that breakpoint. In total, we run into 186 timeouts, which roughly corresponds to half an hour: ... $ grep "FAIL.*(timeout)" gdb.sum \ | awk '{print $2}' \ | sort \ | uniq -c 66 gdb.threads/step-over-lands-on-breakpoint.exp: 120 gdb.threads/step-over-trips-on-watchpoint.exp: ... Fix this by bailing out if the first break fails. Tested on x86_64-linux, both with native and with target board mentioned above. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix timeouts in gdb.threads/step-over-*.exp gdb/testsuite/ChangeLog: 2020-03-20 Tom de Vries * gdb.threads/step-over-lands-on-breakpoint.exp (do_test): Bail out if first break fails. * gdb.threads/step-over-trips-on-watchpoint.exp: (do_test): Same. --- gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp | 5 ++++- gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp index 64ef6e81bf..1921aff1e8 100644 --- a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp +++ b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp @@ -38,7 +38,10 @@ proc do_test {displaced command} { gdb_test_no_output "set displaced-stepping $displaced" - gdb_breakpoint [gdb_get_line_number "set wait-thread breakpoint here"] + set line [gdb_get_line_number "set wait-thread breakpoint here"] + if { ![gdb_breakpoint $line] } { + return + } gdb_continue_to_breakpoint "run to wait-thread breakpoint" gdb_test "info threads" "\\\* 1 .* 2 .*" "info threads shows all threads" diff --git a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp index 7d5da52c9e..41c21aebb4 100644 --- a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp +++ b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp @@ -57,7 +57,10 @@ proc do_test { displaced with_bp } { gdb_test_no_output "set displaced-stepping $displaced" - gdb_breakpoint [gdb_get_line_number "set wait-thread breakpoint here"] + set line [gdb_get_line_number "set wait-thread breakpoint here"] + if { ![gdb_breakpoint $line] } { + return + } gdb_continue_to_breakpoint "run to wait-thread breakpoint" gdb_test "info threads" "\\\* 1 .* 2 .*" "info threads shows all threads"