From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Cc: Stan Shebs <stanshebs@earthlink.net>
Subject: Re: [PATCH] Logging for MI
Date: Thu, 28 Jun 2012 03:14:00 -0000 [thread overview]
Message-ID: <2480929.aLxBbTKcEj@qiyao.dyndns.org> (raw)
In-Reply-To: <4FE80E5E.903@earthlink.net>
Hi Stan,
Some cents on test case.
On Monday, June 25, 2012 12:08:14 AM Stan Shebs wrote:
> +pass "Log file has '$logcontent'"
> +
This is not needed, and cause test summary quite long.
> +set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+"
> +
> +if [regexp
> "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"al
> l\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\
> ]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_
> log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt
> " $logcontent] { + pass "Log file contents"
> +} else {
> + fail "Log file contents"
> +}
> +
> +# Now try the redirect, which writes into the file only.
> +
> +mi_gdb_test "-gdb-set logging redirect on" ".*" "redirect logging on"
> +
> +# Since all output will be going into the file, just keep sending commands
> +# and don't expect anything to appear until logging is turned off.
> +
> +send_gdb "1001-gdb-set logging on\n"
> +send_gdb "1002-exec-step\n"
> +send_gdb "1003-exec-next\n"
> +
> +mi_gdb_test "1004-gdb-set logging off" ".*" "redirect logging off"
> +
> +set chan [open $milogfile]
> +set logcontent [read $chan]
> +close $chan
> +
> +pass "Log file has '$logcontent'"
> +
Likewise.
> +if [regexp
> "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thre
> ad-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\"
> ,.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"al
> l\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\
> ]+$mi_log_prompt" $logcontent] { + pass "Redirect log file contents"
> +} else {
> + fail "Redirect log file contents"
> +}
> +
> +mi_gdb_exit
Add "remote_file host delete ${milogfile}" here?
--
Yao (齐尧)
next prev parent reply other threads:[~2012-06-28 3:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 7:09 Stan Shebs
2012-06-26 16:18 ` Eli Zaretskii
2012-06-27 19:40 ` Tom Tromey
2012-06-27 22:24 ` Stan Shebs
2012-06-28 3:14 ` Yao Qi [this message]
2012-06-28 22:15 ` Stan Shebs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2480929.aLxBbTKcEj@qiyao.dyndns.org \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=stanshebs@earthlink.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox