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 7C36F3851C04 for ; Tue, 28 Apr 2020 09:32:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7C36F3851C04 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 D9E1AACED for ; Tue, 28 Apr 2020 09:32:00 +0000 (UTC) Date: Tue, 28 Apr 2020 11:32:00 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix timeouts with -readnow Message-ID: <20200428093158.GA12103@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=-28.4 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, TXREP 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: Tue, 28 Apr 2020 09:32:12 -0000 Hi, With target board readnow, I run into timeouts for test cases gdb.base/multi-forks.exp and gdb.threads/fork-plus-threads.exp. Fix these using with_timeout_factor. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix timeouts with -readnow gdb/testsuite/ChangeLog: 2020-04-28 Tom de Vries * gdb.base/multi-forks.exp: Use with_timeout_factor. * gdb.threads/fork-plus-threads.exp: Same. --- gdb/testsuite/gdb.base/multi-forks.exp | 5 ++- gdb/testsuite/gdb.threads/fork-plus-threads.exp | 41 +++++++++++++------------ 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/gdb/testsuite/gdb.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp index 59d953b04d6..0d75d0c153c 100644 --- a/gdb/testsuite/gdb.base/multi-forks.exp +++ b/gdb/testsuite/gdb.base/multi-forks.exp @@ -149,7 +149,10 @@ gdb_test_no_output "set detach off" "set detach off" # for {set i 1} {$i <= 15} {incr i} { - gdb_test "continue" "Breakpoint .* main .*exit.*" "run to exit $i" + # Fix timeouts with -readnow. + with_timeout_factor 3 { + gdb_test "continue" "Breakpoint .* main .*exit.*" "run to exit $i" + } gdb_test "info inferior" " 2 .* 3 .* 4 .* 5 .*" "info inferior $i" gdb_test "inferior $i + 1" "(_dl_sysinfo_int80|fork|__kernel_(v|)syscall).*" \ "inferior $i" diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp index 8d36b96810b..91453329c26 100644 --- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp +++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp @@ -78,25 +78,28 @@ proc do_test { detach_on_fork } { set saw_thread_stopped 0 set test "inferior 1 exited" - gdb_test_multiple "" $test { - -re "Cannot remove breakpoints" { - set saw_cannot_remove_breakpoints 1 - exp_continue - } - -re "Thread \[^\r\n\]+ stopped\\." { - set saw_thread_stopped 1 - exp_continue - } - -re "Thread \[^\r\n\]+ exited" { - # Avoid timeout with check-read1 - exp_continue - } - -re "New Thread \[^\r\n\]+" { - # Avoid timeout with check-read1 - exp_continue - } - -re "Inferior 1 \(\[^\r\n\]+\) exited normally" { - pass $test + # Fix timeouts with -readnow. + with_timeout_factor 3 { + gdb_test_multiple "" $test { + -re "Cannot remove breakpoints" { + set saw_cannot_remove_breakpoints 1 + exp_continue + } + -re "Thread \[^\r\n\]+ stopped\\." { + set saw_thread_stopped 1 + exp_continue + } + -re "Thread \[^\r\n\]+ exited" { + # Avoid timeout with check-read1 + exp_continue + } + -re "New Thread \[^\r\n\]+" { + # Avoid timeout with check-read1 + exp_continue + } + -re "Inferior 1 \(\[^\r\n\]+\) exited normally" { + pass $test + } } }