Skip to content

Commit d90463b

Browse files
committed
Fix regression test parallel-make hazard.
Back-patch 9.4-era commit 384f933 into the previous branches. Although that was only advertised as repairing a problem with missed header-file dependencies, it turns out to also be important for parallel make safety. The previous coding allowed two independent make jobs to get launched concurrently in contrib/spi. Normally this would be OK, because they are building independent targets; but if --enable-depend is in use, it's unsafe, because one make run might try to read a .deps file that the other one is in process of rewriting. This is evidently the cause of buildfarm member francolin's recent failure in the 9.2 branch. I believe this patch will result in only one subsidiary make run, making it safe(r). Report: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=francolin&dt=2016-08-12%2017%3A12%3A52
1 parent 16cc6d2 commit d90463b

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/test/regress/GNUmakefile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,19 @@ autoinc$(DLSUFFIX): $(top_builddir)/contrib/spi/autoinc$(DLSUFFIX)
111111
dummy_seclabel$(DLSUFFIX): $(top_builddir)/contrib/dummy_seclabel/dummy_seclabel$(DLSUFFIX)
112112
cp $< $@
113113

114-
$(top_builddir)/contrib/spi/refint$(DLSUFFIX): $(top_srcdir)/contrib/spi/refint.c
115-
$(MAKE) -C $(top_builddir)/contrib/spi refint$(DLSUFFIX)
114+
$(top_builddir)/contrib/spi/refint$(DLSUFFIX): | submake-contrib-spi ;
116115

117-
$(top_builddir)/contrib/spi/autoinc$(DLSUFFIX): $(top_srcdir)/contrib/spi/autoinc.c
118-
$(MAKE) -C $(top_builddir)/contrib/spi autoinc$(DLSUFFIX)
116+
$(top_builddir)/contrib/spi/autoinc$(DLSUFFIX): | submake-contrib-spi ;
119117

120-
$(top_builddir)/contrib/dummy_seclabel/dummy_seclabel$(DLSUFFIX): $(top_builddir)/contrib/dummy_seclabel/dummy_seclabel.c
121-
$(MAKE) -C $(top_builddir)/contrib/dummy_seclabel dummy_seclabel$(DLSUFFIX)
118+
$(top_builddir)/contrib/dummy_seclabel/dummy_seclabel$(DLSUFFIX): | submake-contrib-dummy_seclabel ;
119+
120+
submake-contrib-spi:
121+
$(MAKE) -C $(top_builddir)/contrib/spi
122+
123+
submake-contrib-dummy_seclabel:
124+
$(MAKE) -C $(top_builddir)/contrib/dummy_seclabel
125+
126+
.PHONY: submake-contrib-spi submake-contrib-dummy_seclabel
122127

123128
# Tablespace setup
124129

0 commit comments

Comments
 (0)