This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Handle unsupported "-shared" in gdb1555.exp test
- From: Fred Fish <fnf at ninemoons dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: fnf at redhat dot com
- Date: Tue, 24 Feb 2004 21:57:59 -0700
- Subject: [RFA] Handle unsupported "-shared" in gdb1555.exp test
- Reply-to: fnf at redhat dot com
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 <fnf@redhat.com>
* 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