Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Handle unsupported "-shared" in gdb1555.exp test
@ 2004-02-25  4:58 Fred Fish
  2004-02-25  5:19 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Fred Fish @ 2004-02-25  4:58 UTC (permalink / raw)
  To: gdb-patches; +Cc: fnf

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-25  5:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-25  4:58 [RFA] Handle unsupported "-shared" in gdb1555.exp test Fred Fish
2004-02-25  5:19 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox