Re: [PATCH] gdb/reverse: Fix continue_to_breakpoint in syscall testcases.

Pedro Alves
2015-11-02T19:17:27Z

On 11/02/2015 06:47 PM, Marcin KoÅ›cielnicki wrote:

> --- a/gdb/testsuite/ChangeLog
> +++ b/gdb/testsuite/ChangeLog
> @@ -1,3 +1,13 @@
> +2015-11-02 Marcin KoÅ›cielnicki <koriakin@0x04.net>
> +
> + * gdb.reverse/fstatat-reverse.exp: Fix continue_to_breakpoint.
> + * gdb.reverse/getresuid-reverse.exp: Fix continue_to_breakpoint.
> + * gdb.reverse/pipe-reverse.exp: Fix continue_to_breakpoint.
> + * gdb.reverse/readv-reverse.exp: Fix continue_to_breakpoint and comment.
> + * gdb.reverse/recvmsg-reverse.exp: Fix continue_to_breakpoint.
> + * gdb.reverse/time-reverse.exp: Fix continue_to_breakpoint.
> + * gdb.reverse/waitpid-reverse.exp: Fix continue_to_breakpoint, add KFAILs.

Boring nit: In ChangeLog files, it's preferred to say "what" changed.
E.g., "Continue to marker1 before continuing to marker2".

> diff --git a/gdb/testsuite/gdb.reverse/fstatat-reverse.exp b/gdb/testsuite/gdb.reverse/fstatat-reverse.exp
> index 09deb6c..39401dc 100644
> --- a/gdb/testsuite/gdb.reverse/fstatat-reverse.exp
> +++ b/gdb/testsuite/gdb.reverse/fstatat-reverse.exp
> @@ -44,6 +44,8 @@ gdb_test "break marker2" \
> "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
> "set breakpoint at marker2"
>
> +gdb_continue_to_breakpoint "marker1" ".*$srcfile:.*"
> +
> gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"

Did you try running to marker2 first, and _then_ create the marker1 breakpoint?

gdb_test "break marker1" \
"Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
"set breakpoint at marker1"

gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"

gdb_test "break marker2" \
"Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
"set breakpoint at marker2"

That is, just move the gdb_continue_to_breakpoint earlier. That would
avoid the double continue, which was what I pointed out
originally.

> diff --git a/gdb/testsuite/gdb.reverse/readv-reverse.exp b/gdb/testsuite/gdb.reverse/readv-reverse.exp
> index 4158c10..a98ded5 100644
> --- a/gdb/testsuite/gdb.reverse/readv-reverse.exp
> +++ b/gdb/testsuite/gdb.reverse/readv-reverse.exp
> @@ -16,7 +16,7 @@
> # This file is part of the gdb testsuite.
>
> #
> -# This test tests pipe syscall for reverse execution.
> +# This test tests readv syscall for reverse execution.
> #
>

Please split this hunk to a separate patch and push it in as a typo fix.

Thanks,
Pedro Alves