From patchwork Tue Apr 8 21:22:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Blaikie X-Patchwork-Id: 436 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 35FCB360078 for ; Tue, 8 Apr 2014 14:23:44 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14314964) id DA1B54718B54; Tue, 8 Apr 2014 14:23:43 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx22.g.dreamhost.com 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 homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id B174B470D724 for ; Tue, 8 Apr 2014 14:23:43 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:date:message-id:subject:from:to :content-type; q=dns; s=default; b=ezoHfO7UbQQYcMJuizSUrP5Q5m3gG vboXb58GjasKtCdfbRcgYzynsubvu8EWxro/LggXDpne8NSC4MW5nBwJG31Ymb7m 5EwAst7zRi7EpkH3SIFep1pvnsv0287dAlnRPx/bzw/6tIbR//t6XIkTyN8/O13A DvU2liNRxaOzHI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:date:message-id:subject:from:to :content-type; s=default; bh=tqtr+hH+n3Cv2o+Z7KDBSnxqCgc=; b=RXp jZhThuRzcIw/K3pe4sHkONYLcWqa6g0ksU7AtdctsmdnXLG0NAGTuu2s1jo/rsoE hxWRxGMZbCdNZ2Obqr7KihB22JSbq/7Uw8M6h2XFMzfpN59PXN2hNeh6OXKRSGKo 7GvRLLSv6M0/76/iPEtUIhDt5Km05I696OmOzsHU= Received: (qmail 10209 invoked by alias); 8 Apr 2014 21:22:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 10184 invoked by uid 89); 8 Apr 2014 21:22:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f182.google.com Received: from mail-qc0-f182.google.com (HELO mail-qc0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 08 Apr 2014 21:22:03 +0000 Received: by mail-qc0-f182.google.com with SMTP id e16so1773287qcx.41 for ; Tue, 08 Apr 2014 14:22:01 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.224.65.67 with SMTP id h3mr7786487qai.43.1396992121166; Tue, 08 Apr 2014 14:22:01 -0700 (PDT) Received: by 10.140.30.74 with HTTP; Tue, 8 Apr 2014 14:22:01 -0700 (PDT) Date: Tue, 8 Apr 2014 14:22:01 -0700 Message-ID: Subject: [PATCH] Suppress explicit dwarf2 tests under Clang due to reliance on global inline asm ordering From: David Blaikie To: Eric Christopher , Doug Evans , gdb-patches@sourceware.org X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in (contrary to my prior claim, I do seem to have commit after review access to gdb (I see my name in the commit log) - I'll just have to figure out how to do that... - so I just need approval, don't need someone to commit this for me) These were all the tests that I could find that had "asm.*\.globl" in a c file. All of them had failures under Clang except for dw2-unresolved.exp, though the resulting dwarf would still be incorrect in that test it was just "getting lucky", I suppose. For sanity I disabled it as well. "unsupported" seemed like the right result to use according to http://ftp.gnu.org/old-gnu/Manuals/dejagnu-1.3/html_chapter/dejagnu_3.html - even though "untested" seems to be often used synonymously (the dejagnu manual seems to indicate that untested shouldn't be used for these sort of cases where there is test coverage it just can't be run in this configuration). >From the commit message/ChangeLog: Flag explicit dwarf2 tests as unsupported under Clang. Clang doesn't guarantee ordering of global and namespace scope inline asm relative to other entities, even at -O0. This ordering is required to define the range labels for the dwarf2 tests containing hardcoded assembly files. Introduce a detection utility function and use that in the handful of test cases that rely on this feature. gdb/testsuite * lib/gdb.exp (has_unreliable_inline_asm_ordering): Utility function for testing support for global or namespace scope inline asm ordering. * gdb.dwarf2/dw2-abs-hi-pc.exp: Unsupported under the above condition. * gdb.dwarf2/dw2-case-insensitive.exp: Ditto * gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Ditto * gdb.dwarf2/dw2-entry-value.exp: Ditto * gdb.dwarf2/dw2-ifort-parameter.exp: Ditto * gdb.dwarf2/dw2-inline-param.exp: Ditto * gdb.dwarf2/dw2-noloc.exp: Ditto * gdb.dwarf2/dw2-param-error.exp: Ditto * gdb.dwarf2/dw2-ref-missing-frame.exp: Ditto * gdb.dwarf2/dw2-skip-prologue.exp: Ditto * gdb.dwarf2/dw2-unresolved.exp: Ditto * gdb.mi/dw2-ref-missing-frame.exp: Ditto commit eabfb416b9f232d64f356e86c77e22f8403d5aa4 Author: David Blaikie Date: Tue Apr 8 14:03:04 2014 -0700 Flag explicit dwarf2 tests as unsupported under Clang. Clang doesn't guarantee ordering of global and namespace scope inline asm relative to other entities, even at -O0. This ordering is required to define the range labels for the dwarf2 tests containing hardcoded assembly files. Introduce a detection utility function and use that in the handful of test cases that rely on this feature. gdb/testsuite * lib/gdb.exp (has_unreliable_inline_asm_ordering): Utility function for testing support for global or namespace scope inline asm ordering. * gdb.dwarf2/dw2-abs-hi-pc.exp: Unsupported under the above condition. * gdb.dwarf2/dw2-case-insensitive.exp: Ditto * gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Ditto * gdb.dwarf2/dw2-entry-value.exp: Ditto * gdb.dwarf2/dw2-ifort-parameter.exp: Ditto * gdb.dwarf2/dw2-inline-param.exp: Ditto * gdb.dwarf2/dw2-noloc.exp: Ditto * gdb.dwarf2/dw2-param-error.exp: Ditto * gdb.dwarf2/dw2-ref-missing-frame.exp: Ditto * gdb.dwarf2/dw2-skip-prologue.exp: Ditto * gdb.dwarf2/dw2-unresolved.exp: Ditto * gdb.mi/dw2-ref-missing-frame.exp: Ditto diff --git gdb/testsuite/ChangeLog gdb/testsuite/ChangeLog index 5fca9d2..2989e20 100644 --- gdb/testsuite/ChangeLog +++ gdb/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2014-04-08 David Blaikie + + * lib/gdb.exp (has_unreliable_inline_asm_ordering): Utility function + for testing support for global or namespace scope inline asm ordering. + * gdb.dwarf2/dw2-abs-hi-pc.exp: Unsupported under the above condition. + * gdb.dwarf2/dw2-case-insensitive.exp: Ditto + * gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Ditto + * gdb.dwarf2/dw2-entry-value.exp: Ditto + * gdb.dwarf2/dw2-ifort-parameter.exp: Ditto + * gdb.dwarf2/dw2-inline-param.exp: Ditto + * gdb.dwarf2/dw2-noloc.exp: Ditto + * gdb.dwarf2/dw2-param-error.exp: Ditto + * gdb.dwarf2/dw2-ref-missing-frame.exp: Ditto + * gdb.dwarf2/dw2-skip-prologue.exp: Ditto + * gdb.dwarf2/dw2-unresolved.exp: Ditto + * gdb.mi/dw2-ref-missing-frame.exp: Ditto + 2014-04-08 Pierre Muller * gdb.base/printcmds.exp (test_artificial_arrays): Disable diff --git gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp index 4ca16cf..81a6079 100644 --- gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp +++ gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp @@ -19,6 +19,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + standard_testfile set executable ${testfile} diff --git gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp index c18533c..a94c841 100644 --- gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp +++ gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp @@ -19,6 +19,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + standard_testfile .c dw2-case-insensitive-debug.S if { [prepare_for_testing ${testfile}.exp ${testfile} \ diff --git gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp index 0579fa4..ff74be0 100644 --- gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp +++ gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp @@ -25,6 +25,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + standard_testfile .S dw2-cp-infcall-ref-static-main.c if { [prepare_for_testing ${testfile}.exp ${testfile} \ diff --git gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp index d1f8e2f..69bb22f 100644 --- gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp +++ gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp @@ -19,6 +19,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + if { [prepare_for_testing dw2-entry-value.exp "dw2-entry-value" {dw2-entry-value-main.c dw2-entry-value.S} {nodebug}] } { return -1 } diff --git gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp index 026e071..f909cb5 100644 --- gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp +++ gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp @@ -22,6 +22,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + standard_testfile .c dw2-ifort-parameter-dw.S # Make some DWARF for the test. diff --git gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp index 82c3ed1..f0f9903 100644 --- gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp +++ gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp @@ -19,6 +19,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + standard_testfile .S dw2-inline-param-main.c if { [prepare_for_testing ${testfile}.exp "${testfile}" \ diff --git gdb/testsuite/gdb.dwarf2/dw2-noloc.exp gdb/testsuite/gdb.dwarf2/dw2-noloc.exp index 0b17bd4..80ba90a 100644 --- gdb/testsuite/gdb.dwarf2/dw2-noloc.exp +++ gdb/testsuite/gdb.dwarf2/dw2-noloc.exp @@ -19,6 +19,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + if { [prepare_for_testing dw2-noloc.exp "dw2-noloc" {dw2-noloc-main.c dw2-noloc.S} {nodebug}] } { return -1 } diff --git gdb/testsuite/gdb.dwarf2/dw2-param-error.exp gdb/testsuite/gdb.dwarf2/dw2-param-error.exp index 11e8f03..0155234 100644 --- gdb/testsuite/gdb.dwarf2/dw2-param-error.exp +++ gdb/testsuite/gdb.dwarf2/dw2-param-error.exp @@ -19,6 +19,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + standard_testfile .S dw2-param-error-main.c if { [prepare_for_testing ${testfile}.exp "${testfile}" \ diff --git gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp index 37b2edf..f07a3f8 100644 --- gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp +++ gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp @@ -19,6 +19,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + standard_testfile .S set srcfuncfile ${testfile}-func.c set srcmainfile ${testfile}-main.c diff --git gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp index 7bea4cf..e350dd0 100644 --- gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp +++ gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp @@ -36,6 +36,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + standard_testfile set executable ${testfile} diff --git gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp index 95d065c..2ffc4f3 100644 --- gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp +++ gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp @@ -19,6 +19,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + if { [prepare_for_testing dw2-unresolved.exp "dw2-unresolved" {dw2-unresolved-main.c dw2-unresolved.S} {nodebug}] } { return -1 } diff --git gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp index 967308f..836d152 100644 --- gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp +++ gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp @@ -22,6 +22,11 @@ if {![dwarf2_support]} { return 0 } +if [has_unreliable_inline_asm_ordering] { + unsupported "Compiler doesn't guarantee ordering of global inline asm relative to other entities" + return 0 +} + standard_testfile .S dw2-ref-missing-frame-func.c dw2-ref-missing-frame-main.c set objsfile [standard_output_file ${testfile}.o] set objfuncfile [standard_output_file ${testfile}-func.o] diff --git gdb/testsuite/lib/gdb.exp gdb/testsuite/lib/gdb.exp index 73e935a..c668c50 100644 --- gdb/testsuite/lib/gdb.exp +++ gdb/testsuite/lib/gdb.exp @@ -2592,6 +2592,10 @@ proc test_compiler_info { {compiler ""} } { return [string match $compiler $compiler_info] } +proc has_unreliable_inline_asm_ordering { } { + return ![get_compiler_info] && [test_compiler_info clang*] +} + proc current_target_name { } { global target_info if [info exists target_info(target,name)] {