Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] testsuite tfind.exp: If current target don't support trace, try gdbserver.
@ 2012-03-29  9:18 Hui Zhu
  2012-03-29  9:24 ` Pedro Alves
  0 siblings, 1 reply; 13+ messages in thread
From: Hui Zhu @ 2012-03-29  9:18 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

Hi,

When we want to test the trace function that in gdb.trace directory, we 
will got a lot of UNSUPPORTED.  To use this testcase, we need follow way 
in 
http://sourceware.org/gdb/wiki/TestingGDB#Testing_gdbserver_in_a_native_configuration.

So I post a patch add some code if current target don't support trace, 
try gdbserver in tfind.exp.
If this patch goes OK.  I will post patch for other testsuite that 
support by gdbserver.

Thanks.
Hui

2012-03-29  Hui Zhu  <hui_zhu@mentor.com>

	* gdb.trace/tfind.exp: If current target don't support trace,
	try gdbserver.

[-- Attachment #2: testsuite_trace_use_gdbserver.txt --]
[-- Type: text/plain, Size: 883 bytes --]

---
 testsuite/gdb.trace/tfind.exp |   21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

--- a/testsuite/gdb.trace/tfind.exp
+++ b/testsuite/gdb.trace/tfind.exp
@@ -36,10 +36,25 @@ gdb_test "tfind none"  ".*" ""
 runto_main
 gdb_reinitialize_dir $srcdir/$subdir
 
-if { ![gdb_target_supports_trace] } then {
-    unsupported "Current target does not support trace"
-    return 1;
+if ![gdb_target_supports_trace] {
+    load_lib gdbserver-support.exp
 
+    clean_restart $testfile
+
+    if { [skip_gdbserver_tests] } {
+	unsupported "target does not support trace"
+	return -1;
+    }
+
+    gdb_test "disconnect" ".*"
+
+    gdbserver_run ""
+    gdb_reinitialize_dir $srcdir/$subdir
+
+    if ![gdb_target_supports_trace] {
+	unsupported "target does not support trace"
+	return -1;
+    }
 }
 
 # If testing on a remote host, download the source file.

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

end of thread, other threads:[~2012-03-29 15:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-29  9:18 [PATCH] testsuite tfind.exp: If current target don't support trace, try gdbserver Hui Zhu
2012-03-29  9:24 ` Pedro Alves
2012-03-29  9:29   ` Hui Zhu
2012-03-29  9:46     ` Pedro Alves
2012-03-29 14:02       ` Hui Zhu
2012-03-29 14:13         ` Pedro Alves
2012-03-29 14:23           ` Hui Zhu
2012-03-29 14:26             ` Pedro Alves
2012-03-29 14:39               ` Hui Zhu
2012-03-29 14:40                 ` Pedro Alves
2012-03-29 14:43                   ` Hui Zhu
2012-03-29 15:00                     ` Pedro Alves
2012-03-29 15:27                       ` Hui Zhu

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