From patchwork Sun Sep 28 03:47:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 3012 Received: (qmail 8138 invoked by alias); 28 Sep 2014 03:51:45 -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 8118 invoked by uid 89); 28 Sep 2014 03:51:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 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; Sun, 28 Sep 2014 03:51:37 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1XY5WH-00002K-LC from Yao_Qi@mentor.com ; Sat, 27 Sep 2014 20:51:33 -0700 Received: from GreenOnly (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.181.6; Sat, 27 Sep 2014 20:51:32 -0700 From: Yao Qi To: Pedro Alves CC: Subject: Re: [PATCH] Skip dlopen-libpthread.exp in cross testing References: <1411631571-30769-1-git-send-email-yao@codesourcery.com> <542436DE.4030005@redhat.com> Date: Sun, 28 Sep 2014 11:47:18 +0800 In-Reply-To: <542436DE.4030005@redhat.com> (Pedro Alves's message of "Thu, 25 Sep 2014 16:38:06 +0100") Message-ID: <87oau0wgmx.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Pedro Alves writes: > I think we should put an "error" call in build_executable_own_libs > too, so that whoever adds the next test that uses this doesn't > end up forgetting the same thing. OK, how about this below? Subject: [PATCH] Error in build_executable_own_libs for non-native target gdb/testsuite: 2014-09-28 Yao Qi * lib/prelink-support.exp (build_executable_own_libs): Error if the target isn't native. diff --git a/gdb/testsuite/lib/prelink-support.exp b/gdb/testsuite/lib/prelink-support.exp index a0fb12b..113a078 100644 --- a/gdb/testsuite/lib/prelink-support.exp +++ b/gdb/testsuite/lib/prelink-support.exp @@ -118,6 +118,10 @@ proc file_copy {src dest} { proc build_executable_own_libs {testname executable sources options {interp ""} {dir ""}} { global subdir + if { ![isnative] } { + error "This proc can be only used for native target." + } + if {[build_executable $testname $executable $sources $options] == -1} { return "" }