From patchwork Wed Apr 10 12:25:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 32247 Received: (qmail 13696 invoked by alias); 10 Apr 2019 12:25:49 -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 13686 invoked by uid 89); 10 Apr 2019 12:25:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, MIME_BASE64_BLANKS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=18.04 X-HELO: EUR03-AM5-obe.outbound.protection.outlook.com Received: from mail-eopbgr30066.outbound.protection.outlook.com (HELO EUR03-AM5-obe.outbound.protection.outlook.com) (40.107.3.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Apr 2019 12:25:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O6N6sZ1awzeUrBG4Gv3kcJtrG3k9bTZj72oDbPLapAw=; b=egOBuBDHtmm/PipwvgUYDMoi9MmJSOwA1BQz07xqFx0MtvH+FEEUEqnJUWl/y+nrAUy7ccHp/FnoFbsNIgWygiFueExc/YWc4HYeXq58zgsliKGsVHCOgVpX+J3fYtp7aMHc8VkrhtwOWxJvtJnO1jUTLAeZV1n52lUyiLhKV3E= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.227.22) by DB6PR0802MB2536.eurprd08.prod.outlook.com (10.172.252.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.21; Wed, 10 Apr 2019 12:25:43 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::399b:3a32:bff9:827e]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::399b:3a32:bff9:827e%10]) with mapi id 15.20.1771.016; Wed, 10 Apr 2019 12:25:43 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd , Alan Hayward Subject: [PATCH] Testsuite: Remove pie from trace tests Date: Wed, 10 Apr 2019 12:25:43 +0000 Message-ID: <20190410122539.91815-1-alan.hayward@arm.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-IsSubscribed: yes [I don't know enough about tracing to know if this is a bug or expected behaviour. If this is a bug then maybe we should add some additional pie specific tests, along with a bugzilla entry? Either way, seems sensible to me to disable pie for the existing tests given that they were never written with pie in mind?] Ubuntu/Debian defaults PIE to enabled. This causes the trace tests to fall over due to variables being returned as "unavailable". The tests were never designed to work with pie. Simply ensure the nopie flag is always used for the failing tests. This removes 100+ failures when running native-gdbserver on Ubuntu 18.04. gdb/testsuite/ChangeLog: 2019-04-10 Alan Hayward * gdb.trace/backtrace.exp: Use nopie flag. * gdb.trace/circ.exp: Likewise. * gdb.trace/collection.exp: Likewise. * gdb.trace/ftrace.exp: Likewise. * gdb.trace/mi-trace-unavailable.exp: Likewise. * gdb.trace/mi-traceframe-changed.exp: Likewise. * gdb.trace/qtro.exp: Likewise. * gdb.trace/read-memory.exp: Likewise. * gdb.trace/report.exp: Likewise. * gdb.trace/tfile.exp: Likewise. * gdb.trace/tfind.exp: Likewise. * gdb.trace/unavailable.exp: Likewise. --- gdb/testsuite/gdb.trace/backtrace.exp | 2 +- gdb/testsuite/gdb.trace/circ.exp | 2 +- gdb/testsuite/gdb.trace/collection.exp | 2 +- gdb/testsuite/gdb.trace/ftrace.exp | 2 +- gdb/testsuite/gdb.trace/mi-trace-unavailable.exp | 2 +- gdb/testsuite/gdb.trace/mi-traceframe-changed.exp | 2 +- gdb/testsuite/gdb.trace/qtro.exp | 2 +- gdb/testsuite/gdb.trace/read-memory.exp | 2 +- gdb/testsuite/gdb.trace/report.exp | 2 +- gdb/testsuite/gdb.trace/tfile.exp | 2 +- gdb/testsuite/gdb.trace/tfind.exp | 2 +- gdb/testsuite/gdb.trace/unavailable.exp | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) -- 2.20.1 (Apple Git-117) diff --git a/gdb/testsuite/gdb.trace/backtrace.exp b/gdb/testsuite/gdb.trace/backtrace.exp index 0f60153cb5..24e097135f 100644 --- a/gdb/testsuite/gdb.trace/backtrace.exp +++ b/gdb/testsuite/gdb.trace/backtrace.exp @@ -27,7 +27,7 @@ if ![gdb_trace_common_supports_arch] { } if [prepare_for_testing "failed to prepare" $executable $srcfile \ - [list debug nowarnings]] { + [list debug nowarnings nopie]] { return -1 } diff --git a/gdb/testsuite/gdb.trace/circ.exp b/gdb/testsuite/gdb.trace/circ.exp index d48eca5deb..30ec9b47fc 100644 --- a/gdb/testsuite/gdb.trace/circ.exp +++ b/gdb/testsuite/gdb.trace/circ.exp @@ -17,7 +17,7 @@ load_lib "trace-support.exp" standard_testfile -if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings nopie}]} { return -1 } diff --git a/gdb/testsuite/gdb.trace/collection.exp b/gdb/testsuite/gdb.trace/collection.exp index 8c064385ba..44eccbe865 100644 --- a/gdb/testsuite/gdb.trace/collection.exp +++ b/gdb/testsuite/gdb.trace/collection.exp @@ -19,7 +19,7 @@ load_lib "trace-support.exp" standard_testfile set executable $testfile -if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings nopie}]} { return -1 } diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp index f97c2c6193..702efe76bb 100644 --- a/gdb/testsuite/gdb.trace/ftrace.exp +++ b/gdb/testsuite/gdb.trace/ftrace.exp @@ -53,7 +53,7 @@ set remote_libipa [gdb_load_shlib $libipa] # file unused because linking not done" when building the object. if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ - executable [list debug $additional_flags shlib=$libipa] ] != "" } { + executable [list debug nopie $additional_flags shlib=$libipa] ] != "" } { untested "failed to compile" return -1 } diff --git a/gdb/testsuite/gdb.trace/mi-trace-unavailable.exp b/gdb/testsuite/gdb.trace/mi-trace-unavailable.exp index 5ec4bbc152..f0b3c52728 100644 --- a/gdb/testsuite/gdb.trace/mi-trace-unavailable.exp +++ b/gdb/testsuite/gdb.trace/mi-trace-unavailable.exp @@ -17,7 +17,7 @@ load_lib trace-support.exp standard_testfile trace-unavailable.c -if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] } { +if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug nopie}] } { return -1 } diff --git a/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp b/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp index 781d3646cb..1244b5b273 100644 --- a/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp +++ b/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp @@ -32,7 +32,7 @@ if {![is_remote host] && ![is_remote target]} { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable \ - [list debug nowarnings \ + [list debug nowarnings nopie\ "additional_flags=-DTFILE_DIR=\"$tfile_dir\""]] \ != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.trace/qtro.exp b/gdb/testsuite/gdb.trace/qtro.exp index 9eabfeb51e..d5d912b5b9 100644 --- a/gdb/testsuite/gdb.trace/qtro.exp +++ b/gdb/testsuite/gdb.trace/qtro.exp @@ -22,7 +22,7 @@ load_lib trace-support.exp standard_testfile -if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nopie}]} { return -1 } clean_restart $testfile diff --git a/gdb/testsuite/gdb.trace/read-memory.exp b/gdb/testsuite/gdb.trace/read-memory.exp index 61fc137916..4d19f0074d 100644 --- a/gdb/testsuite/gdb.trace/read-memory.exp +++ b/gdb/testsuite/gdb.trace/read-memory.exp @@ -17,7 +17,7 @@ load_lib "trace-support.exp" standard_testfile -if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nopie}]} { return -1 } diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp index f43fbb7c62..c847ab0c5b 100644 --- a/gdb/testsuite/gdb.trace/report.exp +++ b/gdb/testsuite/gdb.trace/report.exp @@ -27,7 +27,7 @@ if ![gdb_trace_common_supports_arch] { return -1 } if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ - executable {debug nowarnings}] != "" } { + executable {debug nowarnings nopie}] != "" } { untested "failed to compile" return -1 } diff --git a/gdb/testsuite/gdb.trace/tfile.exp b/gdb/testsuite/gdb.trace/tfile.exp index 04f3e98e99..23f4fc58d0 100644 --- a/gdb/testsuite/gdb.trace/tfile.exp +++ b/gdb/testsuite/gdb.trace/tfile.exp @@ -37,7 +37,7 @@ if {![is_remote host] && ![is_remote target]} { standard_testfile if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable \ - [list debug \ + [list debug nopie\ "additional_flags=-DTFILE_DIR=\"$tfile_dir\""]] \ != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.trace/tfind.exp b/gdb/testsuite/gdb.trace/tfind.exp index 2c9996b040..fb58f80196 100644 --- a/gdb/testsuite/gdb.trace/tfind.exp +++ b/gdb/testsuite/gdb.trace/tfind.exp @@ -29,7 +29,7 @@ if ![gdb_trace_common_supports_arch] { } if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \ - executable {debug nowarnings}] != "" } { + executable {debug nowarnings nopie}] != "" } { untested "failed to compile" return -1 } diff --git a/gdb/testsuite/gdb.trace/unavailable.exp b/gdb/testsuite/gdb.trace/unavailable.exp index 23d593e7d3..f3bb54db34 100644 --- a/gdb/testsuite/gdb.trace/unavailable.exp +++ b/gdb/testsuite/gdb.trace/unavailable.exp @@ -19,7 +19,7 @@ standard_testfile unavailable.cc set executable $testfile if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ - {debug nowarnings c++}]} { + {debug nowarnings c++ nopie}]} { return -1 }