From patchwork Wed Aug 17 20:04:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 110346 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 51824B6F9F for ; Thu, 18 Aug 2011 06:05:14 +1000 (EST) Received: (qmail 4594 invoked by alias); 17 Aug 2011 20:05:10 -0000 Received: (qmail 4578 invoked by uid 22791); 17 Aug 2011 20:05:09 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Aug 2011 20:04:48 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7HK4mbP002039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Aug 2011 16:04:48 -0400 Received: from houston.quesejoda.com (vpn-229-116.phx2.redhat.com [10.3.229.116]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7HK4lP1004167; Wed, 17 Aug 2011 16:04:48 -0400 Message-ID: <4E4C1EDF.9060602@redhat.com> Date: Wed, 17 Aug 2011 15:04:47 -0500 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 MIME-Version: 1.0 To: Andrew MacLeod , gcc-patches Subject: [cxx-mem-model] handle xfails in the memmodel test harness 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 With this patch we can now XFAIL tests that are expected to fail at runtime. This is how it's used: /* { dg-final { memmodel-gdb-test { xfail x86*-*-* } } } */ Note, that the test will still run. This is needed for an upcoming known-to-fail test Andrew will contribute shortly. Committed to branch. * lib/gcc-memmodel-gdb-test.exp (memmmodel-gdb-test): Handle # A cleaner solution would require a new DejaGnu release. Index: lib/gcc-memmodel-gdb-test.exp =================================================================== --- lib/gcc-memmodel-gdb-test.exp (revision 177836) +++ lib/gcc-memmodel-gdb-test.exp (working copy) @@ -21,9 +21,15 @@ # # Call 'fail' if a given test printed "FAIL:", otherwise call 'pass'. -proc memmodel-gdb-test { } { +proc memmodel-gdb-test { args } { if { ![isnative] || [is_remote target] } { return } + if { [llength $args] == 1 } { + switch [dg-process-target [lindex $args 0]] { + "F" { setup_xfail "*-*-*" } + } + } + # This assumes that we are three frames down from dg-test, and that # it still stores the filename of the testcase in a local variable "name".