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: [patch] Fix cleanup in finish_command


On Fri, 21 Jun 2013 10:03:21 +0200, Metzger, Markus T wrote:
> > Unrelated:
> > There is testcase FAILing randomly, reproducible with "read1.so" from:
> > 	http://sourceware.org/bugzilla/show_bug.cgi?id=12649
> > Running ./gdb.btrace/exception.exp ...
> > FAIL: gdb.btrace/exception.exp: exception - flat (timeout)
> 
> I do not think that this is an actual issue.  It runs into a timeout because
> there is so much memory to read.
> 
> When I add to my board file:
> 
> 	set_board_info gdb,timeout 8000
> 
> it takes a very long time, but the test eventually passes.

BTW the testcase is still not right, sometimes it fails due to:
	ERROR: internal buffer is full.
	ERROR: internal buffer is full.

(This is why I tried the "read1" reproducer for it...)

One can either increase the expect buffer size or rather use appropriate
lib/gdb.exp function for it.

To be just merged into the patchset I think.


Regards,
Jan


diff --git a/gdb/testsuite/gdb.btrace/exception.exp b/gdb/testsuite/gdb.btrace/exception.exp
index a8da2b0..430c84b 100644
--- a/gdb/testsuite/gdb.btrace/exception.exp
+++ b/gdb/testsuite/gdb.btrace/exception.exp
@@ -44,24 +44,28 @@ gdb_test_no_output "record btrace"
 gdb_continue_to_breakpoint "cont to $bp_2" ".*$srcfile:$bp_2.*"
 
 # show the flat branch trace
-gdb_test "record function-call-history 1" "
+send_gdb "record function-call-history 1\n"
+gdb_expect_list "exception - flat" "\r\n$gdb_prompt $" { "\r
 1\tmain\\(\\)\r
 2\ttest\\(\\)\r
 3\tfoo\\(\\)\r
 4\tbar\\(\\)\r
 5\tbad\\(\\)\r
-.*\r
-\[0-9\]*\ttest\\(\\)" "exception - flat"
+"
+    "\r\n\[0-9\]*\ttest\\(\\)"
+}
 
 # show the branch trace with calls indented
 #
 # here we see a known bug that the indentation starts at level 1 with
 # two leading spaces instead of level 0 without leading spaces.
-gdb_test "record function-call-history /c 1" "
+send_gdb "record function-call-history /c 1\n"
+gdb_expect_list "exception - calls indented" "\r\n$gdb_prompt $" { "\r
 1\tmain\\(\\)\r
 2\t  test\\(\\)\r
 3\t    foo\\(\\)\r
 4\t      bar\\(\\)\r
 5\t        bad\\(\\)\r
-.*\r
-\[0-9\]*\t  test\\(\\)" "exception - calls indented"
+"
+    "\r\n\[0-9\]*\t  test\\(\\)"
+}


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