This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] gdb.trace, replace wildcard regexp
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: msnyder at vmware dot com (Michael Snyder)
- Cc: gdb-patches at sourceware dot org (gdb-patches at sourceware dot org), pedro at codesourcery dot com (Pedro Alves)
- Date: Sat, 12 Jun 2010 01:30:40 +0200 (CEST)
- Subject: 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