From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OdAvLCt3nmojfTMAWB0awg (envelope-from ) for ; Mon, 07 Sep 2026 04:34:51 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=HxhK39gf; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id AA21D1E09E; Mon, 07 Sep 2026 04:34:51 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham 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 00AF11E091 for ; Mon, 07 Sep 2026 04:34:49 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 82A954C318A9 for ; Mon, 7 Sep 2026 08:34:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82A954C318A9 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=HxhK39gf Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id B6DB84C31869 for ; Mon, 7 Sep 2026 08:34:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B6DB84C31869 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B6DB84C31869 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788770063; cv=none; b=w/8GmQrSaeaW0b74E7VoRU8ZiBCRSXGyPpwRLxqupnH7fpPQgTD7E06t7hfaSgUmzGCSlJOWJmFP4R1syqOh45OuP23vqbuG0woceRpg81HRU5tG1rVziaq9ZNF36PPJshaTZ/+6Rf+qf8Ut/q8uqjut1BhPjGtCDeez76inn2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788770063; c=relaxed/simple; bh=pO2zDMrps6W9Ph6IDzgbQ6TxcjhefiZnvcPO5irHc4w=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=gpCHHBp0zTo7BaLbYjl2phRsw5ChvN4DKzaNh81cJ5WkN31ayyXdM8Eh1UndkXwkc+0A4LdzHmK4heNmbzXNh4zfnVpXFwkcG2BgH55jjPrbMiA33HedrcR74WJlR3j1mG/F9kVvrRXzusQI+PWsLbhA2276+LRytG5xbo0joO4= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=HxhK39gf DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6DB84C31869 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1788770063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jJ5zpFkhND7sVwIC5yNtK5QyK4tdzhK4l7NkCe+TnZk=; b=HxhK39gfTH44rT49jZrfIEv4omnUCwlUubedWCvasLq2nWePq4wCi1KNQ+PPOcEUJ9qmPp x2k0pxKYQOtH/MLQCxlY4zDwpY//CfW6I0/CCgSAeL+9OAa+NAbgf2qNz9o+8X8H9a/8uL gYd56aQ0sMt8djI3zBtFTDXsc/+UTlw= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-22-lKSP2iXiMCWI_iqGlNESfw-1; Mon, 07 Sep 2026 04:34:21 -0400 X-MC-Unique: lKSP2iXiMCWI_iqGlNESfw-1 X-Mimecast-MFC-AGG-ID: lKSP2iXiMCWI_iqGlNESfw_1788770060 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-48597bbd963so1318142f8f.2 for ; Mon, 07 Sep 2026 01:34:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788770060; x=1789374860; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=jJ5zpFkhND7sVwIC5yNtK5QyK4tdzhK4l7NkCe+TnZk=; b=lnLMtqIB2h3c63UjqU5W9KcGy7MxZNOGe+mfAXo+J1wwXYiBDMpIzFzYhu4Vh6MfOu 0SAMBOD035FMzgm7pil4LcnX0ukKKOqcWrGo+RwRqlKsOVz3o9t09pBU/7gFMgbmw0/F El1uvRrXYxsugoe+4Oj72HYJ0SdNfj5Q+GHgv7B5/4g7nv4k2QM6MjUNyKUsHAHGKscs 0NiD1cLLHNTxK8ltafBEMyrYiE7WuxC6z8frEH23RURxW07attuNdmGQiNDbY3N7Makz fVW/TbZsr/TvzLlwNP/aP71gK3viMrLYkimvT5vH9kA5NfAxJuAGczlx9duXGeAsqmfX S1Kw== X-Forwarded-Encrypted: i=1; AKwUvBy3J5FxmObXM+yS5AMI8BC+oTJgJwggrXi6uJukglVk1TD9JfP+C8RvGeHFspelKndkD+X8SHeknV0snQ==@sourceware.org X-Gm-Message-State: AFuF++kVifI4zXIOm9anTxE/5WVLgfLmEY960O0c4uSvWRIYBVbyW2e8 xPkotmI68b0XZpGsa3fCG/YzWvMmJvFVLcecikeRLBCyErkTBsavY0YT1gJcqrKjuwLhmDHPQEK am1MATPp9OLUxSXsbX58picq/SXUYCUpBG/XTwqmUPJ84yb7U0V/ez1yffHFt6iGfO1KxRaA= X-Gm-Gg: AYBFou2sFjXrFji3AaS35dpVI8GCoWueQQC4o6ryIceGF78GZXhmg74SbWXpqCfIImP acIEzSjzBlKBmeQbFvyFdEly5RsCPs6mqosEsqQ6NIwR/JUdMyGcpRIRs0UrWEVw1+mjfITD/wt RbQR0q9my/4kEUUFcMeLZD3khHRjJkc+3IQWb05fWiHFGDunyHthmyxnKLS4ZqpCuGhLEPsfHJd dIGiyOEBkVYUW5TreubOoNgewmVhmFK/ecIMitgVv0cT2T7IYQORMbFmmaZhm2nibUvG/tpt45/ 4ZJQUFkmd1rqsIRqFhF72qF3bQqBEToHz+Md3SDHIQj6XzG+RDOf0YdwBEoTlwT82PjL/kW72oV dQLJCPsBDMPtkJZiZmMnXKF7tHfw= X-Received: by 2002:a05:6000:4694:b0:47f:6f9e:1e82 with SMTP id ffacd0b85a97d-4858704ad0amr32154681f8f.9.1788770059938; Mon, 07 Sep 2026 01:34:19 -0700 (PDT) X-Received: by 2002:a05:6000:4694:b0:47f:6f9e:1e82 with SMTP id ffacd0b85a97d-4858704ad0amr32154616f8f.9.1788770059420; Mon, 07 Sep 2026 01:34:19 -0700 (PDT) Received: from localhost (128.223.159.143.dyn.plus.net. [143.159.223.128]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4858d2693e8sm25641470f8f.3.2026.09.07.01.34.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Sep 2026 01:34:18 -0700 (PDT) From: Andrew Burgess To: Rainer Orth Cc: Tom Tromey , gdb-patches@sourceware.org, Simon Marchi Subject: Re: [PATCH v2] Require async support for DAP tests [PR34548] In-Reply-To: References: <87fr07tupw.fsf@tromey.com> <874igj26tf.fsf@redhat.com> <87qzjja7ta.fsf@tromey.com> <871pbdszj4.fsf@redhat.com> Date: Mon, 07 Sep 2026 09:34:17 +0100 Message-ID: <87wlsxqx2u.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: IhKw4wb_k61G5qp55sjfw81_yaLE1hCIQl2_w1UapCo_1788770060 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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 Rainer Orth writes: > 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. OK, thanks for clarifying. The usual way to handle this is to run a synchronous command afterwars, and use that to discard any pending output, gdb_test "p 123" " = 123" "clear expect buffer" but in this case, as you immediately exit, I don't think that's really needed. I'm happy if you just fix the other issues which I think are still valid. Thanks, Andrew > > Rainer > > -- > ----------------------------------------------------------------------------- > Rainer Orth, Center for Biotechnology, Bielefeld University > > > # 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 {} {