From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id F1E5C385802F for ; Thu, 23 Feb 2023 15:02:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F1E5C385802F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 32054378D2; Thu, 23 Feb 2023 15:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1677164556; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TzdNsR7adgBUdZQpOdKAUsbJu1KcW4uu7zK4gkL/7AU=; b=xbqPZBT8QwVAHr64bqb8UBax+nherTqNj9hwZLBhtrBuLTvien3yNpN6iXW9j3K0wN4LoT n9chXwvSuQoDspxhDOcoy4bPEb1J9xJj87TjG/UNbfpl/SNxJD+4/lfnojmoQ5KYVIGcwH yItWt9xX6TTofJh2c3loFl1vK61g3YY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1677164556; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TzdNsR7adgBUdZQpOdKAUsbJu1KcW4uu7zK4gkL/7AU=; b=AtLCV+onyIZq3ObaP+kKl29Hj3oW5Q7y0zrg9HVaM9DObx36Mgu2izMh8anYrjB+pFb3vn BxXffkP1Wik+nEDQ== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id D623D2C141; Thu, 23 Feb 2023 15:02:35 +0000 (UTC) Date: Thu, 23 Feb 2023 15:02:35 +0000 (UTC) From: Richard Biener To: Jakub Jelinek cc: Jason Merrill , Alexandre Oliva , ro@cebitec.uni-bielefeld.de, mikestump@comcast.net, gcc-patches@gcc.gnu.org, nathan@acm.org Subject: Re: [PATCH] testsuite: Fix up modules.exp [PR108899] In-Reply-To: Message-ID: References: <00f5cbe1-05b7-0e42-0b46-1e36d1e4e8b3@redhat.com> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, 23 Feb 2023, Jakub Jelinek wrote: > Hi! > > On Wed, Feb 22, 2023 at 02:33:42PM -0300, Alexandre Oliva via Gcc-patches wrote: > > When a multi-source module is found to be unsupported, we fail > > module_cmi_p and subsequent sources. Override proc unsupported to > > mark the result in module_do, and test it to skip module_cmp_p and > > subsequent related tests. > > > > for gcc/testsuite/ChangeLog > > > > * g++.dg/modules/modules.exp: Override unsupported to update > > module_do, and test it after dg-test. > > This patch breaks testing with more than one set of options in > target board, like > make check-g++ RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} modules.exp' > yields: > ... > === g++ Summary for unix/-m32 === > > # of expected passes 7217 > # of unexpected failures 1 > # of expected failures 18 > # of unsupported tests 2 > Running target unix/-m64 > ... > ERROR: tcl error sourcing /home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp. > ERROR: tcl error code TCL OPERATION RENAME TARGET_EXISTS > ERROR: can't rename to "saved-unsupported": command already exists > while executing > "rename unsupported saved-unsupported" > (file "/home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp" line 322) > invoked from within > "source /home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp" > ("uplevel" body line 1) > invoked from within > "uplevel #0 source /home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp" > invoked from within > "catch "uplevel #0 source $test_file_name" msg" > > In other spots where we in *.exp files rename some routine, we guard that > and the following patch does that for modules.exp too. > > Tested with running > make check-g++ RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} modules.exp' > again which now works properly again. > > Ok for trunk? OK. > 2023-02-23 Jakub Jelinek > > PR testsuite/108899 > * g++.dg/modules/modules.exp: Only override unsupported if it > exists and saved-unsupported doesn't. > > --- gcc/testsuite/g++.dg/modules/modules.exp.jj 2023-02-22 20:50:34.208421799 +0100 > +++ gcc/testsuite/g++.dg/modules/modules.exp 2023-02-23 13:07:40.207320104 +0100 > @@ -319,11 +319,15 @@ cleanup_module_files [find $DEFAULT_REPO > # so that, after an unsupported result in dg-test, we can skip rather > # than fail subsequent related tests. > set module_do {"compile" "P"} > -rename unsupported saved-unsupported > -proc unsupported { args } { > - global module_do > - lset module_do 1 "N" > - return [saved-unsupported $args] > +if { [info procs unsupported] != [list] \ > + && [info procs saved-unsupported] == [list] } { > + rename unsupported saved-unsupported > + > + proc unsupported { args } { > + global module_do > + lset module_do 1 "N" > + return [saved-unsupported $args] > + } > } > > # not grouped tests, sadly tcl doesn't have negated glob > > > Jakub > > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman; HRB 36809 (AG Nuernberg)