Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uk3ac-00FCh7-50 for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Aug 2025 16:35:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uk3aZ-006mM6-KU for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Aug 2025 16:35:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uk3aZ-006mL2-31 for pgsql-hackers@lists.postgresql.org; Thu, 07 Aug 2025 16:35:35 +0000 Received: from fhigh-b8-smtp.messagingengine.com ([202.12.124.159]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uk3aW-001Fbo-0Z for pgsql-hackers@lists.postgresql.org; Thu, 07 Aug 2025 16:35:34 +0000 Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id D3C8F7A0201; Thu, 7 Aug 2025 12:35:31 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Thu, 07 Aug 2025 12:35:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; 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=fm2; t=1754584531; x=1754670931; bh=amzetYsRkR cX2EF6kvS9c3JvgXR3BTbzZK3a8rouHZE=; b=SsVV2inmFhhs5OijYt/9Y3no5j XdRnIVBRKxm7PTLv4by4Rb5yRZoIjP9u9aqXVWK9DPGmsOEuRdOaAM/YCin+i7rW WVrS6ntx8meh9ptQTrQ4RxzznzzpDpSDivSqQIEe00QXrWm/Me6EmDC+jPmMqURa bEQXD01wlC7di0NospqhmD1hBmp1EwHSmKoEW11z0uNZyFlalQzCpKHJEzIRnFQs IwvHWiZduVopNGH7FTbHQVi+3KAx0Qe7uMdgTti0dx8r1RR5KDRqdF6ckOsY0CrW 0yHiY4MhpynyG5xyF/QpH1zzebqkwy8ZXQvjzi13YYj2mRqXScXDsRWKDURQ== 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= 1754584531; x=1754670931; bh=amzetYsRkRcX2EF6kvS9c3JvgXR3BTbzZK3 a8rouHZE=; b=W9KnVGCB/cWyxGCSEla1zMrAVRyN5jCocwCkxBNDk+N2o3/XMdg w9gTbmSFLg4AKPjJ6bxHeZ4E4qvz5b8llpFc0reC0OakwjnTLw3lXiyfsRAxurbW +uguUguOxuMcRU/nkQ81ojenCBBJY7GmT+cTYZ2kLjX/XZ9w3mwdbFc+MlT0anp4 bjRYMVqsk2xrMliR4xbgvZ8rtlc28t/9qIG3f3nu/OAlG95N1uJb/j+eokWVkJX7 35ovI4PN06wavNuAfoiygqyTSgWZ78I3hkZRE2wy/AuaHh7SO0JROF8oxB3HuySi cZTuXD7o21Lup6CZq03J24XQAVvKZU64ozg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduvddugedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefufhffjgfkfgggtgesthdtredttderjeenucfhrhhomhepffgrghhfihhn nhcukfhlmhgrrhhiucforghnnhhsnohkvghruceoihhlmhgrrhhisehilhhmrghrihdroh hrgheqnecuggftrfgrthhtvghrnhepkeeljeeufefhffekhfektdefleeuvdeiiefhheef feefgeegudffudehjeejiefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrghrihdrohhrghdpnhgspghrtghpthht ohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphgvthgvrhesvghishgvnh htrhgruhhtrdhorhhgpdhrtghpthhtohepuggrnhhivghlseihvghsqhhlrdhsvgdprhgt phhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlh drohhrghdprhgtphhtthhopehthhhomhgrshdrmhhunhhrohesghhmrghilhdrtghomhdp rhgtphhtthhopehjrggtohgsrdgthhgrmhhpihhonhesvghnthgvrhhprhhishgvuggsrd gtohhm X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Aug 2025 12:35:30 -0400 (EDT) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: Jacob Champion Cc: Thomas Munro , PostgreSQL Hackers , Daniel Gustafsson , Peter Eisentraut Subject: Re: [PATCH] OAuth: fix performance bug with stuck multiplexer events References: Date: Thu, 07 Aug 2025 17:35:29 +0100 In-Reply-To: (Jacob Champion's message of "Wed, 6 Aug 2025 16:55:44 -0700") Message-ID: <87ldnvgkdq.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jacob Champion writes: > From 50257bf32eb2b0972e5139ac4a79367372c77385 Mon Sep 17 00:00:00 2001 > From: Jacob Champion > Date: Wed, 5 Mar 2025 15:04:34 -0800 > Subject: [PATCH v3 5/5] oauth: Add unit tests for multiplexer handling I haven't read the meat of the patch, but I have some comments on the tests: > +IPC::Run::run ['oauth_tests'], > + '>', IPC::Run::new_chunker, sub { print {$out} $_[0] }, > + '2>', IPC::Run::new_chunker, sub { print {$err} $_[0] } > + or die "oauth_tests returned $?"; We've recently switched to using fat commas (=>) between options and their arguments, and that includes the file redirections in IPC::Run. Although not semantically meaningful, I'd also be tempted to put parens around the argument list for each redirect, so it's clear that they go together. Also, indirect object syntax (print {$fh} ...) is ugly and old-fashioned, it's nicer to call it as a method on the filehandle. So I'd write the above as: IPC::Run::run ['oauth_tests'], '>' => (IPC::Run::new_chunker, sub { $out->print($_[0]) }), '2>' => (IPC::Run::new_chunker, sub { $err->print($_[0]) }) or die "oauth_tests returned $?"; As for the C TAP tests, there's already a bunch of TAP-outputting infrastructure in pg_regress.c. Would it make sense to factor that out into a common library? - ilmari