On 15/03/2024 14:10, Heikki Linnakangas wrote:
On 15/03/2024 13:09, Heikki Linnakangas wrote:
I committed a patch to do that, to put out the fire.

That's turning the buildfarm quite red. Many, but not all animals are
failing like this:

--- 
/home/buildfarm/hippopotamus/buildroot/HEAD/pgsql.build/src/test/modules/injection_points/expected/injection_points.out
     2024-03-15 12:41:16.363286975 +0100
+++ 
/home/buildfarm/hippopotamus/buildroot/HEAD/pgsql.build/src/test/modules/injection_points/results/injection_points.out
      2024-03-15 12:53:11.528159615 +0100
@@ -1,118 +1,111 @@
  CREATE EXTENSION injection_points;
+ERROR:  extension "injection_points" is not available
+DETAIL:  Could not open extension control file 
"/home/buildfarm/hippopotamus/buildroot/HEAD/pgsql.build/tmp_install/home/buildfarm/hippopotamus/buildroot/HEAD/inst/share/postgresql/extension/injection_points.control":
 No such file or directory.
+HINT:  The extension must first be installed on the system where PostgreSQL is 
running.
...

Looks like adding NO_INSTALLCHECK somehow affected how the modules are
installed in tmp_install. I'll investigate..

I think this is a bug in the buildfarm client. In the make_misc_check step, it does this (reduced to just the interesting parts):

# run the modules that can't be run with installcheck
sub make_misc_check
{
        ...
        my @dirs = glob("$pgsql/src/test/modules/* $pgsql/contrib/*");
        foreach my $dir (@dirs)
        {
                next unless -e "$dir/Makefile";
                my $makefile = file_contents("$dir/Makefile");
                next unless $makefile =~ /^NO_INSTALLCHECK/m;
                my $test = basename($dir);

                # skip redundant TAP tests which are called elsewhere
                my @out = run_log("cd $dir && $make $instflags TAP_TESTS= 
check");
                ...
        }

So it scans src/test/modules, and runs "make check" for all subdirectories that have NO_INSTALLCHECK in the makefile. But the injection fault tests are also conditional on the enable_injection_points in the parent Makefile:

ifeq ($(enable_injection_points),yes)
SUBDIRS += injection_points gin
else
ALWAYS_SUBDIRS += injection_points gin
endif

The buildfarm client doesn't pay any attention to that, and runs the test anyway.

I committed an ugly hack to the subdirectory Makefiles, to turn "make check" into a no-op if injection points are disabled. Normally when you run "make check" at the parent level, it doesn't even recurse to the directories, but this works around the buildfarm script. I hope...

--
Heikki Linnakangas
Neon (https://neon.tech)



Reply via email to