From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4SzvNmP+i2BQZAAAWB0awg (envelope-from ) for ; Fri, 30 Apr 2021 08:56:03 -0400 Received: by simark.ca (Postfix, from userid 112) id D26641F11C; Fri, 30 Apr 2021 08:56:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AD3711E813 for ; Fri, 30 Apr 2021 08:56:02 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3DDC63857813; Fri, 30 Apr 2021 12:56:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3DDC63857813 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619787362; bh=toFtczN0NWzCPB7uYyWRpBMwRBraZOvqGu9eaZRS/+s=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=jy0Q8f8N/qxG40O069SO76O8o0hYSSiHe/xLToHUo86RBSBPliDXfRKE1pWNdGbNf PeLCw67RQGrEL5O80jP/M26uQ1KTJD3ScEOKpRm9IfaDcvvNZpuKcjFB0lRkCXsSbb 4m3eCE/tYulFUzImSfQ7LQ+U/QbemmhW8n98qZQU= Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by sourceware.org (Postfix) with ESMTPS id 658223857C60 for ; Fri, 30 Apr 2021 12:55:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 658223857C60 Received: by mail-qk1-x731.google.com with SMTP id 8so36733895qkv.8 for ; Fri, 30 Apr 2021 05:55:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=toFtczN0NWzCPB7uYyWRpBMwRBraZOvqGu9eaZRS/+s=; b=KVO4UDPRNGWXWEyCqT4OlnsbkAeL/vQ6y0cCECJHTceXrTMsqL0PCKJ4Hm0STlI03z SBoZbAze67akJIp6/aF4bjwCVnjFjFdMobkknw0rTRl9JvuLXLBe/7TfwMXlCl44OPWC 5N1HCjNnjYKnXxFL+qAnntbrE9GIONevb7SWWQUOelNFGjE5Ml33MKJ95T9bTX64/uke uiFqNefgNu5MuGxtQwIGu3nJhEoPl84XNI7wH3GvcBIz08IG/5eV46hf/MsHrtJv730Q +yDEUmMWC3HEiHvJ0/U0pscfIjZG1NnFThSI35/nzqJSozKLpFP8/lyfZTIn6+RPo20a hWrQ== X-Gm-Message-State: AOAM530afGIw26RvAh2vgXmXEM7jFiZ8HdLXcXLLjhKgY+q7JAoaxsQw bUL7jMOqdpC391fHlSGpiHjEHKAbpEGh7A== X-Google-Smtp-Source: ABdhPJxrY0XuHa8/KrjxNRz7PA19uctuF/a0zcmACaTz/PPEktH2ww2/1fHM2q5NJ9aBG9WKOZDk3A== X-Received: by 2002:a37:a2c2:: with SMTP id l185mr5084893qke.290.1619787357927; Fri, 30 Apr 2021 05:55:57 -0700 (PDT) Received: from ?IPv6:2804:7f0:4841:2d9e:407c:a880:b5f9:cf8c? ([2804:7f0:4841:2d9e:407c:a880:b5f9:cf8c]) by smtp.gmail.com with ESMTPSA id o189sm1327644qka.86.2021.04.30.05.55.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Apr 2021 05:55:57 -0700 (PDT) Subject: Re: [committed][gdb/testsuite] Make gdb.mi/mi-sym-info.exp more robust against timeouts To: Tom de Vries , gdb-patches@sourceware.org References: <20210430092743.GA24286@delia.home> Message-ID: <1c7ee1d2-9ff0-645c-3a0e-b6d1ed3f328f@linaro.org> Date: Fri, 30 Apr 2021 09:55:54 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210430092743.GA24286@delia.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , From: Luis Machado via Gdb-patches Reply-To: Luis Machado Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Wouldn't it be more reliable to do line-by-line matching instead of sprinkling timeouts across the test? Or so I've been told. This doesn't seem to be an instance where GDB is taking too long, but rather that the MI output is very verbose, right? On 4/30/21 6:27 AM, Tom de Vries wrote: > Hi, > > Once in a while, I run into this timeout: > ... > FAIL: gdb.mi/mi-sym-info.exp: List all variables from debug information \ > only (timeout) > ... > > I can make the timeout reproducible by setting timeout to 8s (instead of the > default 10s) for the duration of that test. > > Make the test-case more stable by fixing all timeouts caused by setting > timeout to 5, either by adding with_timeout_factor, or increasing its factor. > > Tested on x86_64-linux. Also tested in parallel with stress -c 5, to simulate > a busy system in another way. > > Committed to trunk. > > Thanks, > - Tom > > [gdb/testsuite] Make gdb.mi/mi-sym-info.exp more robust against timeouts > > gdb/testsuite/ChangeLog: > > 2021-04-30 Tom de Vries > > * gdb.mi/mi-sym-info.exp: Add with_timeout_factor, and increase > existing timeout factors. > > --- > gdb/testsuite/gdb.mi/mi-sym-info.exp | 70 +++++++++++++++++++----------------- > 1 file changed, 37 insertions(+), 33 deletions(-) > > diff --git a/gdb/testsuite/gdb.mi/mi-sym-info.exp b/gdb/testsuite/gdb.mi/mi-sym-info.exp > index f7f574aaeae..18f85182a7b 100644 > --- a/gdb/testsuite/gdb.mi/mi-sym-info.exp > +++ b/gdb/testsuite/gdb.mi/mi-sym-info.exp > @@ -55,42 +55,46 @@ set type_syms \ > > # Fetch all functions, variables and types without any non-debug > # symbols. > -set testname "List all functions from debug information only" > -set cmd "111-symbol-info-functions" > -set state 0 > -gdb_test_multiple $cmd $testname -prompt "${mi_gdb_prompt}$" { > - -re "111\\^done,symbols=\{debug=\\\[${symtab_re}" { > - if { $state == 0 } { incr state } > - exp_continue > - } > - -re ",${symtab_re}" { > - exp_continue > - } > - -re "\\\]\}\r\n${mi_gdb_prompt}$" { > - if { $state == 1 } { > - pass $gdb_test_name > - } else { > - fail $gdb_test_name > +with_timeout_factor 2 { > + set testname "List all functions from debug information only" > + set cmd "111-symbol-info-functions" > + set state 0 > + gdb_test_multiple $cmd $testname -prompt "${mi_gdb_prompt}$" { > + -re "111\\^done,symbols=\{debug=\\\[${symtab_re}" { > + if { $state == 0 } { incr state } > + exp_continue > + } > + -re ",${symtab_re}" { > + exp_continue > + } > + -re "\\\]\}\r\n${mi_gdb_prompt}$" { > + if { $state == 1 } { > + pass $gdb_test_name > + } else { > + fail $gdb_test_name > + } > } > } > } > > -set testname "List all variables from debug information only" > -set cmd "112-symbol-info-variables" > -set state 0 > -gdb_test_multiple $cmd $testname -prompt "${mi_gdb_prompt}$" { > - -re "112\\^done,symbols=\{debug=\\\[${symtab_re}" { > - if { $state == 0 } { incr state } > - exp_continue > - } > - -re ",${symtab_re}" { > - exp_continue > - } > - -re "\\\]\}\r\n${mi_gdb_prompt}$" { > - if { $state == 1 } { > - pass $gdb_test_name > - } else { > - fail $gdb_test_name > +with_timeout_factor 2 { > + set testname "List all variables from debug information only" > + set cmd "112-symbol-info-variables" > + set state 0 > + gdb_test_multiple $cmd $testname -prompt "${mi_gdb_prompt}$" { > + -re "112\\^done,symbols=\{debug=\\\[${symtab_re}" { > + if { $state == 0 } { incr state } > + exp_continue > + } > + -re ",${symtab_re}" { > + exp_continue > + } > + -re "\\\]\}\r\n${mi_gdb_prompt}$" { > + if { $state == 1 } { > + pass $gdb_test_name > + } else { > + fail $gdb_test_name > + } > } > } > } > @@ -150,7 +154,7 @@ gdb_test_multiple $cmd ${testname} -prompt "${mi_gdb_prompt}$" { > } > } > > -with_timeout_factor 2 { > +with_timeout_factor 4 { > set testname "List all variables" > set cmd "115-symbol-info-variables --include-nondebug" > set state 0 >