From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GYNDOqMqmWocQiMAWB0awg (envelope-from ) for ; Thu, 03 Sep 2026 04:06:59 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=AE7ftq7V; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E8E291E166; Thu, 03 Sep 2026 04:06:59 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 497C21E09B for ; Thu, 03 Sep 2026 04:06:59 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AFF7F4B9DB54 for ; Thu, 3 Sep 2026 08:06:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AFF7F4B9DB54 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=AE7ftq7V Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id C2CAD4BA900E for ; Thu, 3 Sep 2026 08:06:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C2CAD4BA900E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C2CAD4BA900E Authentication-Results: sourceware.org; arc=none smtp.remote-ip=129.70.160.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788422790; cv=none; b=tuLMecIzPWqywODxH8qqWTFpIAj7dQoLh16yR8x/yUUwu847czilAXHhVKLOJd+A9XAWpUZWR2A1QpXXV05RDovKNuccPdcp4UAMgSJkZJXlaWy7brozOqKXaqmseA9v2QDYxXuJzgPT44buKURqHFxPyJjg36fJTHnMX97p/Go= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788422790; c=relaxed/simple; bh=XD0B934x+KjL50qdzKQeLKzr4aHuvKAwpCveWlp+p14=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=FmOP5FD4PHChiQBVtQyvY++AMKGDUih6eaf8XXNTVxVE/7oAtB96rnyOs8L5dIia/YpXhbu+XJCzLFaot+c86NXzD0k+qHbp8QntifK4+Q7V8HhOjd0z5HB2WFNMKk7L9jIn0TNA+zjVhSfjWMqiUKEbxsLjHLe4neBW+QZLnTU= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=AE7ftq7V DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C2CAD4BA900E Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id CA7B7D9044; Thu, 3 Sep 2026 10:06:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:date:date:references :in-reply-to:subject:subject:from:from:received:received; s= 20200306; t=1788422788; bh=XD0B934x+KjL50qdzKQeLKzr4aHuvKAwpCveW lp+p14=; b=AE7ftq7VPVxKuqSeDL5lY2xU8jTaNDD2+2J5qqGtkpSyF3gX9Tuq3 a/N8Fopa8cTcIl75eBWzdXUcGXLBjfkjAPvUxijHZ0q1RVM2BARTAZWQryCaiywN 2Bmw/wFuqokyyaYh60cASckb06K1fE9wLlmZE7c5Hzi/sHbWN7Geuq8ZNX75Yqkz psNtcaSMI0lpX+KVB4UuZjOOaPbVUQmkQQJVI5an0AZSis0uhu99drbH5Vx8MFIS VPVYYg1CyCQLo7Mk/asuoHYUnI7j4yO34c6MPWiU25nlUPiwdsvTH7+F+/BPbYS9 rwupz83AeJNDaAj4OqrBSt8+pgK+jwSzg== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hqXJio_Y1lvK; Thu, 3 Sep 2026 10:06:28 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p508542fb.dip0.t-ipconnect.de [80.133.66.251]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 4EF23D90A8; Thu, 3 Sep 2026 10:06:28 +0200 (CEST) From: Rainer Orth To: Andrew Burgess Cc: Tom Tromey , gdb-patches@sourceware.org, Simon Marchi Subject: Re: [PATCH v2] Require async support for DAP tests [PR34548] In-Reply-To: <871pbdszj4.fsf@redhat.com> (Andrew Burgess's message of "Tue, 01 Sep 2026 17:32:31 +0100") References: <87fr07tupw.fsf@tromey.com> <874igj26tf.fsf@redhat.com> <87qzjja7ta.fsf@tromey.com> <871pbdszj4.fsf@redhat.com> Date: Thu, 03 Sep 2026 10:06:28 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org --=-=-= Content-Type: text/plain Hi Andrew, >> +# Return 1 if target supports asynchronous execution, otherwise return 0. >> +gdb_caching_proc supports_target_async {} { >> + global srcdir subdir gdb_prompt > > These are not needed and should be removed. right: they are a remnant of the explicit gdb_reinitialize_dir $srcdir/$subdir in the first version. >> + gdb_test_multiple "continue &" "" { >> + -re "Continuing..*" { >> + set res 1 >> + } >> + -re ".*Asynchronous execution not supported on this target..*" { >> + set res 0 >> + } > > Both of these would be better written as '-re -wrap "....etc..."' adding > the -wrap will cause the $gdb_prompt to be matched. I don't think it > really matters in this case as you do call gdb_exit immediately after, > so I think any pending output from GDB is discarded, but it does make > the gdb.log a little neater, and so easier to grok. Unfortunately this doesn't work for the same reason I'd removed the explicit $gdb_prompt anchor -re "Continuing\\.\r\n$gdb_prompt $" { that I'd tried initially: in some cases, you get output like (gdb) continue &^M Continuing.^M (gdb) [Inferior 1 (process 3669382) exited normally]^M FAIL: gdb.dap/ada-scopes.exp: continue & (timeout) instead of the expected (gdb) continue &^M Continuing.^M (gdb) gdb_caching_proc supports_target_async caused gdb_exit to be called causing supports_target_async to incorrectly return 0. So that's what I'd like to check in. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=testsuite-dap-async.patch # HG changeset patch # Parent 069fc8428271fcfc95508f3097833f35443e371f Require async support for DAP tests [PR34548] diff --git a/gdb/testsuite/gdb.dap/pause.exp b/gdb/testsuite/gdb.dap/pause.exp --- a/gdb/testsuite/gdb.dap/pause.exp +++ b/gdb/testsuite/gdb.dap/pause.exp @@ -15,9 +15,6 @@ # Test "pause" in DAP. -# PR dap/34548 -require {!istarget "*-*-solaris2*"} - require allow_dap_tests load_lib dap-support.exp diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3070,6 +3070,10 @@ gdb_caching_proc with_system_readline {} } gdb_caching_proc allow_dap_tests {} { + if { ![supports_target_async] } { + return 0 + } + if { ![allow_python_tests] } { return 0 } @@ -3908,6 +3912,35 @@ gdb_caching_proc supports_memtag {} { return 0 } +# Return 1 if target supports asynchronous execution, otherwise return 0. +gdb_caching_proc supports_target_async {} { + set me "supports_target_async" + + set src { int main() { return 0; } } + if {![gdb_simple_compile $me $src executable ""]} { + return 0 + } + + clean_restart + gdb_load $obj + + set res 0 + if { [runto_main] } { + gdb_test_multiple "continue &" "" { + -re "Continuing..*" { + set res 1 + } + -re ".*Asynchronous execution not supported on this target..*" { + set res 0 + } + } + } + + gdb_exit + remote_file build delete $obj + return $res +} + # Return 1 if catch syscall is supported, otherwise return 0. gdb_caching_proc supports_catch_syscall {} { --=-=-=--