From patchwork Thu Aug 1 19:16:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 33909 Received: (qmail 36020 invoked by alias); 1 Aug 2019 19:16:37 -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 35971 invoked by uid 89); 1 Aug 2019 19:16:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.3 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= 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 19:16:35 +0000 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id AE45D2A3CBD; Thu, 1 Aug 2019 15:16:33 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id rMs9cBdhcgh1; Thu, 1 Aug 2019 15:16:33 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 500192A3CA2; Thu, 1 Aug 2019 15:16:33 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 500192A3CA2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1564686993; bh=qKHm1yz74+h0yB5ObaODUhyTCCYAXf18VrTMLzKUM2E=; h=To:From:Message-ID:Date:MIME-Version; b=KlfpcEQsIX1iVurmDnYghcUB/+5KB1dbVwmRonhYtdfMLCV3+nEGuoi6GxjRrg5lf fR9FUeaoD68CsmsuGMTwGCs4ED5WBpoyvk8yULrLXCdIPk3BBhFsWVsILKimObNdO2 Wyl9ojkolYvu7SCv/B4ArHjKVOBzB2qmCZO8wlwc2kAlzdrFo7Zuw+fKCDp/tWJMC5 3zCbEX+L64fif8b8krKbp741v513/WRMexUGLUGN2tqzuYF5u53h7Fs6u7GlVrH81h q8LwRPgi5q8fbU+atv1XXvzYi61QrAnJNDzi73/dyVqTOag+LqvdRXZmPW9T1hi4ap cuQ2M/vmwzO4w== Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id outZzudjA2X7; Thu, 1 Aug 2019 15:16:33 -0400 (EDT) Received: from [172.16.0.120] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) by mail.efficios.com (Postfix) with ESMTPSA id 28B272A3C98; Thu, 1 Aug 2019 15:16:33 -0400 (EDT) Subject: Re: [PATCH] Increase timeout in gdb.mi/list-thread-groups-available.exp To: Tom Tromey Cc: gdb-patches@sourceware.org, Tom de Vries References: <20190801143855.1640-1-simon.marchi@efficios.com> <87ftmkagwi.fsf@tromey.com> From: Simon Marchi Message-ID: <9cc09b45-ba14-3299-6f99-b738c349ed94@efficios.com> Date: Thu, 1 Aug 2019 15:16:32 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <87ftmkagwi.fsf@tromey.com> On 2019-08-01 2:18 p.m., Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> PR gdb/24863 > Simon> * gdb.mi/list-thread-groups-available.exp: Increase timeout for > Simon> -list-thread-groups --available test. > > Simon> +save_vars { timeout } { > Simon> + # Increase the timeout: when running with `make check-read1`, this can take > Simon> + # a bit of time, as there is a lot of output generated, hence a lot of read > Simon> + # syscalls. > Simon> + set timeout [expr $timeout * 10] > > Maybe this should use with_timeout_factor. Ah, totally, I forgot about its existence. Here's a version using that. From d55b3eb5acd69b87495c9eeb57f96e4228911dbc Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 1 Aug 2019 10:28:52 -0400 Subject: [PATCH] Increase timeout in gdb.mi/list-thread-groups-available.exp 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 | 13 +++++++++---- 1 file changed, 9 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..2fbf282c661e 100644 --- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp +++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp @@ -54,10 +54,15 @@ 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" +# 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. +with_timeout_factor 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]