This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] gdb.trace/*.exp send_gdb vs. gdb_test
On Thursday 27 May 2010 23:50:40, Pedro Alves wrote:
> Let me try to fix that before you commit. Should be simple.
> Other tests had the same issue, and I thought I had fixed them
> all, but obviously this one slipped.
Oh bummer. The patch pasted at the end fixes that, but...
gdb.sum:
Running target native-gdbserver
Running ../../../src/gdb/testsuite/gdb.trace/limits.exp ...
FAIL: gdb.trace/limits.exp: maint packet QTLimit:tp:ffffffff
PASS: gdb.trace/limits.exp: This test cannot be run on this target
=== gdb Summary ===
# of expected passes 1
# of unexpected failures 1
gdb.log:
(gdb) maint packet QTLimit:tp:ffffffff
sending: "QTLimit:tp:ffffffff"
received: ""
(gdb) FAIL: gdb.trace/limits.exp: maint packet QTLimit:tp:ffffffff
... the test is using an undocumented packet to set
artificial limits on the remote tracing engine. GDBserver doesn't
implement that packet. I had never heard of this packet, and I'm
not sure it makes much sense to have this test nowadays. Can we
just get rid of the whole test file?
Otherwise, the "doesn't support this packet" detection looks bogus:
if [gdb_test "maint packet QTLimit:tp:ffffffff" \
"received: .OK." ""] then {
pass "This test cannot be run on this target"
return 1;
}
The test is skipped if the target returns something that
contains "OK" ??
---
gdb/testsuite/gdb.trace/limits.exp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Index: src/gdb/testsuite/gdb.trace/limits.exp
===================================================================
--- src.orig/gdb/testsuite/gdb.trace/limits.exp 2010-05-28 00:08:29.000000000 +0100
+++ src/gdb/testsuite/gdb.trace/limits.exp 2010-05-28 00:08:18.000000000 +0100
@@ -22,6 +22,7 @@ if $tracelevel then {
set testfile "limits"
set srcfile ${testfile}.c
+set executable $testfile
set binfile $objdir/$subdir/$testfile
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
@@ -294,11 +295,9 @@ proc gdb_trace_limits_tests { } {
# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $binfile
-
+clean_restart $executable
+runto_main
+
if [target_info exists gdb_stub] {
gdb_step_for_stub;
}