From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27994 invoked by alias); 25 Feb 2004 04:58:10 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27987 invoked from network); 25 Feb 2004 04:58:08 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 25 Feb 2004 04:58:08 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i1P4w7b12512 for ; Tue, 24 Feb 2004 23:58:07 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i1P4w5M16829 for ; Tue, 24 Feb 2004 23:58:05 -0500 Received: from 192.168.1.129 (vpn50-2.rdu.redhat.com [172.16.50.2]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i1P4w2X14320; Tue, 24 Feb 2004 20:58:02 -0800 From: Fred Fish Reply-To: fnf@redhat.com To: gdb-patches@sources.redhat.com Subject: [RFA] Handle unsupported "-shared" in gdb1555.exp test Date: Wed, 25 Feb 2004 04:58:00 -0000 User-Agent: KMail/1.5.4 Cc: fnf@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200402242157.59177.fnf@ninemoons.com> X-SW-Source: 2004-02/txt/msg00722.txt.bz2 There are 8 gdb tests that attempt to create a shared file using the "-shared" option: gdb.base/gdb1555.exp gdb.base/pending.exp gdb.base/shlib-call.exp gdb.base/shreloc.exp:51 gdb.base/so-impl-ld.exp gdb.base/so-indr-cl.exp gdb.base/solib.exp:101 gdb.threads/tls-shared.exp All of them, with the exception of gdb1555.exp and tls-shared.exp, first do some test to see if this is expected to work for the target. The shreloc.exp test uses: if {[istarget *-elf*] || [istarget *-coff] || [istarget *-aout]} then { verbose "test skipped - shared object files not supported by this target." return 0 } The tls-shared.exp test actually tries to run the compile, but it uses a special version of gdb_compile that doesn't pass on a link failure to the user output. The rest of the tests use: # are we on a target board? if ![isnative] then { return 0 } Since gdb1555.exp does nothing to avoid or hide link failures with -shared the following type of message can appear in the user output for targets where -shared isn't supported, such as sh-elf: Running /src/sourceware/gdb/src/gdb/testsuite/gdb.base/gdb1555.exp ... gdb compile failed, /links1/usr/local/sourceware/bin/../lib/gcc/sh-elf/3.5.0/../../../../sh-elf/bin/ld: warning: cannot find entry symbol start; defaulting to 0000000000001038 I propose that the gdb1555.exp test use the "isnative" check. Attached is a patch for review and comment. -Fred 2004-02-24 Fred Fish * gdb.base/gdb1555.exp: Skip test if not a native target. Index: gdb.base/gdb1555.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/gdb1555.exp,v retrieving revision 1.1 diff -c -p -r1.1 gdb1555.exp *** gdb.base/gdb1555.exp 18 Feb 2004 03:35:08 -0000 1.1 --- gdb.base/gdb1555.exp 25 Feb 2004 04:40:38 -0000 *************** if $tracelevel then { *** 25,30 **** --- 25,35 ---- strace $tracelevel } + # are we on a target board? + if ![isnative] then { + return 0 + } + set testfile gdb1555-main set libfile gdb1555 set srcfile ${testfile}.c