From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=202.12.124.158 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796290723; b=3WKnG9UHhzYHVqu7fUlfKWpJeVjf7ySYXhzOYcdS1yqd3T43Dl38rjrj3yE46F2+iarC v/TC+lrbJAC1HnNl00TGQK9nvjc2NT9wlLBonf6zh/MpT2dlq7LK07d9VOKRAeb2DUMLU qFVmJWm9egmQUGV4QNF9k9ZAluyJreXHaDP1m2MPi+K4fJB9Z3kOpfX+TBn5VbKgMb7wj PAsPBQSDfENbUTK3TYNJw+Ga5T94irMN0mHYMpmBOtZOv7VPllco7Op3Om/IrPpP6qilh 0PsGNS/5pquJfgs8AgNb2QMb/vum/h0pRYDAww/tQ/7dRqZskHN2wyGmbIxQ94IVeYA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796290723; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=hfezHyywWZ76hbkaMRg0dXApUDodH5q/2BfcyOiuz9g=; b=X3x1yCgnnqO4ELDQpaK19qh6cwH/mdm16vOowCfOnNsAozFDgRnHx82T4Vmabb4IaVLk 5jxup9T5Sot5IHECPKt6FrA6jQwkOMo7mmouxcbiD9+WYXp03VUENqih1uCROVkzav8VW vxP7ewwOAbOLTalBnZuHK1V0ckjZJjBGHt8H84wRCVHlBsrjCurYsnnGy5OPOkGfnAoUn sR+9GKnJru8NU9e3y2Tjk9ye9gUygvAb9TGW/Xut0/6UB78MJ/bUdXeOBIoEfNF7YLjHL BDrb+wRuWpOnuUyVhD38mhOdFGKQ8JIWjWH3zuvB/DuY3JIqYMRiZji20DEwEyaLH4A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=TPmDLcQp; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b="Z/cGe7iN"; arc=none smtp.remote-ip=202.12.124.158 Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22799606A32F for ; Thu, 3 Dec 2026 09:38:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 22799606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=TPmDLcQp; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=Z/cGe7iN Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 2A8BB7A022F for ; Thu, 3 Dec 2026 04:38:42 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Thu, 03 Dec 2026 04:38:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1796290721; x=1796377121; bh=hfezHyywWZ 76hbkaMRg0dXApUDodH5q/2BfcyOiuz9g=; b=TPmDLcQp0qsQgs5vfwcE8vLovq kpikvxYxw8vUNCxcXVWkYsB8E6NQTIJXsEk/i0CbvTIoZTSVhs0X0ZS6MAX5PQdE vz0AeowzrTp8kLtDVPrKH6NYRqapoiBqfEjpRhWkTvBqP9vHmXWVEEKszwI6c45M eAWIenhZZB/Pdn4jF8d5+j9OY5BaqB5yn83cr5f3L11w48ANYJS/mtfwP71l6MvD UcaKzV4pYE/LyMeE6UmISz/8elTsy87BpxWPn11JIcE4v2aS0+3XD1ux6Y7/1nHy ane86g5LU8wGQqO2S34hl14dnoZZjOddzkRQbeXYwK8n+FeWVw+j9zkQmovA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1796290721; x=1796377121; bh=hfezHyywWZ76hbkaMRg0dXApUDodH5q/2Bf cyOiuz9g=; b=Z/cGe7iNfJQTs6+fW+v+WOv8VN58k7DyFF+s8uXjR6HaCiPVsJr QdBbjsdl4v/jok/h899IH9orBY7FN1S0nLW8zhvHwhm5tABbmXRZTRURbFYdKkFB zMb4v9DTnFtyjVC3APAzr08RT1fslLocqc3F5/Fm9RIE+wl0C9iOTYC5ElMWkcp7 amuMfRLOEfVUeo2L2OfxYzQ58nUrfG97kqrmzhHALKiQIR6crf6M+eiHsGfCfpT+ lD75rsZ1u1DIbVjKpvzk21LF9HN7UJLYlhmgGAOuBMRZl5/u5Vq4hNvI0Xouqs28 Qc+MfjkLdr/SCkWzxUQAq2ehbN/p+ufBKSA== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=pks.im a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1796290721; d=pks.im; mf=PHBzQHBrcy5pbT4=; rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+; s=fm3:rsa-sha256:ykAfBdIaSTma6Zedsh8HQiKsScHwj0tdPK3IXXqBej03glj Pgx+jKBeyi6BEKdlHmF1j2EJLKU+1mwhL4hah3ne3KnFmBkzBeYtpGjRXCONlRXo JGLfxsr7d6CPqGSYb0zJzBmo9HvNk2xvhCaewua1twcLqc3F3t9JV3QG40cG2Vbn XNSGVNX1NLyJSGLa/1OCcHKbNotg92UZZM/7g3SZ1cG4ujX9RBd/SinA/XX9gyL7 gc86+odRSUrGVitUv9rRqhNetByHJzbSuSfRsYCU9TfbylhO9fH2tnJIF56aY6te zQ+Ff45gXVE8htiWsKxEN9J6k3zYSPptAafWCWw==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-type,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:AaG6CBrUP4Xtdd7ulD81jKMP2pm0ibrghFXA8Lma2s8=:oBaS7wkh3xD8P7K5N23ufvcPFshzgCplDAlKi9uIhAo=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEr6kzvs38XC/ARUXoC6NjO0X1ZUpF/3IKqtopFOWe3jGXgGH2khqqrLasGzJRqWj pDCfk4FR7pmRi9ou7YFjFCXv+zn+Hk1Cd2m9McO8H8byGgmj6+1ml6g4Z5S003ru1fqD0z BCtUq5wQbUo/ffhRifSztejZvdZeD8oSh4NtPLvX/rd61MY164hj5qXDei/LlkA7KqyWs1 pjOSVVQc4Y1i6kyWNqyfO58cq6PpsyyALD/c4RzP2+i7dYGbaWlKKRFKgjO9P8fIwbjtjp UkC/a8NFjz3tFuaE+tlvUk0z6ZupZQyjpfUnGb95/MYIuQ84br749N2UMBWIzVrNTxvGEi 2wf9a9V9PHCdEfDEJS7dMd7joRam0JExmtBKgaeIrArA+5DUoqbxXJJs7GU5VjK/dN2WPB mxwg4f2Pr7FnffTA8nNv63ERshCJRmZTrOoaszsBS2+dC+zFXN9cVRsLnum3XUUAA5DhzX Vowfe1cboPDHNz5K4LZqEMd8Eq4M6jTKh8AwCHw6fffpLFvQhaugnzT36dKaj2n6xBbZiV M2rZpJVKHMCm1GvV8nnzhKNjXIeVRFc8bSBVmC6rBtcFOItrfg3XXtQDNkbR8AFcIlZUD1 JI0SNcFR10QCHz8foza1Lr6sOLryiGUTdgAm2J5tgV77eVCXStjiT4Ejuxmw X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Dec 2026 04:38:40 -0500 (EST) Received: by mail (OpenSMTPD) with ESMTPSA id 8cc2847d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 3 Dec 2026 09:38:39 +0000 (UTC) Date: Thu, 3 Dec 2026 10:38:33 +0100 From: Patrick Steinhardt To: Kaartic Sivaraam Cc: Git mailing list , Christian Couder , Junio C Hamano , Harald Nordgren Subject: Re: [PATCH v5] test-lib: run EXPENSIVE tests one at a time Message-ID: References: <20261119-ks-ci-long-test-hang-fix-v1-1-45c2fff6d9f0@gmail.com> <20261202-ks-ci-long-test-hang-fix-v5-1-aeb09e4dbc25@gmail.com> X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261202-ks-ci-long-test-hang-fix-v5-1-aeb09e4dbc25@gmail.com> On Wed, Dec 02, 2026 at 01:23:30AM +0530, Kaartic Sivaraam wrote: > Range-diff vs. v4: > > 1: ad8fa8d872 ! 1: 2fcdeefff3 test-lib: run EXPENSIVE tests one at a time > @@ t/test-lib.sh: test_missing_prereq= > > test_external_has_tap=0 > > ++# Remove the lock only if it still names $1 as its owner, so that > ++# a lock someone else has just taken is left alone. I feel like this comment is a bit on the verbose side as it doesn't really provide much value over what the code already trivially tells you, but okay. > ++remove_expensive_lock_owned_by_ () { > ++ test "$(cat "$expensive_lock_" 2>/dev/null)" = "$1" && > ++ rm -f "$expensive_lock_" > ++} So this is now wrapped in its own function. Makes sense, I guess. > @@ t/test-lib.sh: fail_117 () { > +have_expensive_lock_= > + > +expensive_lock_unavailable_ () { > -+ say >&3 "cannot take the EXPENSIVE lock, running anyway" > ++ echo >&2 "# cannot take the EXPENSIVE lock, running anyway" > + rm -f "$expensive_lock_.$$" > +} Here we now output to stderr, and we cater towards strict TAP parser by prefixing it with "#". I think this change makes sense, as this should make it more discoverable when this scenario kicks in. > @@ t/test-lib.sh: fail_117 () { > + # > + # Another waiter may have taken it over since we > + # looked, so only remove it if it is still the same. > -+ if test "$(cat "$expensive_lock_" 2>/dev/null)" = "$owner" > ++ # > ++ # Rarely, after a holder is killed, two waiters can > ++ # both get past this check and run together. Heh, it takes courage to claim that a race happens rarely. My experience is that no matter how unlikely a race, CI systems know to trigger that race often enough to annoy the hell out of you. > ++ if remove_expensive_lock_owned_by_ "$owner" > + then > -+ rm -f "$expensive_lock_" > ++ echo >&2 "# removing stale EXPENSIVE lock left by PID $owner" > + fi > + continue > + fi It's a bit funny to say "removing" after you have removed the lock already. But providing that context can definitely be helpful, I'd assume. Anyway, my comments are really only just nits, so please feel free to ignore them. Other than that I'm happy with this version, thanks! Patrick