From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 2AAD838A9096 for ; Mon, 20 Feb 2023 09:50:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AAD838A9096 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=redhat.com Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTxmU-0005B0-Sj for gcc-patches@gcc.gnu.org; Sun, 19 Feb 2023 23:28:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676867279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ahvLK+8+1shhnF8mYQrr5NGkoSvugHayXjK7EhxCLAI=; b=JVyq9yzKoiNUyHfy4/rvLtzT08u93huNO/wN5hXBgC1bHLdYzUKxMshcNW5mZmDDMLfbnl ZbDDT6btu/wHMOTMTe5b6DFV58QQLRJQ8h48oS3Qa6vLD0mlVygOVJUWYvQ+CFp2K+m9qN XTjIUQaFxxKGKUlUuxbTl5Tp9Fh/D+I= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676867281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ahvLK+8+1shhnF8mYQrr5NGkoSvugHayXjK7EhxCLAI=; b=FRVywMCPA+kxRW6f9GQBdzMK5QyjV/MH4PeDaIhAKyQt2x7N8+VF91cb1q5f+Y1x9w5dWz VevsGBAaN7uvOd63cdgXHW00+xEKs2K/2sNnCsykGx7vaJmu+ziE8xpFYZ5bpCPhqKmbLg WhXc6N2mUcn7OplWaRI88Q6RTgDPs5s= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-637-35ij62UiOoKcKeRlkh9HVA-1; Sun, 19 Feb 2023 23:27:57 -0500 X-MC-Unique: 35ij62UiOoKcKeRlkh9HVA-1 Received: by mail-qk1-f199.google.com with SMTP id ay40-20020a05620a17a800b00720f9e6e3e2so871027qkb.13 for ; Sun, 19 Feb 2023 20:27:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ahvLK+8+1shhnF8mYQrr5NGkoSvugHayXjK7EhxCLAI=; b=Eqd21SujadT+DsJHx4lcpjAYmyLdCnHI7SRuhHXVBKH4gcSoAv8UwJd0J1HXSQJwgh Omd2WOhXlqBcp1Jk9EkU813iYlEuG5sVyabx+0jpDPu4KorOYrCqMkKAzmQdUj3iB8p8 HwhQCZ9qi851xCGXVT+F7vZQzQ4ONbSquuBTfsSwNjQ7nfk5Q626GB0tmufSUZlhJ9O5 b2j8AeycBh7jskvO/XM8OiWIV9IxZW2gdemUKJwFaRA3DkeT3jXMNiazXYNJUIyVXmmP IHSUKIvOcfwGUTGoUeq2QxyHWnTwt8TEJtZrDGZRWogPkw4ix31nV18/eCiAURRJbnTa Bf8A== X-Gm-Message-State: AO0yUKVWG4oB1w/DAwAqBzWFc1k29zf/0gEuUbJeAx77CRSBYIoEXMsG xVx8wLR/ou3jACaLJjfDPtwgj6b9vwtyziN7hl7Ff++zJS2LY3jBkf1XJdJSZiA0ktpPLuCXSFh aK2NLlRIMWlpCWLMB1g== X-Received: by 2002:a05:622a:189c:b0:3b6:3577:2fe7 with SMTP id v28-20020a05622a189c00b003b635772fe7mr13605955qtc.49.1676867277059; Sun, 19 Feb 2023 20:27:57 -0800 (PST) X-Google-Smtp-Source: AK7set+CSnl7qro9opo7nyWhZeVRQJzEFvv6SovcqP/Svr1HbTpH7dP7wauh54V3zGZj301AP0i2lQ== X-Received: by 2002:a05:622a:189c:b0:3b6:3577:2fe7 with SMTP id v28-20020a05622a189c00b003b635772fe7mr13605937qtc.49.1676867276757; Sun, 19 Feb 2023 20:27:56 -0800 (PST) Received: from [192.168.1.108] (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id x78-20020a376351000000b006bb82221013sm7983154qkb.0.2023.02.19.20.27.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Feb 2023 20:27:56 -0800 (PST) Message-ID: <00f5cbe1-05b7-0e42-0b46-1e36d1e4e8b3@redhat.com> Date: Sun, 19 Feb 2023 23:27:54 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH] Skip module_cmi_p and related unsupported module test To: Alexandre Oliva , gcc-patches@gcc.gnu.org Cc: ro@CeBiTec.Uni-Bielefeld.DE, mikestump@comcast.net, nathan@acm.org References: From: Jason Merrill In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=170.10.129.124; envelope-from=jason@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9,DKIMWL_WL_HIGH=-0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DKIM_VALID_EF=-0.1,NICE_REPLY_A=-0.09,RCVD_IN_DNSWL_NONE=-0.0001,RCVD_IN_MSPIKE_H2=-0.001,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_PASS,SPF_NONE,TXREP autolearn=unavailable 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 2/17/23 22:55, Alexandre Oliva 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. Hmm, I guess the problem that the modules tests are trying to use dg-test as a subroutine, and can't get at the result of the test to skip later processing? Seems like LTO deals with the same issue by not using dg-test at all. This seems like an ugly kludge around that problem, but I don't have any clever ideas of a better approach short of rewriting everything. So, OK with a comment explaining the rationale above your overridden "unsupported". Also, your commit subject line needs a subsystem tag, I guess "testsuite:" in this case. > Regstrapped on x86_64-linux-gnu. > Tested on arm-vxworks7 (gcc-12) and arm-eabi (trunk). Ok to install? > > for gcc/testsuite/ChangeLog > > * g++.dg/modules/modules.exp: Override unsupported to update > module_do, and test it after dg-test. > --- > gcc/testsuite/g++.dg/modules/modules.exp | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/gcc/testsuite/g++.dg/modules/modules.exp b/gcc/testsuite/g++.dg/modules/modules.exp > index 61994b059457b..ba1287427bf05 100644 > --- a/gcc/testsuite/g++.dg/modules/modules.exp > +++ b/gcc/testsuite/g++.dg/modules/modules.exp > @@ -315,6 +315,14 @@ proc module-check-requirements { tests } { > # cleanup any detritus from previous run > cleanup_module_files [find $DEFAULT_REPO *.gcm] > > +set module_do {"compile" "P"} > +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 > foreach test [prune [lsort [find $srcdir/$subdir {*.[CH]}]] \ > "$srcdir/$subdir/*_?.\[CH\]"] { > @@ -327,6 +335,9 @@ foreach test [prune [lsort [find $srcdir/$subdir {*.[CH]}]] \ > set module_cmis {} > verbose "Testing $nshort $std" 1 > dg-test $test "$std" $DEFAULT_MODFLAGS > + if { [lindex $module_do 1] == "N" } { > + continue > + } > set testcase [string range $test [string length "$srcdir/"] end] > cleanup_module_files [module_cmi_p $testcase $module_cmis] > } > @@ -372,6 +383,9 @@ foreach src [lsort [find $srcdir/$subdir {*_a.[CHX}]] { > } > } > dg-test -keep-output $test "$std" $DEFAULT_MODFLAGS > + if { [lindex $module_do 1] == "N" } { > + break > + } > set testcase [string range $test [string length "$srcdir/"] end] > lappend mod_files [module_cmi_p $testcase $module_cmis] > } >