From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58FA125B0A5 for ; Tue, 1 Sep 2026 11:17:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788261441; cv=none; b=GDDoXD7wrJ+wn29JgRo3MKcibr9xVR+dVT+5yrstBa8tS8N7GJAm1+/1j1lf+hz/98ER+g6BAxSAMQSchVitS3ApHylSpBjTiTUE7kz1E8Pw8eSSYqDG/ai/cykuJAIz6koG90/M1LTvrfJc5NwD0X+QdlgdTPK6COgG/yaMumM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788261441; c=relaxed/simple; bh=X7Ch4vCyryearq8ZfUIFmCvoQUXu/giDE2rHXHEDT7s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DzWH0bFURu3wfUFiDLf587UWabnI9gcNjQ47jBooa8lIL1lGghGRVGUUFTQ5gTfCapTlTTJFvsxPvkHuEW/27VFUrXSP4LHLjnST8bcX6n9AOYH/CmF+aaZk3RUSWsnmmyq21J6KFbgwNbBQkZnahLVKKEliAjE6eUE0UepcWEo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=P9UskWl8; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=gaLDuJC4; arc=none smtp.client-ip=103.168.172.155 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) header.d=pks.im header.i=@pks.im header.b="P9UskWl8"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="gaLDuJC4" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 7D5FE140011F; Tue, 1 Sep 2026 07:17:19 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Tue, 01 Sep 2026 07:17:19 -0400 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=1788261439; x=1788347839; bh=OLqwweA+Z2 5cY40doKmBAIrhGB8nvVy9jTkpsgi3Q9I=; b=P9UskWl8Z6AVw9wHZbO2o9CoIq b1YQnDd/RDCj+KABEWw1PQZtvBe6lfFN2+UkbrydBw08jLwnUag0maxubVX0osa+ VBvXKVa12yI3Ojr/IFEQFYHE8mIl3IgSxeDxi3iWu6BqEn4bLcrGMEaa14Caa8Pv KiTRBKx2G0z+mlm32j+OnCZkrhahMZyJRv5k7GbN9Nmj39Y/cD58eVMtfchfqxw+ UDJDZn44AmNt+DQ/wTlVhRlMUvGE1a6rOmB5s98SeHa3LL/oxzaNS7HS63dZocGg TY8v/kAUBochmq+gA0jUjq9/Cao6fuUgftSiNrMuuEztb+Q9eetg5eEioajA== 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= 1788261439; x=1788347839; bh=OLqwweA+Z25cY40doKmBAI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edl4vB9fRUUA X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 1 Sep 2026 07:17:18 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id bcd79b01 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 1 Sep 2026 11:17:26 +0000 (UTC) Date: Tue, 1 Sep 2026 13:17:11 +0200 From: Patrick Steinhardt To: Michael Montalbo via GitGitGadget Cc: git@vger.kernel.org, Michael Montalbo Subject: Re: [PATCH v4 3/3] t/lib-httpd: document writing concurrency-safe CGI helpers Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Sep 01, 2026 at 12:27:56AM +0000, Michael Montalbo via GitGitGadget wrote: > diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh > index a216e5376f..8ca09fe85b 100644 > --- a/t/lib-httpd.sh > +++ b/t/lib-httpd.sh > @@ -159,6 +159,17 @@ prepare_httpd() { > mkdir -p "$HTTPD_DOCUMENT_ROOT_PATH" > cp "$TEST_PATH"/passwd "$HTTPD_ROOT_PATH" > cp "$TEST_PATH"/proxy-passwd "$HTTPD_ROOT_PATH" > + # Apache can run the following scripts concurrently per request. Make > + # sure any state management logic is resilient to race conditions. > + # > + # For example: > + # - use "mkdir dir" to ensure only one request "succeeds" under some > + # condition (see http-429.sh). > + # - chain (&&) atomic operations like "rm marker" (no -f) with the > + # logic that "claims" the marker instead of relying on a separate Nit: I would have written "with the logic that is guarded by the marker" instead of "claims". > + # "test -f" and "rm marker" check (see apply-one-time-script.sh). > + # - use scratch file names that include the process ID ($$), so > + # concurrent requests do not overwrite each other's state. > install_script incomplete-length-upload-pack-v2-http.sh > install_script incomplete-body-upload-pack-v2-http.sh > install_script error-no-report.sh Other than that the whole series reads a lot better now, thanks. Patrick