This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] gdb.trace, replace wildcard regexp


Michael Snyder wrote:

> Yeah, but these ones really do fail, when the target can't do
> tracepoints.  They need to be run against gdbserver.
> 
> Odd, though, most of the trace tests bail early if the target
> can't do tracepoints.  They don't give arbitrary failures...

Ah, I see.  All the other tests check gdb_target_supports_trace;
this check is missing in packetlen.exp.  The patch below adds the
same logic used by the other tests.

Tested on spu-elf, committed to mainline.

Bye,
Ulrich


ChangeLog:

	* gdb.trace/packetlen.exp: Respect gdb_target_supports_trace.

Index: gdb/testsuite/gdb.trace/packetlen.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/packetlen.exp,v
retrieving revision 1.15
diff -u -p -r1.15 packetlen.exp
--- gdb/testsuite/gdb.trace/packetlen.exp	8 Jun 2010 22:58:03 -0000	1.15
+++ gdb/testsuite/gdb.trace/packetlen.exp	11 Jun 2010 23:23:34 -0000
@@ -39,6 +39,14 @@ gdb_test "tfind none"  ".*" ""
 runto_main
 gdb_reinitialize_dir $srcdir/$subdir
 
+# We generously give ourselves one "pass" if we successfully
+# detect that this test cannot be run on this target!
+if { ![gdb_target_supports_trace] } then {
+    pass "Current target does not support trace"
+    return 1;
+
+}
+
 # If testing on a remote host, download the source file.
 # remote_download host $srcdir/$subdir/$srcfile
 


-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]