From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 492893858D38; Wed, 21 Feb 2024 13:25:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 492893858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708521941; bh=oDDwGnEc8T2DOnuIH8OGFEThPbWHpxfCTqu3UENFekQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Wab0dIMUOX7wyfU5rejQUGVjemA87HooAjv5m5tc4KGD37DN7TgieHLI0AmvKJoIr 5nsnqNFenE9JblG3ZgBKKl1HAv00Ie6FrGJY+PP0J3obLYjupzPi4xXHBqslyHYUL+ KXI4P08c4nYEx/WKOQFUV2D9beWynM758hhVdpLg= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/31382] [gdb/testsuite] 2 errors instead of 1 reported by _dap_read_json Date: Wed, 21 Feb 2024 13:25:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31382 --- Comment #3 from Sourceware Commits --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D99eeecc8d276= e5af745e48825d66efff693a7678 commit 99eeecc8d276e5af745e48825d66efff693a7678 Author: Tom de Vries Date: Wed Feb 21 14:25:31 2024 +0100 [gdb/testsuite] Fix error handling in _dap_read_json In _dap_read_json we have a gdb_expect with clauses that generate error= s: ... timeout { error "timeout reading json header" } eof { error "eof reading json header" } ... Proc gdb_expect uses dejagnu's remote_expect, which has some peculiar semantics related to errors: ... # remote_expect works basically the same as standard expect, but it # also takes care of getting the file descriptor from the specified # host and also calling the timeout/eof/default section if there is an # error on the expect call. ..... When a timeout triggers, it generates a timeout error, which is reporte= d by gdb_expect, after which it runs the timeout/eof/default clauses, which generates an eof error, which is reported by runtest. I think the intention here is to generate just a one error, a timeout error. Fix this by postponing generating the error until after gdb_expect. Tested on x86_64-linux, by: - running all the DAP test-cases and observing no regressions, and - modifying the gdb.dap/eof.exp test-case to trigger a timeout error, a= nd observing only a timeout error. PR testsuite/31382 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31382 --=20 You are receiving this mail because: You are on the CC list for the bug.=