[PATCH v3 3/4] Add testcases to list.exp and dfp-test.exp

Joel Brobecker brobecker@adacore.com
Sun Dec 6 14:08:00 GMT 2015


On Tue, Nov 10, 2015 at 03:56:27PM +0800, Fei Jie wrote:
>     add testcases which test list with more paraments to list.exp, and
>     backtrace with parament '-1' to dfp-test.exp
> 
> gdb/testsuite/ChangeLog:
> 
>     *gdb.base/list.exp: Add new testcases.
>     *gdb.base/dfp-test.exp: Likewise.

Same remarks as in #1 and #2 about "add" -> "Add" and the inaccurate
use of "testcases" instead of "tests. There is also a typo in
"paraments"

You should split the two patches, as the changes are logically
unrelated.

> ---
>  gdb/testsuite/gdb.base/dfp-test.exp |  1 +
>  gdb/testsuite/gdb.base/list.exp     | 49 +++++++++++++++++++++++++++++++++++++
>  2 files changed, 50 insertions(+)
> 
> diff --git a/gdb/testsuite/gdb.base/dfp-test.exp b/gdb/testsuite/gdb.base/dfp-test.exp
> index e648a6b..4caa50e 100644
> --- a/gdb/testsuite/gdb.base/dfp-test.exp
> +++ b/gdb/testsuite/gdb.base/dfp-test.exp
> @@ -220,6 +220,7 @@ gdb_test "backtrace" ".*arg0_64 \\(arg0=0.1, arg1=1.0, arg2=2.0, arg3=3.0, arg4=
>  gdb_breakpoint arg0_128
>  gdb_continue_to_breakpoint "entry to arg0_128"
>  gdb_test "backtrace" ".*arg0_128 \\(arg0=0.1, arg1=1.0, arg2=2.0, arg3=3.0, arg4=4.0, arg5=5.0\\).*" "backtrace at arg0_128"
> +gdb_test "backtrace -1" ".*0x\[0-9\]\{1,16\}.*at\ .*${srcfile}.*"
>  
>  # Test calling inferior function with DFP arguments or return value.
>  
> diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp
> index 2aea9a3..c79369e 100644
> --- a/gdb/testsuite/gdb.base/list.exp
> +++ b/gdb/testsuite/gdb.base/list.exp
> @@ -624,4 +624,53 @@ test_list "list -" 10 2 "7-8" "5-6"
>  # the current line.
>  test_list "list -" 10 1 "7" "6"
>  
> +# Get main address.
> +set main_addr ""
> +gdb_test_multiple "print/x &main" "getting main's address" {
> +    -re "$decimal = \($hex\)\r\n$gdb_prompt $" {
> +        set main_addr $expect_out(1, string)

I don't think you need the \ before ( and ).

The rest of the testcase looks OK to me.
-- 
Joel



More information about the Gdb-patches mailing list