From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id U7CLDnOU5Goq3RMAWB0awg (envelope-from ) for ; Fri, 30 Oct 2026 08:58:27 -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=NsIWsFwh; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 25C7C378002; Fri, 30 Oct 2026 08:58:27 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.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,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham 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 A12EF1E023 for ; Fri, 30 Oct 2026 08:58:22 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 533694BA79AF for ; Fri, 30 Oct 2026 12:58:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 533694BA79AF 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=NsIWsFwh Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 5117A4BA9032 for ; Fri, 30 Oct 2026 12:57:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5117A4BA9032 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 5117A4BA9032 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793365069; cv=none; b=SoxGYFX3afVynTyuwvZUAOMWI2YNnXU2eVM6UF/yULjd1Un395lhqjBNtLbESz2i3RZr+G1dXouTBHw4quXJ5IJUatVcy+HDmT7cTrEMfV+Eu26pEAoH3gOq+4QPn8qEeSnhChv7Gp8X5PjJaZCbhOQdo9C17lCFEZ9LPy2lBUo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793365069; c=relaxed/simple; bh=+3bEPn55jKELDla/A1HeiNl96/5k7WNWYRfyCXs5kV8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=bu5w+IrtfqITR9ehHRbnQIdpf54I4X8QowbdBJA+iVbXyA8DlDm9hx4eSBNV69pWdIAhp002iAafC79IBfq4A/xbYGW2iXRZoaveJvyyXviMtqQyCCzOFSA8Mxau8KkK6N3/mppQ4NOOTdceQ/hUqoWFvjWTd+nz1Cir/GMQHvo= 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=NsIWsFwh DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5117A4BA9032 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793365068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RqmOKtx92zaXoNw0rADoz8CK+P5l7aL0j6sPSkNKmrM=; b=NsIWsFwhL9DioRCj5j0KP84Y0ztvh9GoYJeRP8HIJ5xY4Ms2vTJkdJdcytF7C56KWjNzst HZQ52bcGHkHSFhuzxhL+qKDesPveyN5C1+FiT/0iSWAmiak0FU+RDibvjJixoSOYxbT0aI v62REnljQ+LyDEfgNSPGTGNWyhF9d78= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-693-8Xm4mBpZOnqUtMhAb7wfhw-1; Fri, 30 Oct 2026 08:57:44 -0400 X-MC-Unique: 8Xm4mBpZOnqUtMhAb7wfhw-1 X-Mimecast-MFC-AGG-ID: 8Xm4mBpZOnqUtMhAb7wfhw_1793365064 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-53661e036a2so12950981cf.1 for ; Fri, 30 Oct 2026 05:57:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793365064; x=1793969864; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=RqmOKtx92zaXoNw0rADoz8CK+P5l7aL0j6sPSkNKmrM=; b=k2qfmpbl/2orTh2X1Afc+j4wONuVsFGG/6uRwrjIvSQHxhkBg5WWLuaEMfyuijuoaV GkKQtk/TH0KBGuHFsywKH/MEIzki5YU57lzHzFEz6KKXv5seOKuxnhsh2WPeiH0nyE5i qcMYbQlly6iw5Lq0ZjN4R58veveH+eqdXlhO3fJ/djPwS4hDrVSoHvfArN7MZXgsJOnA o4P1sMkFJ9wtHJd5Ue99Ld6sAWme6t9pE00mgb7LJB5UbEzEzo7SEBS7++Tf2p2LcjyE /pMwxqLIjhdswc797OunErATMSLpaPwyEKVAkNJH1RMb/y98RE7trGIvCg2N89kWTk/o GZAw== X-Forwarded-Encrypted: i=1; AKwUvBzcp8rbmbdhXhY/cwIDoxYMF+crLuv5lAjPO+y9e09kPn9266h0nQ5ItPrWeidtGXqt7JHE96f/2xy47w==@sourceware.org X-Gm-Message-State: AFq9FYIV0UKH+ZXyNnafji+QLvI3dTCWwqjilIpWXncLzFiQBKMKrGzZ 8q2EQfr1jvXbubZyLyaSAGoJhCxUvlkFXXDIxRmjE7JADAypYNvcYT4h5IjMuB8xrtsQ9X27JvY zhlTGzWcp+KyvgBHOIbeU84GZ4MKVqbK74K9CrEb283BBPVX8WfYMxqN+dSU+9krcZLYoKZ8= X-Gm-Gg: AYBFou3F/hxWKf1MpjRNL6l1x8+qXPy9PWvrYg3KluJB8QhsK74dugLIQJvZv+iqkyj ftJ0NUZ77JXNZTxzdSUaQZeYosuOhiBeDboY3fwdrsxjtb2q0GLYLKINIZXjpvtTqorR0jBp7RV kjaXJYsItm9RaipiGtK0EsAgrsd6MJAqgdFQ9hkjICcnKJjHLg2MBNsQpbpoQoJ53sF5ViyglsK uGLlljq5nAiEhsDcYylPoz0grkXzqqNaFi4Pcrn/3Cjer4aZ7pzkMA3i9PXaQJrC1y9av7P/sFK mmlJDzlKY390wqpZpT8w2caXfgYtWeMmvOjSSyg5DiW0tkicMkU3Y7kVecThd4nk750Hia4l7Bl x6YjylKUmh4i2KXRUVOyWkHsGYKNLnN17n/7YfggGhyn0Z1RT3tDygpV1N2sUgfi7VKBo8/ryYU nGRJFhP0EowBuJ/+J/+6934w== X-Received: by 2002:a05:622a:a584:b0:534:5df7:ee51 with SMTP id d75a77b69052e-542b3d6f85amr30607651cf.9.1793365064231; Fri, 30 Oct 2026 05:57:44 -0700 (PDT) X-Received: by 2002:a05:622a:a584:b0:534:5df7:ee51 with SMTP id d75a77b69052e-542b3d6f85amr30607291cf.9.1793365063601; Fri, 30 Oct 2026 05:57:43 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:993e:22e8:4ed1:527a:55c0? ([2804:14d:8084:993e:22e8:4ed1:527a:55c0]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-5431246b61csm12836741cf.16.2026.10.30.05.57.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2026 05:57:43 -0700 (PDT) Message-ID: Date: Fri, 30 Oct 2026 09:57:40 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/testsuite] Fix timeout in gdb.mi/mi-dprintf-modified.exp To: Tom de Vries , gdb-patches@sourceware.org References: <20261029173641.2135332-1-tdevries@suse.de> From: Guinevere Larsen In-Reply-To: <20261029173641.2135332-1-tdevries@suse.de> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: qbavEGNYFxUM72A-MDgXWWY7Llbr2lBg5vkjEOVVaCc_1793365064 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 On 10/29/26 2:36 PM, Tom de Vries wrote: > With a gdb 17.2 based package, I ran into a timeout in test-case > gdb.mi/mi-dprintf-modified.exp: > ... > (gdb) > PASS: $exp: get number for dprintf breakpoint > Expecting: ^(220-exec-next[ > ]+)?(.*[ > ]+[(]gdb[)] > [ ]*) > 220-exec-next > 220^running > *running,thread-id="all" > (gdb) > =library-loaded,id="/home/abuild/rpmbuild/BUILD/gdb-17.2/build-x86_64-suse-linux/gdb/testsuite.unix.-m64/outputs/gdb.mi/mi-dprintf-modified/mi-dprintf-modified-lib",target-name="/home/abuild/rpmbuild/BUILD/gdb-17.2/build-x86_64-suse-linux/gdb/testsuite.unix.-m64/outputs/gdb.mi/mi-dprintf-modified/mi-dprintf-modified-lib",host-name="/home/abuild/rpmbuild/BUILD/gdb-17.2/build-x86_64-suse-linux/gdb/testsuite.unix.-m64/outputs/gdb.mi/mi-dprintf-modified/mi-dprintf-modified-lib",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff7fc7000",to="0x00007ffff7fca000"}] > *stopped,reason="end-stepping-range",frame={addr="0x000055555555480e",func="main",args=[],file="/home/abuild/rpmbuild/BUILD/gdb-17.2/gdb/testsuite/gdb.mi/mi-dprintf-modified.c",fullname="/home/abuild/rpmbuild/BUILD/gdb-17.2/gdb/testsuite/gdb.mi/mi-dprintf-modified.c",line="44",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="3" > (gdb) > PASS: $exp: next over dlopen > FAIL: $exp: wait for 'next' to complete (timeout) > ... > > This can be reliably reproduced on current trunk using: > ... > -mi_gdb_test "220-exec-next" ".*" "next over dlopen" > +send_gdb "220-exec-next\n" > +sleep 1 > +mi_gdb_test "" ".*" "next over dlopen" > ... > > The problem is the ".*", which consumes an MI prompt. Hi Tom! Thanks for working on this I have checked that this patch does solve the issue but the explanation is confusing. It is technically correct to say that the problem is ".*" consuming an MI prompt, but I think the following is a better explanation:    The problem is that ".*" may consume past the prompt and read the messages that the following    gdb_test_multiple expects to consume, if they are produced fast enough. Apart from this nit, I think this patch is a great fix Reviewed-By: Guinevere Larsen -- Cheers, Guinevere Larsen it/its she/her (deprecated) > > Fix this by anchoring the regexp on the output before the prompt. > > Tested on x86_64-linux. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34915 > --- > gdb/testsuite/gdb.mi/mi-dprintf-modified.exp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.mi/mi-dprintf-modified.exp b/gdb/testsuite/gdb.mi/mi-dprintf-modified.exp > index 641c4c552ae..edb4c968643 100644 > --- a/gdb/testsuite/gdb.mi/mi-dprintf-modified.exp > +++ b/gdb/testsuite/gdb.mi/mi-dprintf-modified.exp > @@ -74,7 +74,8 @@ set bpnum [mi_get_valueof "/d" "\$bpnum" "INVALID" \ > "get number for dprintf breakpoint"] > > # Use 'next' to step over loading the shared library. > -mi_gdb_test "220-exec-next" ".*" "next over dlopen" > +set re_last_line [string_to_regexp {*running,thread-id="all"}] > +mi_gdb_test "220-exec-next" ".*$re_last_line" "next over dlopen" > > # Now wait for the 'stopped' notification. While we wait we should > # see a 'library-loaded' notification for the loading of the shared > > base-commit: 3d34f4b057169a79b10e43b33c2156f839d5b92c