From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33882 invoked by alias); 4 Dec 2018 16:33:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 33871 invoked by uid 89); 4 Dec 2018 16:33:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1290, HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Dec 2018 16:33:23 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0959E315485A; Tue, 4 Dec 2018 16:33:22 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 269D15DD8A; Tue, 4 Dec 2018 16:33:20 +0000 (UTC) Subject: Re: [PATCH] gdb/testsuite/sim: Remove redundant setting of timeout To: Simon Marchi References: <20181204113345.717-1-andrew.burgess@embecosm.com> <07a27e33-ca57-f4be-a055-8d4070b03554@redhat.com> <37e9f834bac94720a257148d45bd0325@polymtl.ca> <3c7ef445a7a59fa94f8eaee578d24177@polymtl.ca> Cc: Andrew Burgess , gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Tue, 04 Dec 2018 16:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <3c7ef445a7a59fa94f8eaee578d24177@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-12/txt/msg00038.txt.bz2 On 12/04/2018 04:15 PM, Simon Marchi wrote: > On 2018-12-04 11:11, Pedro Alves wrote: >> On 12/04/2018 04:08 PM, Simon Marchi wrote: >>> That's very confusing, to say the least. >> >> Don't shoot the messenger.  :-) > > Hehe, of course. > > In light of this information, I think Andrew's patch is fine.  Do you? Sort of. At least with the removing the tail "set timeout" part, I agree it's not doing anything. As for the verbose call, we print "Timeout is now ..." messages in a lot of places, and if you're looking at the log, I think seeing a "Timeout is now ..." indication without seeing it changed again reads like the timeout was never restored... That's a preexisting problem, of course, since currently we give the impression that we actually changed the timeout at the end of the function but we actually didn't... Still, IMHO, one of these would be a better change: a) - remove the initial verbose call too, or, b) - add "global timeout" at the start of the function, and restore the on-entry value on exit. That way both "Timeout is now ..." messages will be truthful. This is what e.g., testsuiteconfig/sid.exp does. In either case, there will be no imbalance in the verbose output. Thanks, Pedro Alves