From: Lancelot SIX Date: Wed, 29 Dec 2021 14:01:25 +0000 (-0500) Subject: gdb/testsuite: fix inferior-clone.exp for native-extended-gdbserver X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b1e7ee5b572abb465b8095d7f92d49eed91e215;p=binutils-gdb.git gdb/testsuite: fix inferior-clone.exp for native-extended-gdbserver 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 --- 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 \[\] (.*)\]" "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 \[\] (.*)\]" "change inferior" gdb_test "show args" \ "Argument list to give program being debugged when it is started is \"foo bar 'b a z'\"\."