From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YTEOKcFLkWp3jAoAWB0awg (envelope-from ) for ; Fri, 28 Aug 2026 04:50:09 -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=Q17ZTdF7; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A05671E167; Fri, 28 Aug 2026 04:50:09 -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 [38.145.34.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 77EDE1E0A3 for ; Fri, 28 Aug 2026 04:50:08 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 367C84BA79AF for ; Fri, 28 Aug 2026 08:50:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 367C84BA79AF 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=Q17ZTdF7 Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 2CCFB4BA9002 for ; Fri, 28 Aug 2026 08:49:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2CCFB4BA9002 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 2CCFB4BA9002 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=1787906976; cv=none; b=rA1ZzoGZir9QvsW4bLhKkkHbDgfuHf+G4Wf/BupcKCwTox0zqloklUzWAtfREykycVS1+3zOCb+al3QR6JOzUuAWB/uoQUIEzul8broBPibzkQbpjCYq12rD/8/nCDKGuVZ2Vb2XX6daR2foxWrPijK0f6GNdTSgNbAgtqo4g6A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787906976; c=relaxed/simple; bh=xEqmqLAkni/fiKUtrxj0tYef/XiZXPFSsZwqqpm/vkQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=lSqNQlKfcI7+I7DdTVOBiOaWNGDC9STdg5dwShDWN9I0ZoGjm3AAlLaCDof4EUenWT0/7DvE/w7GUqilDBq7mPQ9ETnaZp31rCJqF9FFWk0/8eftNNw3Af7z6u2cqtwpjB3m7diWo0/uqiHqfqsdGYjeqsEJzjBAFexWMHM/juQ= 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=Q17ZTdF7 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2CCFB4BA9002 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 4FFB98AC1B; Fri, 28 Aug 2026 10:49:35 +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=1787906974; bh=xEqmqLAkni/fiKUtrxj0tYef/XiZXPFSsZwqq pm/vkQ=; b=Q17ZTdF7ThTLe6lQlmbISZ41uAeAIl5RXjXT4simXv4Xq9WAVxzWB NSAf70Q4mgjz7YCwk66gjqI/uwWJ9C+/9acVzVmp37HhZjwoCXoKQdAMjLmFVb75 WSGgckFTnbzJRpaPmBrJt80sKN4J8HkYhqT/NtUyHdVfqLsFPtu7ege+nf9OKCQv Iq/h/sD5atfW1ppFCjYZTUtbzsGIXQ6aaoYZGR0Z7KaDeoIg5VDlzY1s9RIbxp5y lAz7nAa9dz9TCkNCqacxOsA7bcBygNYjN8yKuDknViOtx2LZpVFA+dh26cUDYado QLltprW0MknssA1dHTlVJAdbvNiD1tsLg== 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 l80cdXzw_sWn; Fri, 28 Aug 2026 10:49:34 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p508553da.dip0.t-ipconnect.de [80.133.83.218]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id C53B98AC1A; Fri, 28 Aug 2026 10:49:34 +0200 (CEST) From: Rainer Orth To: Tom Tromey Cc: Andrew Burgess , gdb-patches@sourceware.org, Simon Marchi Subject: [PATCH v2] Require async support for DAP tests [PR34548] In-Reply-To: <87qzjja7ta.fsf@tromey.com> (Tom Tromey's message of "Thu, 27 Aug 2026 09:42:41 -0600") References: <87fr07tupw.fsf@tromey.com> <874igj26tf.fsf@redhat.com> <87qzjja7ta.fsf@tromey.com> Date: Fri, 28 Aug 2026 10:49:34 +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 Tom, >>>>>> "Rainer" == Rainer Orth writes: > > Rainer> Right: some of them already do their own checks for async support: > > Rainer> gdb.base/async.exp > Rainer> gdb.base/bg-exec-sigint-bp-cond.exp > Rainer> gdb.base/interrupt-noterm.exp > > Rainer> but in those cases, async commands are a crucial part of the tests and I > Rainer> couldn't easily use the new supports_target_async there. > > I think it would be fine to stick > > require supports_target_async > > At the top of each of these files, and simplify some of the tests to > just assumes async execution will work. in some cases, this seems to be the right way forward. However, I've a hard time telling which ones should have this treatment. Others clearly run tests both in sync and async modes (like gdb.base/infcall-timeout.exp, gdb.threads/infcall-from-bp-cond-timeout.exp). At least in those cases, we can just skip the async subtests. > However that can also be comfortably done in a separate patch as well. I'd rather do it this way, initially concentrating on the cases where skipping target_async tests can avoid large numbers of timeouts. > Rainer> +# Return 1 if target supports asynchronous execution, otherwise return 0. > Rainer> +gdb_caching_proc supports_target_async {} { > Rainer> + global srcdir subdir gdb_prompt > Rainer> + > Rainer> + set me "supports_target_async" > Rainer> + > Rainer> + set src { int main() { return 0; } } > Rainer> + if {![gdb_simple_compile $me $src executable ""]} { > Rainer> + return 0 > Rainer> + } > Rainer> + > Rainer> + gdb_exit > Rainer> + gdb_start > Rainer> + gdb_reinitialize_dir $srcdir/$subdir > > I think these three lines can be replaced with "clean_restart". Nice. So far, I've simply followed existing current practice, although I've wondered how many tests seem extremely repetetive and consequentially hard to read. > Rainer> + if { ![runto_main] } { > Rainer> + return 0 > > This branch doesn't gdb_exit but falling through does. > Likewise this return doesn't delete the file. > > So maybe reworking this to fall through to the cleanup & final return > would be better. Done in the attached revision. Thanks. 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 3fcec728f85b5d0cfef637d13368c88dad2e7bbc 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,37 @@ gdb_caching_proc supports_memtag {} { return 0 } +# Return 1 if target supports asynchronous execution, otherwise return 0. +gdb_caching_proc supports_target_async {} { + global srcdir subdir gdb_prompt + + 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 + + if { [runto_main] } { + set res 0 + 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 {} { --=-=-=--