From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mzdDE9oe4mpeiz4AWB0awg (envelope-from ) for ; Wed, 28 Oct 2026 12:12:10 -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=Y97pgBpi; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 35211378002; Wed, 28 Oct 2026 12:12:10 -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.1 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_SBL_CSS 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 9A25C378002 for ; Wed, 28 Oct 2026 12:12:09 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7993B4BA2E29 for ; Wed, 28 Oct 2026 16:12:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7993B4BA2E29 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=Y97pgBpi 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 B2A164BA2E13 for ; Wed, 28 Oct 2026 16:11:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B2A164BA2E13 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 B2A164BA2E13 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=1793203901; cv=none; b=EqYJlaX0QtQqQ4m+ZxnDD3bze+bJNfu4I5KFUz4fEQ53s36wUW7pSkkiWE5guZmM1Y6RRLTdrtEpT7QIO0QpAxdxiSPc8Av0ljFlhT8oTe0DHjFwFUeDJkZxQWyMMmMG6t/cSb3hIa0EFgDuJtQNFqCR0VjabsENslC2H/Ebwc0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793203901; c=relaxed/simple; bh=HlrUCZ4xDfWlJv9arai46MQEGZa1MOkiBfwYfZfEQQU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=PdQK0xEoasSVCzfAV4DehdEFJWXsdHa1Kpzcr/5+Lwfu1IaWJ0g6cbTdSadF7Eo02JXG/4lUA7ZKKE6+5U3pX7Gw9qgdPhnDEgr86pZeILqfjsBkb/o3eaalA1J5SNAAeOC3BMLUd7y7Nprr+nIphEyMD0yCkKXDcWGvOjJNxPU= 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=Y97pgBpi DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2A164BA2E13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793203901; 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=EYfdYhXw6aPKUzDqTueINs1a9Ne00rqmfebmiEoxwm4=; b=Y97pgBpiFYHlxn6QFavcQ2QDRpyqUzViz1+KWzhkZlp44x0Fx05XEfMi+AyRP9YNY707ZL mjNPyH81fT+csqBVRihXaIJY+PM9UdILWTYuu9iQ0wHnSha5IMLIdc2GIPPtsL3y3GBySO leLZ3Wy7EPJNbp+xANYy2ghbxhXLF90= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-428-jQ4iynuWMZm2ZyQIxe0eSA-1; Wed, 28 Oct 2026 12:11:39 -0400 X-MC-Unique: jQ4iynuWMZm2ZyQIxe0eSA-1 X-Mimecast-MFC-AGG-ID: jQ4iynuWMZm2ZyQIxe0eSA_1793203898 Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-3ab926c236aso1052306a91.0 for ; Wed, 28 Oct 2026 09:11:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793203898; x=1793808698; 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=EYfdYhXw6aPKUzDqTueINs1a9Ne00rqmfebmiEoxwm4=; b=K46eessVsmvKDFXdyMa5RihftJpJ1k1hib6oB4h47Anx0anRSIPw8bHFWgcSTQ5wr6 J34ccuDW20aj1o1tsTCJZ/EhclRVNjtlq0O4WrhV7fEGSS3MW+Ovk8DlWsDemkK+jqBB ZC5HTP4JwIYqAkbvJD/XZW6aftvSuZpmdpGAaMks/9cMwH6bK70m3OmJbd50prPHYbq7 DBPFOD1io2UZCAGqszLLjMQrWbj5UbRT4DDsWZHPW+OjEAGSIvh3VEKIMTn3UdVR/tsR V70aqwylaJMvNA7YT1/Y7KOXduJ7VBj8uMKMP+Iak0vRsEubClQcLCrkwpXiLT7JflPa pI1w== X-Forwarded-Encrypted: i=1; AKwUvBxPnRKRQHx7afl2qv8aL7qA7SAbsEk+id/9P30PUiwsixr+zRJ2W0MX4yfHNA8nZ7bHtME4+dAsXyEeHg==@sourceware.org X-Gm-Message-State: AFq9FYL9arF9WHGJMtKOjVt+maX+slBZ/k3F80NO5+Tp6fJw7vf+NjWI azyDcC/K4/gfomORncCDu8lvqgpxGqZWZxx77k53cqcrTiEwhHTKupkL734OAIfixNS7CXFwG0a ZDi6+eAcQC2YlCgWn7rzJd9855sY8k6kTKnA3wo24MIYaa5eJRFezQ54ogeMTg2Q= X-Gm-Gg: AYBFou2fjHjcwdTWJ1enKOM84XVCT7G9nXJglF6cYo9U0pAF+LjpVSb/BJw2BCIGiVQ InL+JasvirCFVdPywy6NiFsCn1fEomqK4dZceWmLrZrwAT0wvpEijIU5HRuiycXmCo7zkMOaDE7 GCrUkiK58mbV6mXvLoBFOOwtf39JikYPH6XH0p6zRYPYdPjRmR1FwlYE+CdPszW5UUDrDJ36xAq I6nG5tIScwNflttXOYrd1gudKifyiI9zkJFrOQ9HuM8yt2imnhHuNxBLezOWgZiNecnbF+n4xEb aHxhnDjNtSM1TW72zoYbqFvHJImlPbHZ+nXQvtXYnRQxwL3oxUczpjrbr5bZyqacFaUG0AYMOr+ QGkfxOz/hQSkwpv8TQ2rsbE+pV1lIWZ6wHL0FGj3Evh/ZXNUxFFIWWqw= X-Received: by 2002:a17:90b:4b86:b0:3ac:a11a:7c84 with SMTP id 98e67ed59e1d1-3ae58195de0mr2149208a91.65.1793203898466; Wed, 28 Oct 2026 09:11:38 -0700 (PDT) X-Received: by 2002:a17:90b:4b86:b0:3ac:a11a:7c84 with SMTP id 98e67ed59e1d1-3ae58195de0mr2149194a91.65.1793203897953; Wed, 28 Oct 2026 09:11:37 -0700 (PDT) Received: from [150.1.200.157] ([172.56.109.82]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3ae55d555d4sm2168225a91.1.2026.10.28.09.11.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Oct 2026 09:11:36 -0700 (PDT) Message-ID: Date: Wed, 28 Oct 2026 09:11:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/6] [gdb/testsuite] Extend gdb.testsuite/lock.exp To: Tom de Vries , gdb-patches@sourceware.org References: <20260929110921.1910094-1-tdevries@suse.de> <20260929110921.1910094-5-tdevries@suse.de> From: Keith Seitz In-Reply-To: <20260929110921.1910094-5-tdevries@suse.de> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: FKB3B959p_c7KKtK2X1mOX6ROubNXxkJL-uD5Rk3qyw_1793203898 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Hi, I think this series looks good, I just have one question. On 9/29/26 4:09 AM, Tom de Vries wrote: > diff --git a/gdb/testsuite/lib/gdb-utils.exp b/gdb/testsuite/lib/gdb-utils.exp > index 1277558170d..9ccde20634e 100644 > --- a/gdb/testsuite/lib/gdb-utils.exp > +++ b/gdb/testsuite/lib/gdb-utils.exp > @@ -180,10 +180,15 @@ proc version_compare { l1 op l2 } { > return 1 > } > > -# Acquire lock file LOCKFILE. Tries forever until the lock file is > -# successfully created. > - > -proc lock_file_acquire {lockfile} { > +# Acquire lock file LOCKFILE. > +# If the lock file: > +# - doesn't exist, create it and return a file handle/file name pair. > +# - does exist, and: > +# - ON_RETRY is empty, wait a bit and try again. > +# - ON_RETRY is non-empty, call it. If it returns 0, don't retry and > +# return {} to indicate failure. > + > +proc lock_file_acquire {lockfile {on_retry ""}} { > verbose -log "acquiring lock file: $::subdir/${::gdb_test_file_name}.exp" > > while {![info exists fh]} { > @@ -191,7 +196,11 @@ proc lock_file_acquire {lockfile} { > set fh [open $lockfile {WRONLY CREAT EXCL}] > } trap "POSIX EEXIST" {} { > # Lock in use. Ignore and try again. Propagate all other errors. > - after 10 > + if {$on_retry == ""} { > + after 10 > + } elseif {![$on_retry]} { > + return {} > + } > } > } > The case where ON_RETRY is NOT empty and returns non-zero is not particularly well documented, but I assume it is the same as ON_RETRY being empty. That is, both cases should loop. However, in the empty case, there is a 10ms delay. In the non-empty case, there is no (default) delay. I see that the on_retry proc in lock.exp does do a delay. It seems it would be easy to introduce a really tight spin? In any case, a note to document this responsibility might be in order. For the series: Reviewed-By: Keith Seitz Keith