From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 8DE893858CDB; Mon, 26 Feb 2024 15:03:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DE893858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708959819; bh=Xj+E/LB8tgqEDXYuPhBzU+Idd+t/0y8fLqsRDyfZr+c=; h=From:To:Subject:Date:From; b=Y+YbZNXpi289RGTW4U5VKTkk24Hoh0Jzc1iP3p021VyYgefbANOV4s3kyXgn0H1dc ejCYLeffvfPRMLJGt5rmL8rEBWzj40gzRwWJWHVvWXPob+twxZt9ypIz2flNMtWAn8 aDpK2hUmerDFohmxcMRQU6M10qCazTsNY7/KWJLg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Dump dap.log.$n to gdb.log when exceptions found X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: d82ede20df36eb8acfc9e67969e396e3a8fe1d45 X-Git-Newrev: dd88f42597e903a7847b9ffc10fee4fbbbd66cf8 Message-Id: <20240226150339.8DE893858CDB@sourceware.org> Date: Mon, 26 Feb 2024 15:03:39 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Ddd88f42597e9= 03a7847b9ffc10fee4fbbbd66cf8 commit dd88f42597e903a7847b9ffc10fee4fbbbd66cf8 Author: Tom de Vries Date: Mon Feb 26 16:03:45 2024 +0100 [gdb/testsuite] Dump dap.log.$n to gdb.log when exceptions found =20 For a patch I submitted, the Linaro CI reported a failure: ... FAIL: gdb.dap/attach.exp: exceptions in log file ... =20 I ran the test-case locally, and observed the same FAIL in the gdb.sum = file. =20 I then wanted to confirm that I reproduced the exact same problem, but realized that I couldn't because there's no way for me to know what exc= eption occurred, and where, because that information is logged in the dap.log.= $n file, and the Linaro CI only saves the gdb.sum and gdb.log files. =20 This issue is even worse if only the CI can reproduce a FAIL. =20 Fix this in dap_check_log_file by dumping dap.log.$n to gdb.log when exceptions are found. =20 Tested on x86_64-linux. =20 Approved-By: Tom Tromey Diff: --- gdb/testsuite/lib/dap-support.exp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdb/testsuite/lib/dap-support.exp b/gdb/testsuite/lib/dap-supp= ort.exp index 72c22d00711..89a4b0e0f6d 100644 --- a/gdb/testsuite/lib/dap-support.exp +++ b/gdb/testsuite/lib/dap-support.exp @@ -381,6 +381,9 @@ proc dap_check_log_file {} { if {$ok} { pass "exceptions in log file" } else { + verbose -log -- "--- DAP LOG START ---" + verbose -log -- $contents + verbose -log -- "--- DAP LOG END ---" fail "exceptions in log file" } }