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: [obv] Remove redundant '\' in mi2-cli.exp


On 09/21/2012 09:49 AM, Yao Qi wrote:
> Hi,
> I happen to see a redundant '\' in mi2-cli.exp, and cause test summary
> less readable.  With this patch applied, the summary is changed
> 
>   -PASS: gdb.mi/mi2-cli.exp: -break-insert -t basics.c:$line_main_hello
>   +PASS: gdb.mi/mi2-cli.exp: -break-insert -t basics.c:65
> 
> It is obvious, and I'll check it in.
> 
> gdb/testsuite:
> 
> 2012-09-21  Yao Qi  <yao@codesourcery.com>
> 
> 	* gdb.mi/mi2-cli.exp: Remove redundant '\'.
> ---
>  gdb/testsuite/gdb.mi/mi2-cli.exp |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.mi/mi2-cli.exp b/gdb/testsuite/gdb.mi/mi2-cli.exp
> index 5bf94a1..892e457 100644
> --- a/gdb/testsuite/gdb.mi/mi2-cli.exp
> +++ b/gdb/testsuite/gdb.mi/mi2-cli.exp
> @@ -154,7 +154,7 @@ mi_execute_to "interpreter-exec console step" $reason "callee4" "" ".*basics.c"
>  
>  mi_gdb_test "600-break-insert -t basics.c:$line_main_hello" \
>  	{600\^done,bkpt=.number="3",type="breakpoint".*\}} \
> -	"-break-insert -t basics.c:\$line_main_hello"
> +	"-break-insert -t basics.c:$line_main_hello"

I'm positive this must have been done on purpose -- so that the test
output message in the .sum file matches the first argument to mi_gdb_test.
The same reason you have elsewhere in the file too:

 "-interpreter-exec console \"file \$binfile\"

too.

It also makes the the .sum output stable(r) if the test .c file changes
a bit (changing line numbers).  IMO, it's always good practice to avoid
line numbers in .sum test message output.

If you grep for '\\\$' for example, you'll find several other instances of
the same pattern.

>  
>  mi_execute_to "exec-continue" "breakpoint-hit" "main" "" ".*basics.c" \
>      $line_main_hello { "" "disp=\"del\"" } \
> 
-- 
Pedro Alves


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