From patchwork Thu Aug 1 14:38:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 33892 Received: (qmail 26446 invoked by alias); 1 Aug 2019 14:39:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 26432 invoked by uid 89); 1 Aug 2019 14:39:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HDKIM-Filter:v2.10.3, read1, UD:gdb.log, gdblog X-HELO: mail.efficios.com Received: from mail.efficios.com (HELO mail.efficios.com) (167.114.142.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Aug 2019 14:39:05 +0000 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 857B926A3D3; Thu, 1 Aug 2019 10:39:03 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id XlfgsnaK3b09; Thu, 1 Aug 2019 10:39:03 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 2590B26A3CF; Thu, 1 Aug 2019 10:39:03 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 2590B26A3CF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1564670343; bh=/BN4VG8iDPIjjIjuYGnO5oti2WDMGhen9WaJt4WX0HI=; h=From:To:Date:Message-Id:MIME-Version; b=AnSpeOrr69BYG/1+W/G/jHl352NCnrw5LLiKn5nfL7H4x/i1k1quipBOm6cjVhetM VqbMKB2lNtefgZTR/zAVGKIOzxLj0d3j8uRp9vug4jUMVH6v6FaCS1Va0hn2jE9xVm xWBln0L5YneeTM6USzSBt4qTGACF45tiTuUOWX4KiGRBhddAcu4j6TXQiUpy4Y5HcY pxFC9ijqVk2cyY5QB4MP5TJPAuABdMr9iC9tEiPVjtQG0SdiqXTbCdBeEbucm7Sb/J dQnJWkQuJBSuKjdYdtOWrYcTSTovtwfSvMWWjB+1nilssqCxEgJLb9WxDqMX3b247z jdwZAX5geeccA== Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id w1smxWEhtJLS; Thu, 1 Aug 2019 10:39:03 -0400 (EDT) Received: from smarchi-efficios.internal.efficios.com (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) by mail.efficios.com (Postfix) with ESMTPSA id F3D9526A3CA; Thu, 1 Aug 2019 10:39:02 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Tom de Vries , Simon Marchi Subject: [PATCH] Increase timeout in gdb.mi/list-thread-groups-available.exp Date: Thu, 1 Aug 2019 10:38:55 -0400 Message-Id: <20190801143855.1640-1-simon.marchi@efficios.com> MIME-Version: 1.0 Running make check-read1 TESTS="gdb.mi/list-thread-groups-available.exp" on my machine results in timeout failures. Running it while having `tail -F testsuite/gdb.log` on the side shows that the test is never really blocked, it is just slow at consuming the large output generated by `-list-thread-groups --available` (which lists all the processes on the system). If I increase the timeout to a large value, the test passes in ~30 seconds (compared to under 1 second normally). Increase the timeout for the particular mi_gdb_test that is long to execute under read1. The new timeout value is a bit arbitrary. The default timeout is 10 seconds, so I set the new timeout to be "old-timeout * 10", so 100 seconds in the typical case. gdb/testsuite/ChangeLog: PR gdb/24863 * gdb.mi/list-thread-groups-available.exp: Increase timeout for -list-thread-groups --available test. --- .../gdb.mi/list-thread-groups-available.exp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp index 792c3bac8962..c8486ce1f3d1 100644 --- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp +++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp @@ -54,10 +54,18 @@ set cores_re "cores=\\\[(\"$decimal\"(,\"$decimal\")*)?\\\]" # List all available processes. set process_entry_re "{${id_re},${type_re}(,$description_re)?(,$user_re)?(,$cores_re)?}" -mi_gdb_test \ - "-list-thread-groups --available" \ - "\\^done,groups=\\\[${process_entry_re}(,$process_entry_re)*\\\]" \ - "list available thread groups" +save_vars { timeout } { + # Increase the timeout: when running with `make check-read1`, this can take + # a bit of time, as there is a lot of output generated, hence a lot of read + # syscalls. + set timeout [expr $timeout * 10] + + mi_gdb_test \ + "-list-thread-groups --available" \ + "\\^done,groups=\\\[${process_entry_re}(,$process_entry_re)*\\\]" \ + "list available thread groups" +} + # List specific processes, make sure there are two entries. set spawn_id_1 [remote_spawn target $binfile]