public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Dump dap.log.$n to gdb.log when exceptions found
@ 2024-02-26 15:03 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2024-02-26 15:03 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=dd88f42597e903a7847b9ffc10fee4fbbbd66cf8

commit dd88f42597e903a7847b9ffc10fee4fbbbd66cf8
Author: Tom de Vries <tdevries@suse.de>
Date:   Mon Feb 26 16:03:45 2024 +0100

    [gdb/testsuite] Dump dap.log.$n to gdb.log when exceptions found
    
    For a patch I submitted, the Linaro CI reported a failure:
    ...
    FAIL: gdb.dap/attach.exp: exceptions in log file
    ...
    
    I ran the test-case locally, and observed the same FAIL in the gdb.sum file.
    
    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 exception
    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.
    
    This issue is even worse if only the CI can reproduce a FAIL.
    
    Fix this in dap_check_log_file by dumping dap.log.$n to gdb.log when
    exceptions are found.
    
    Tested on x86_64-linux.
    
    Approved-By: Tom Tromey <tom@tromey.com>

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-support.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"
     }
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-26 15:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26 15:03 [binutils-gdb] [gdb/testsuite] Dump dap.log.$n to gdb.log when exceptions found Tom de Vries

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).