From patchwork Mon Apr 16 10:24:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 152779 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]) by ozlabs.org (Postfix) with SMTP id 35ECAB6FD1 for ; Mon, 16 Apr 2012 20:24:32 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1335176673; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=9/wlI4heowVClHUXr+cjYQck7ts=; b=KGgYsqLPgQtAV3L efzpXowrGRaiS1u7FlwK2IHbxSanHVY/S9c41GzbAKNUNt+8/hKNjUucmArLjLc/ GwKqpiwE2paqKNUm0byxMrOLbVT6iocWEg4mtHecNLM3e/amV4LEYu0ZbK92mqzK YhI3DWBOw8952X+TmTWdplyiLb4o= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Xh3TfXS0YTh1YsHTTJK9VxPMSXUWChHLFCKUs2440E+jPjARGrtQaOXw6J/gNI G1fGeYU/VqYvZe6oiq/IEIQxn2inPQiemLFWb4B8vo1/3Z4SWhJDnNhBWUlXOmLP BbkFoJJKvmXziqJ4nuCP8Z2TFYJMRaQfkov4WWFvco7W0=; Received: (qmail 16997 invoked by alias); 16 Apr 2012 10:24:24 -0000 Received: (qmail 16986 invoked by uid 22791); 16 Apr 2012 10:24:22 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Apr 2012 10:24:07 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id F22129A4; Mon, 16 Apr 2012 12:24:05 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NFnEvY-uZIFU; Mon, 16 Apr 2012 12:24:02 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 466199A3; Mon, 16 Apr 2012 12:24:02 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id q3GAO1b3011710; Mon, 16 Apr 2012 12:24:01 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Xinliang David Li Subject: [testsuite] Fix plugin testsuite, remove uses of TODO_dump_func (PR testsuite/52948) Date: Mon, 16 Apr 2012 12:24:01 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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 As reported in PR testsuite/52948, several plugin testcases were failing since the removal of TODO_dump_func: UNRESOLVED: selfassign.c compilation, -I. -I/vol/gcc/src/hg/trunk/local/gcc/testsuite -I/vol/gcc/src/hg/trunk/local/gcc/testsuite/../../gcc -I/var/gcc/regression/trunk/11-gcc/build/gcc/testsuite/g++/../../../gcc -I/vol/gcc/src/hg/trunk/local/gcc/testsuite/../../include -I/vol/gcc/src/hg/trunk/local/gcc/testsuite/../../libcpp/include -I/vol/gcc/include -I/vol/gcc/include -I/vol/gcc/include -I/var/gcc/regression/trunk/11-gcc/build/gcc/testsuite/g++/../../../intl -O -DIN_GCC -fPIC -shared I have no idea why this has been missed when testing the removal patch, because the failures are very prominent in mail-report.log (maybe because the incorrectly show up as UNRESOLVED instead of FAIL). This patch fixes this by removing the uses of TODO_dump_func from the affected plugins. At the same time, I'm finally fixing some issues with the plugin tests that have annoyed me for quite some time: * The tests should log the full (relative) path to the testcase, not only the basenames. * Using unresolved to report failures to compile the plugins is wrong: this should be fail instead, and the pass case needs to be logged as well. * There's no point in logging the options used to compile the plugin: they are completely internal to plugin-support.exp and not in any way influenced by the testsuite drivers. There's one issue I didn't fix due to the large number of (bad) precedents in the testsuite: * If a plugin fails to compile, the compilations using it should become unresolved instead of just returning early. Bootstrapped without regressions on i386-pc-solaris2.11, installed on mainline. Rainer 2012-04-14 Rainer Orth gcc/testsuite: * lib/plugin-support.exp (plugin-test-execute): Properly determine testcase name. Use fail, pass instead of unresolved. Don't log $optstr. PR testsuite/52948 * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Remove TODO_dump_func. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Likewise. * gcc.dg/plugin/one_time_plugin.c (one_pass): Likewise. * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Likewise. # HG changeset patch # Parent 12b8d919dd25eba78689a9fef617cc5428a57c33 Fix plugin testsuite, uses of TODO_dump_func diff --git a/gcc/testsuite/g++.dg/plugin/dumb_plugin.c b/gcc/testsuite/g++.dg/plugin/dumb_plugin.c --- a/gcc/testsuite/g++.dg/plugin/dumb_plugin.c +++ b/gcc/testsuite/g++.dg/plugin/dumb_plugin.c @@ -72,7 +72,7 @@ static struct gimple_opt_pass pass_dumb_ 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_dump_func /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; diff --git a/gcc/testsuite/g++.dg/plugin/selfassign.c b/gcc/testsuite/g++.dg/plugin/selfassign.c --- a/gcc/testsuite/g++.dg/plugin/selfassign.c +++ b/gcc/testsuite/g++.dg/plugin/selfassign.c @@ -276,7 +276,7 @@ static struct gimple_opt_pass pass_warn_ 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_dump_func /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; diff --git a/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c b/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c --- a/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c +++ b/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c @@ -42,7 +42,7 @@ struct gimple_opt_pass one_pass = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_dump_func /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; diff --git a/gcc/testsuite/gcc.dg/plugin/selfassign.c b/gcc/testsuite/gcc.dg/plugin/selfassign.c --- a/gcc/testsuite/gcc.dg/plugin/selfassign.c +++ b/gcc/testsuite/gcc.dg/plugin/selfassign.c @@ -276,7 +276,7 @@ static struct gimple_opt_pass pass_warn_ 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_dump_func /* todo_flags_finish */ + 0 /* todo_flags_finish */ } }; diff --git a/gcc/testsuite/lib/plugin-support.exp b/gcc/testsuite/lib/plugin-support.exp --- a/gcc/testsuite/lib/plugin-support.exp +++ b/gcc/testsuite/lib/plugin-support.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -70,7 +70,8 @@ proc plugin-test-execute { plugin_src pl set base [file rootname $basename] set plugin_lib $base.so - verbose "Test the plugin $basename" 1 + set testcase [dg-trim-dirname $srcdir $plugin_src] + verbose "Test the plugin $testcase" 1 # Build the plugin itself set extra_flags [plugin-get-options $plugin_src] @@ -113,8 +114,12 @@ proc plugin-test-execute { plugin_src pl set_ld_library_path_env_vars if { $status != 0 } then { - unresolved "$basename compilation, $optstr" + fail "$testcase compilation" + # Strictly, this is wrong: the tests compiled with the plugin should + # become unresolved instead. return + } else { + pass "$testcase compilation" } # Compile the input source files with the plugin