From patchwork Thu Jul 3 10:54:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 366827 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1994F140127 for ; Thu, 3 Jul 2014 20:54:54 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=aNJ9j2A8R7UVrv+Y b4tN79k6U2+fX2rwUoCMItfPEjNoy3guGYq34wd1+9vOmZh7MabpHsKmJgMP4DYB ThArdxLRy7NvrUd/ulgSQvWxPWyoMv5njeJEor855sWBVI724s68Oab2PL2+Ydss 3M3i8o/vr6ex/HGtJchra2FjAeI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=3AwNS3+OLSQ8J0AhwrYcxA ntwt4=; b=W3SQdj8D+gVwhdwb/cpIWnCVfpnGR3BfFh2K8rdfxPN0vCShFpFLyx COrrqWZSlSUMc7G/Nr59BR78e7Uby6WOfV+rF+p2BJ03wJ+9MgK+2ZPaDul2hgTa 4ehr/1/69BYW1229aXKK4mz4sUM8pBzBLjfM5K+YTR2KrMFpuNz4I= Received: (qmail 26931 invoked by alias); 3 Jul 2014 10:54:43 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 26895 invoked by uid 89); 3 Jul 2014 10:54:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Jul 2014 10:54:41 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1X2eex-00042Q-Q3 from Thomas_Schwinge@mentor.com ; Thu, 03 Jul 2014 03:54:35 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 3 Jul 2014 03:54:35 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Thu, 3 Jul 2014 11:54:34 +0100 From: Thomas Schwinge To: , CC: , , , , , Subject: Re: gfortran-dg-runtest, torture options In-Reply-To: <87y5853l55.fsf@schwinge.name> References: <87y5853l55.fsf@schwinge.name> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Thu, 3 Jul 2014 12:54:32 +0200 Message-ID: <87k37uvhjr.fsf@schwinge.name> MIME-Version: 1.0 Hi! On Tue, 13 Aug 2013 13:06:30 +0200, I wrote: > I noticed something strange in the libgomp testresults (but not > necessarily specific to libgomp): an "arbitrary" set of the Fortran > execution tests are run just for -O, and others for each of the full set > of torture options: -O0, -O1, -O2, and so on. After some time I realized > it's the set of tests that contain an explicit »dg-do run« directive that > are run for all torture levels, and the tests that inherit the default > »set dg-do-what-default run« from libgomp/testsuite/lib/libgomp.exp are > only run for -O. This is coming from the special handling in > gcc/testsuite/lib/gfortran-dg.exp:gfortran-dg-test (which seems to be > present approximately "forever"). Should this consider the > dg-do-what-default case, too? Why is torture testing done only for > execution tests? And, why only for Fortran? Is this behavior generally > intentional -- of course, bigger testing coverage is nice, but this seems > a bit arbitrary to me? Thanks Janis and Mikael for your replies (nearly a year ago...), but still my questions remain to be answered: in my understanding, the libgomp testsuite is not the place for compiler torture testing (different optimization flags and all that -- and, that is done for Fortran only; gfortran-dg-runtest), but rather, I understand the libgomp testsuite to be the place for libgomp library testing ;-), and hence I propose to remove that special casing of Fortran test cases: A follow-up patch could then be to remove all the redundant »dg-do run« directives from the individual test cases, as that's the default set in libgomp/testsuite/lib/libgomp.exp: »set dg-do-what-default run«. Grüße, Thomas --- libgomp/testsuite/lib/libgomp-dg.exp +++ libgomp/testsuite/lib/libgomp-dg.exp @@ -5,3 +5,19 @@ proc libgomp-dg-test { prog do_what extra_tool_flags } { proc libgomp-dg-prune { system text } { return [gcc-dg-prune $system $text] } + +# Modified dg-runtest that deal with Fortran modules cleanup. +proc dg-runtest-fortran { testcases flags default-extra-flags } { + global runtests + + foreach testcase $testcases { + # If we're only testing specific files and this isn't one of them, skip it. + if {![runtest_file_p $runtests $testcase]} { + continue + } + verbose "Testing [file tail [file dirname $testcase]]/[file tail $testcase]" + list-module-names $testcase + dg-test $testcase $flags ${default-extra-flags} + cleanup-modules "" + } +} --- libgomp/testsuite/libgomp.fortran/fortran.exp +++ libgomp/testsuite/libgomp.fortran/fortran.exp @@ -11,6 +11,10 @@ set lang_link_flags "-lgfortran" set lang_test_file_found 0 set quadmath_library_path "../libquadmath/.libs" +# If a testcase doesn't have special options, use these. +if ![info exists DEFAULT_CFLAGS] then { + set DEFAULT_CFLAGS "-O2" +} # Initialize dg. dg-init @@ -60,7 +64,7 @@ if { $lang_test_file_found } { set_ld_library_path_env_vars # Main loop. - gfortran-dg-runtest $tests "" + dg-runtest-fortran $tests "" $DEFAULT_CFLAGS } # All done.