* [PATCH] gdb/testsuite: fix inferior-clone.exp for native-extended-gdbserver
@ 2021-12-29 14:16 lsix
2022-01-04 14:16 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: lsix @ 2021-12-29 14:16 UTC (permalink / raw)
To: simon.marchi, gdb-patches; +Cc: lsix, Lancelot SIX
From: Lancelot SIX <lancelot.six@amd.com>
003aae076207dbf32f98ba846158fc32669ef85f (gdb: Copy inferior properties
in clone-inferior) introduced a testcase that fails when testing with
the native-extended-gdbserver board:
Running ../gdb/testsuite/gdb.base/inferior-clone.exp ...
FAIL: gdb.base/inferior-clone.exp: inferior 2: clone-inferior
FAIL: gdb.base/inferior-clone.exp: inferior 3: clone-inferior
The error is as follows:
clone-inferior
[New inferior 2]
Added inferior 2 on connection 1 (extended-remote localhost:2346)
(gdb) FAIL: gdb.base/inferior-clone.exp: inferior 2: clone-inferior
This fails because the testcase only expect the 'Added inferior 2' part
of the message. The 'on connection 1 [...]' part is unexpected.
Fix by adjusting the testcase to a account for the possible trailing
part of the message.
Tested on x86_64-linux with native-extende-gdbserver and unix boards.
Change-Id: Ie3d6f04c9ffe9cab1fbda8ddf4935ee09b858c7a
---
gdb/testsuite/gdb.base/inferior-clone.exp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.base/inferior-clone.exp b/gdb/testsuite/gdb.base/inferior-clone.exp
index bb43be69672..eb2759428bc 100644
--- a/gdb/testsuite/gdb.base/inferior-clone.exp
+++ b/gdb/testsuite/gdb.base/inferior-clone.exp
@@ -34,7 +34,7 @@ with_test_prefix "setup inferior 1" {
# Check that properties of inferior 1 have been copied
with_test_prefix "inferior 2" {
- gdb_test "clone-inferior" "Added inferior 2"
+ gdb_test "clone-inferior" "Added inferior 2.*"
gdb_test "inferior 2" "\[Switching to inferior 2 \[<null>\] (.*)\]" "change inferior"
gdb_test "show args" \
"Argument list to give program being debugged when it is started is \"foo bar 'b a z'\"\."
@@ -79,7 +79,7 @@ with_test_prefix "update inferior 1" {
# Check that the values observed on inferior 3 are those copied from
# inferior 1.
with_test_prefix "inferior 3" {
- gdb_test "clone-inferior" "Added inferior 3"
+ gdb_test "clone-inferior" "Added inferior 3.*"
gdb_test "inferior 3" "\[Switching to inferior 3 \[<null>\] (.*)\]" "change inferior"
gdb_test "show args" \
"Argument list to give program being debugged when it is started is \"foo bar 'b a z'\"\."
base-commit: 003aae076207dbf32f98ba846158fc32669ef85f
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb/testsuite: fix inferior-clone.exp for native-extended-gdbserver
2021-12-29 14:16 [PATCH] gdb/testsuite: fix inferior-clone.exp for native-extended-gdbserver lsix
@ 2022-01-04 14:16 ` Simon Marchi
2022-01-04 14:35 ` Six, Lancelot
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2022-01-04 14:16 UTC (permalink / raw)
To: lsix, gdb-patches; +Cc: Lancelot SIX
On 2021-12-29 09:16, lsix@lancelotsix.com wrote:
> From: Lancelot SIX <lancelot.six@amd.com>
>
> 003aae076207dbf32f98ba846158fc32669ef85f (gdb: Copy inferior properties
> in clone-inferior) introduced a testcase that fails when testing with
> the native-extended-gdbserver board:
>
> Running ../gdb/testsuite/gdb.base/inferior-clone.exp ...
> FAIL: gdb.base/inferior-clone.exp: inferior 2: clone-inferior
> FAIL: gdb.base/inferior-clone.exp: inferior 3: clone-inferior
>
> The error is as follows:
>
> clone-inferior
> [New inferior 2]
> Added inferior 2 on connection 1 (extended-remote localhost:2346)
> (gdb) FAIL: gdb.base/inferior-clone.exp: inferior 2: clone-inferior
>
> This fails because the testcase only expect the 'Added inferior 2' part
> of the message. The 'on connection 1 [...]' part is unexpected.
>
> Fix by adjusting the testcase to a account for the possible trailing
> part of the message.
>
> Tested on x86_64-linux with native-extende-gdbserver and unix boards.
>
> Change-Id: Ie3d6f04c9ffe9cab1fbda8ddf4935ee09b858c7a
> ---
> gdb/testsuite/gdb.base/inferior-clone.exp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.base/inferior-clone.exp b/gdb/testsuite/gdb.base/inferior-clone.exp
> index bb43be69672..eb2759428bc 100644
> --- a/gdb/testsuite/gdb.base/inferior-clone.exp
> +++ b/gdb/testsuite/gdb.base/inferior-clone.exp
> @@ -34,7 +34,7 @@ with_test_prefix "setup inferior 1" {
>
> # Check that properties of inferior 1 have been copied
> with_test_prefix "inferior 2" {
> - gdb_test "clone-inferior" "Added inferior 2"
> + gdb_test "clone-inferior" "Added inferior 2.*"
> gdb_test "inferior 2" "\[Switching to inferior 2 \[<null>\] (.*)\]" "change inferior"
> gdb_test "show args" \
> "Argument list to give program being debugged when it is started is \"foo bar 'b a z'\"\."
> @@ -79,7 +79,7 @@ with_test_prefix "update inferior 1" {
> # Check that the values observed on inferior 3 are those copied from
> # inferior 1.
> with_test_prefix "inferior 3" {
> - gdb_test "clone-inferior" "Added inferior 3"
> + gdb_test "clone-inferior" "Added inferior 3.*"
> gdb_test "inferior 3" "\[Switching to inferior 3 \[<null>\] (.*)\]" "change inferior"
> gdb_test "show args" \
> "Argument list to give program being debugged when it is started is \"foo bar 'b a z'\"\."
>
> base-commit: 003aae076207dbf32f98ba846158fc32669ef85f
LGTM, thanks.
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] gdb/testsuite: fix inferior-clone.exp for native-extended-gdbserver
2022-01-04 14:16 ` Simon Marchi
@ 2022-01-04 14:35 ` Six, Lancelot
0 siblings, 0 replies; 3+ messages in thread
From: Six, Lancelot @ 2022-01-04 14:35 UTC (permalink / raw)
To: Simon Marchi, lsix, gdb-patches
[AMD Official Use Only]
> LGTM, thanks.
>
> Simon
Thanks.
I have pushed this.
Lancelot.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-04 14:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-29 14:16 [PATCH] gdb/testsuite: fix inferior-clone.exp for native-extended-gdbserver lsix
2022-01-04 14:16 ` Simon Marchi
2022-01-04 14:35 ` Six, Lancelot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).