From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7833) id 9631038356B9; Thu, 26 May 2022 08:40:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9631038356B9 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Lancelot SIX To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: prefer gdb_test in gdb.dwarf2/calling-convention X-Act-Checkin: binutils-gdb X-Git-Author: Lancelot SIX X-Git-Refname: refs/heads/master X-Git-Oldrev: f67741e172bf342291fe3abd2b395899ce6433a0 X-Git-Newrev: bfcd7c2160fd145a9d7ff215ff28cdf5e406af5a Message-Id: <20220526084026.9631038356B9@sourceware.org> Date: Thu, 26 May 2022 08:40:26 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2022 08:40:26 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dbfcd7c2160fd= 145a9d7ff215ff28cdf5e406af5a commit bfcd7c2160fd145a9d7ff215ff28cdf5e406af5a Author: Lancelot SIX Date: Wed May 25 14:38:57 2022 +0100 gdb/testsuite: prefer gdb_test in gdb.dwarf2/calling-convention =20 Since ed01945057c "Make gdb_test's question non-optional if specified", if the question and response parameters are given to gdb_test, the framework enforces that GDB asks the question. Before this patch, tests needed to use gdb_test_multiple to enforce this. =20 This patch updates the gdb.dwarf2/calling-convention.exp testcase to use gdb_test to check that GDB asks a question. This replaces the more complicated gdb_test_multiple based implementation. =20 Tested on x86_64-gnu-linux. =20 Change-Id: I7216e822ca68f2727e0450970097d74c27c432fe Diff: --- gdb/testsuite/gdb.dwarf2/calling-convention.exp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/calling-convention.exp b/gdb/testsuit= e/gdb.dwarf2/calling-convention.exp index 77107a42350..8c87a69ebdf 100644 --- a/gdb/testsuite/gdb.dwarf2/calling-convention.exp +++ b/gdb/testsuite/gdb.dwarf2/calling-convention.exp @@ -83,12 +83,14 @@ gdb_test "call foo ()" \ gdb_breakpoint "foo" gdb_continue_to_breakpoint "foo" =20 -gdb_test_multiple "return 35" "" { - -re "Function 'foo' does not follow the target calling convention.\r\n= If you continue, setting the return value will probably lead to unpredictab= le behaviors.\r\nMake foo return now\\? \\(y or n\\) $" { - pass $gdb_test_name - gdb_test "n" "Not confirmed" "cancel return" - } -} +gdb_test "return 35" \ + "Not confirmed" \ + "return 35" \ + [multi_line \ + "Function 'foo' does not follow the target calling convention\\= ." \ + "If you continue, setting the return value will probably lead t= o unpredictable behaviors\\." \ + "Make foo return now\\? \\(y or n\\) $"] \ + "n" =20 gdb_test "finish" [multi_line \ "Run till exit from #0 $hex in foo \\(\\)" \