Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix a bug in tstatus.exp matching tstatus output
@ 2013-03-04 15:37 Yao Qi
  2013-03-04 16:23 ` Joel Brobecker
  2013-03-04 16:32 ` Pedro Alves
  0 siblings, 2 replies; 10+ messages in thread
From: Yao Qi @ 2013-03-04 15:37 UTC (permalink / raw)
  To: gdb-patches

When running gdb.trace/tstatus.exp, we got the following output,

(gdb) tstatus
Trace stopped by a tstop command (because I can).
Collected 1 trace frames.
Trace buffer has 5242418 bytes of 5242880 bytes free (0% full).
Trace will stop if GDB disconnects.
Trace user is me me me.
Trace notes: different note.
Not looking at any trace frame.
Trace started at 572.802356 secs, stopped 0.085292 secs later.

apparently the stop reason is printed, but the test summary is

  (gdb) PASS: gdb.trace/tstatus.exp: tstatus does not report trace stop reason

after examining tstatus.exp, I find the "\\\" is missed for parentheses in
"(because I can)".  This patch adds "\\\" for them, and the test summary
becomes:

  (gdb) PASS: gdb.trace/tstatus.exp: tstatus reports trace stop reason

In gdb testsuite, both "\\\(" and "\\(" are used.  After reading
section "4.3. Backslashes" in book "Exploring Expect", I think they
are the same on effect.

gdb/testsuite:

2013-03-04  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/tstatus.exp (run_trace_experiment): Add "\\\" to
	parentheses.
---
 gdb/testsuite/gdb.trace/tstatus.exp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdb/testsuite/gdb.trace/tstatus.exp b/gdb/testsuite/gdb.trace/tstatus.exp
index db620d0..654b64e 100644
--- a/gdb/testsuite/gdb.trace/tstatus.exp
+++ b/gdb/testsuite/gdb.trace/tstatus.exp
@@ -99,7 +99,7 @@ proc run_trace_experiment {} {
     gdb_test_no_output "tstop because I can" "trace stopped with note"
 
     gdb_test_multiple "tstatus" "check on trace status after stop" {
-	-re "Trace stopped by a tstop command (because I can)\..*Trace will stop if GDB disconnects\.\[\r\n\]+Trace user is me me me\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" {
+	-re "Trace stopped by a tstop command \\\(because I can\\\)\..*Trace will stop if GDB disconnects\.\[\r\n\]+Trace user is me me me\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" {
 	    pass "tstatus reports trace stop reason"
 	}
 	-re "Trace stopped by a tstop command\..*\r\n$gdb_prompt $" {
-- 
1.7.7.6


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

end of thread, other threads:[~2013-03-06 12:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 15:37 [PATCH] Fix a bug in tstatus.exp matching tstatus output Yao Qi
2013-03-04 16:23 ` Joel Brobecker
2013-03-04 17:35   ` Tom Tromey
2013-03-05  2:24   ` Yao Qi
2013-03-05 19:09     ` Pedro Alves
2013-03-04 16:32 ` Pedro Alves
2013-03-05  2:39   ` Yao Qi
2013-03-05 19:02     ` tstatus.exp: use UNSUPPORTED for optional features that are not supported (was: Re: [PATCH] Fix a bug in tstatus.exp matching tstatus output) Pedro Alves
2013-03-06  1:14       ` tstatus.exp: use UNSUPPORTED for optional features that are not supported Yao Qi
2013-03-06 12:19         ` Pedro Alves

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