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 2A61F3858028 for ; Fri, 26 Mar 2021 07:09:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2A61F3858028 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.221.27]) by mx2.suse.de (Postfix) with ESMTP id 40E55ADD7; Fri, 26 Mar 2021 07:09:57 +0000 (UTC) Subject: Re: [PATCH] Add check-valgrind To: Mark Wielaard Cc: dwz@sourceware.org, jakub@redhat.com References: <20210325135716.GA10490@delia> <20210325203254.GG2685@wildebeest.org> From: Tom de Vries Message-ID: Date: Fri, 26 Mar 2021 08:09:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210325203254.GG2685@wildebeest.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, 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: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2021 07:09:59 -0000 On 3/25/21 9:32 PM, Mark Wielaard wrote: > Hi, > > On Thu, Mar 25, 2021 at 02:57:17PM +0100, Tom de Vries wrote: >> Add a make target check-valgrind, that applies valgrind to dwz when used in >> the testsuite. >> >> Any comments? > > It might be good to simply always run under valgrind when it is > installed. That makes make check slightly slower by default, but it > makes sure things are always also ran under valgrind if available. > Hmm, makes sense. Make check with dwz-tests.exp goes from 11s to 34s on my laptop, which is still bearable. OTOH, I also run the external testsuite once in a while, and that one goes from 1m19s to 15m17s, which I don't like as default behaviour. So I'm not sure yet about making this the default. > To make sure that a valgrind tool error really causes a check failure use > --error-exitcode=99 (or some other non-zero code): > > --error-exitcode= [default: 0] > Specifies an alternative exit code to return if Valgrind reported > any errors in the run. When set to the default value (zero), the > return value from Valgrind will always be the return value of the > process being simulated. When set to a nonzero value, that value is > returned instead, if Valgrind detects any errors. This is useful > for using Valgrind as part of an automated test suite, since it > makes it easy to detect test cases for which Valgrind has reported > errors, just by inspecting return codes. > Thanks, I've included that, and committed. - Tom