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 1qnHMN-00AQ2N-I6 for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Oct 2023 11:45:12 +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 1qnHML-00Etsd-WE for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Oct 2023 11:45:10 +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 1qnHMK-00Ets4-9b for pgsql-hackers@lists.postgresql.org; Mon, 02 Oct 2023 11:45:09 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qnHMG-007mIA-HM for pgsql-hackers@lists.postgresql.org; Mon, 02 Oct 2023 11:45:07 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 4BA275C0492; Mon, 2 Oct 2023 07:45:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 02 Oct 2023 07:45:03 -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:sender :subject:subject:to:to; s=fm1; t=1696247103; x=1696333503; bh=hT L+2jJLQdDfzlfPedcR4fHkMguQ1W/8Rg0fr8/wgs0=; b=kjmlAZs0xOJwinmGdg qGuFUaUp3AGRADd44Wi7WfJ/5lG4ssiYXWyf1su0P6BuJs6XKW9U+JfUywl7k2nM 0ft5YuAlYR6e8qCKd/B97fdkCJL0RhP4spxrT2olY8HWjTArT52o6c5I+C4xSZxk LOcwwkKKhkBl71en+pEfvHOG9fY1BX+zxcnwatRiw6eLjM7ygd8jZq29u8BLP5fA RKbVBSa+GK88YTUA+oL8rlFbTtJU6ZU6Hf8jsx0O2kBGoIzUjwu7za6PjXIPalXb H0l5EbnGAq1tTLpf1fr0i4kK2hBVX1/p/ty6JM7VSPr7Ro72pYw6ynKZgbqxjH1S OTAg== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1696247103; x=1696333503; bh=hTL+2jJLQdDfz lfPedcR4fHkMguQ1W/8Rg0fr8/wgs0=; b=aqBj5n1m0sL9Idhh+iKQHx1J8dy2F wCUerqmdaA1SbrMKsJ1ChJuHhj5H673AVmPXJ6PLSQ4l+blCl0hapQGszfTeAh7A KNvBNgbaQ13yiFVvazH+0b5F5+tg4YVYJvJR07c/v35d4NoH/XfMwbKLyURf3Hcv g4qFnZl8CSytfHCrv7W6cL/czSpkUrPN79sA0iRRla/DfOx8J+y+xEvhUaFYqZCf 6s5vE/+Qsqc4e5H4AFwf5ZpIyznvFpmUYi5l9PLcXsvMbfwL2WlbcZqWTiJymmWv EE0JdoN7yDIZeugiM/AykMPYn6XBUz+2evtKeIDdLIwo6PxGRQW6qhQpA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdelgdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufhfffgjkfgfgggtsehttdertddtreejnecuhfhrohhmpeffrghgfhhi nhhnucfklhhmrghrihcuofgrnhhnshonkhgvrhcuoehilhhmrghrihesihhlmhgrrhhird horhhgqeenucggtffrrghtthgvrhhnpeekleejueefhfffkefhkedtfeeluedvieeihfeh feeffeeggeduffduheejjeeigfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehilhhmrghrihesihhlmhgrrhhirdhorhhg X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 Oct 2023 07:45:02 -0400 (EDT) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: "Drouvot, Bertrand" Cc: PostgreSQL Hackers , Michael Paquier Subject: Re: Replace (stat())[7] in TAP tests with -s References: Date: Mon, 02 Oct 2023 12:44:59 +0100 In-Reply-To: (Bertrand Drouvot's message of "Mon, 2 Oct 2023 11:35:45 +0200") Message-ID: <87o7hhnt8k.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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 "Drouvot, Bertrand" writes: > Hi hackers, > > Please find attached a tiny patch to $SUBJECT. > > It: > > - provides more consistency to the way we get files size in TAP tests > - seems more elegant that relying on a hardcoded result position I approve of removing use of the list form of stat, it's a horrible API. If we weren't already using -s everywhere else, I would prefer File::stat, which makes stat (in scalar context) return an object with methods for the fields, so you'd do stat($file)->size. It's included in Perl core since 5.4, and we're already using it in several places for other fields (mode and ino at least). I see another use of stat array positions (for mtime) in src/tools/msvc/Solution.pm, but that's on the chopping block, so not much point in fixing. - ilmari