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 1wAFXE-002CgU-0i for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 23:08:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wAFXC-00308h-1F for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 23:08:38 +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 1wAFXC-00308Z-0J for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2026 23:08:38 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wAFXA-000000017Gq-1mNQ for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2026 23:08:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 637N8Y8T2824160; Tue, 7 Apr 2026 19:08:34 -0400 From: Tom Lane To: Andrew Dunstan cc: pgsql-hackers@lists.postgresql.org Subject: Buildfarm misses running some contrib TAP tests MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <2824043.1775603217.0@sss.pgh.pa.us> Date: Tue, 07 Apr 2026 19:08:34 -0400 Message-ID: <2824159.1775603314@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2824043.1775603217.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable I noticed by accident that my buildfarm animal indri stopped running certain contrib TAP tests this morning. In [1] it's running contrib-amcheck-check (00:00:12) contrib-auto_explain-check (00:00:02) contrib-basebackup_to_shell-check (00:00:01) contrib-bloom-check (00:00:05) contrib-oid2name-check (00:00:01) contrib-pg_stat_statements-check (00:00:02) contrib-postgres_fdw-check (00:00:07) contrib-test_decoding-check (00:00:07) contrib-vacuumlo-check (00:00:01) but in the very next run [2] we see contrib-amcheck-check (00:00:12) contrib-auto_explain-check (00:00:01) contrib-basebackup_to_shell-check (00:00:02) contrib-bloom-check (00:00:05) contrib-oid2name-check (00:00:00) contrib-pg_stash_advice-check (00:00:03) contrib-pg_stat_statements-check (00:00:02) contrib-pg_visibility-check (00:00:03) contrib-test_decoding-check (00:00:08) What became of postgres_fdw and vacuumlo? And why wasn't pg_visibility being run before? And why are dblink and pg_prewarm visible in neither list? Apparently the addition of pg_stash_advice changed something here, but what? Looking at some other BF animals shows that it's not just indri: other autoconf-based animals are showing misbehavior of this sort as well. I poked at this by adding some debug printouts, and determined that what is going wrong is the test to see if we built the module: # can't test it if we haven't built it next unless scalar glob("$testdir/*.o $testdir/*.obj"); It's failing, sometimes, on modules that definitely do contain object files. We've had run-ins with "scalar glob()" before [3], and when I finally looked at "man perlfunc" what I read is glob EXPR glob In list context, returns a (possibly empty) list of filename expansions on the value of EXPR such as the standard Unix shell /bin/csh would do. In scalar context, glob iterates through su= ch filename expansions, returning undef when the list is exhausted= . I'm not entirely sure what "iterates" means in this context, but what seems to be happening on my Linux box is that you get undef unless there is exactly one file matching the glob pattern. I can't explain why we're not seeing more consistent behavior out of the buildfarm, like never running postgres_fdw at all. I wonder if the glob() infrastructure has some buggy internal state. But the attached patch gives me better results. regards, tom lane [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dindri&dt=3D2= 026-04-07%2013%3A42%3A46 [2] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dindri&dt=3D2= 026-04-07%2014%3A17%3A01 [3] https://www.postgresql.org/message-id/200085.1741127335%40sss.pgh.pa.u= s ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="misctests.patch"; charset="us-ascii" Content-ID: <2824043.1775603217.2@sss.pgh.pa.us> Content-Description: misctests.patch --- run_build.pl.orig 2025-11-25 07:47:25.000000000 -0500 +++ run_build.pl 2026-04-07 18:34:30.112991218 -0400 @@ -2511,7 +2511,8 @@ sub run_misc_tests my $testname = basename($testdir); # can't test it if we haven't built it - next unless scalar glob("$testdir/*.o $testdir/*.obj"); + my @objfiles = glob("$testdir/*.o $testdir/*.obj"); + next unless scalar @objfiles; # skip sepgsql unless it's marked for testing next ------- =_aaaaaaaaaa0--