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.96) (envelope-from ) id 1wohkF-001D9W-2O for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Jul 2026 13:21:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wohkE-00115J-26 for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Jul 2026 13:21:18 +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.96) (envelope-from ) id 1wohkE-00115B-10 for pgsql-hackers@lists.postgresql.org; Tue, 28 Jul 2026 13:21:18 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wohkB-00000000kJh-322k for pgsql-hackers@lists.postgresql.org; Tue, 28 Jul 2026 13:21:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Sender:Reply-To:Content-ID:Content-Description; bh=HDspLq1vrhvhAdxxtZZ4M9gSZN0aphHne0bAYVqFJr0=; b=644qMeNXLaaGx7pMjkMPp0WhRD 4FyW2MoOTQTSwaepWdiOp//jVIZr4S9EVDmpZH1SliDcrRZtkukagyKaUE/PnpR4UxMUDPW/veEFJ bHTrhRD6cOm/hM5XW+LJHuLoSFDVWsj45n3PfsBQd848Ql/C+is08l54AeFfus/DFMz7Ud7vAZ1sU IQoZQ5rIi2g0KAY+tqEoh9hC6pprElBApuBNuoCIG6+kqq3bt5xhk71/QOE8ZEchACRvDoqkvd8xp fQu74gt2NbLZpLIlxUyuhGJOH98rUsDLcGC7KN1SGbo/GSC3z09scOhc1XHjGnFoa2eZUYn3gPrSF PNgxCxEw==; Received: from customer-89-255-232-236.stosn.net ([89.255.232.236] helo=smtpclient.apple) by meldrar.postgresql.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wohk8-00000001XfH-3uSm; Tue, 28 Jul 2026 13:21:14 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.12\)) Subject: Re: Skip .DS_Store files in check_mode_recursive From: Daniel Gustafsson In-Reply-To: <707c55fd-86fc-47ce-875d-3409fd70a16f@dunslane.net> Date: Tue, 28 Jul 2026 15:21:00 +0200 Cc: Andrei Lepikhov , pgsql-hackers , Michael Paquier Content-Transfer-Encoding: quoted-printable Message-Id: <277F140E-9DB1-4679-B821-0D9AF9CFFFD8@postgresql.org> References: <707c55fd-86fc-47ce-875d-3409fd70a16f@dunslane.net> To: Andrew Dunstan X-Mailer: Apple Mail (2.3776.700.51.11.12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 28 Jul 2026, at 13:56, Andrew Dunstan wrote: > On 2026-07-28 Tu 4:53 AM, Andrei Lepikhov wrote: >> I am repeatedly encountering an annoying failing test during 'make = check-world' >> execution on the macOS platform: pg_resetwal with the result: >>=20 >> Failed test 'check PGDATA permissions' >>=20 >> It happens because a filesystem object .DS_Store exists in the = directory. >> AFAIK, MacOS manages it on its own. Given that I almost never touch = this module, >> it seems the OS handles it automatically. >>=20 >> A quick dive into the mailing list history shows that this problem = has been >> discovered [1] and partly fixed [2] before. >>=20 >> It looks like this approach might be extended to TAP tests too. In = the >> attachment, see the sketch of the code and a minor test to prove that = it works. Off the cuff, seems reasonable. > Minor perl nit: >=20 > I don't think you need to say >=20 > return if basename($File::Find::name) eq '.DS_Store'; >=20 > you can just say >=20 > return if $_ eq '.DS_Store'; Since the rest of the function use $File::Find::name it does however = seem a bit clearer for those less well versed in Perl to use the proposed = programming? I had to go read File::Find and I assume I am not the only one =3D) -- Daniel Gustafsson