On my system running Debian stretch (= testing):

~/git-sandbox-pgsql/96stable/src/bin/pg_rewind (REL9_6_STABLE)$ make check
rm -rf '/home/heikki/git-sandbox-pgsql/96stable'/tmp_install
/bin/mkdir -p '/home/heikki/git-sandbox-pgsql/96stable'/tmp_install/log
make -C '../../..' DESTDIR='/home/heikki/git-sandbox-pgsql/96stable'/tmp_install install >'/home/heikki/git-sandbox-pgsql/96stable'/tmp_install/log/install.log 2>&1 rm -rf /home/heikki/git-sandbox-pgsql/96stable/src/bin/pg_rewind/tmp_check/log cd . && TESTDIR='/home/heikki/git-sandbox-pgsql/96stable/src/bin/pg_rewind' PATH="/home/heikki/git-sandbox-pgsql/96stable/tmp_install/home/heikki/pgsql.96stable/bin:$PATH" LD_LIBRARY_PATH="/home/heikki/git-sandbox-pgsql/96stable/tmp_install/home/heikki/pgsql.96stable/lib" PGPORT='65432' PG_REGRESS='/home/heikki/git-sandbox-pgsql/96stable/src/bin/pg_rewind/../../../src/test/regress/pg_regress' prove -I ../../../src/test/perl/ --verbose t/*.pl
t/001_basic.pl ............
Can't locate RewindTest.pm in @INC (you may need to install the RewindTest module) (@INC contains: /home/heikki/git-sandbox-pgsql/96stable/src/bin/pg_rewind/../../../src/test/perl /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at t/001_basic.pl line 6.
BEGIN failed--compilation aborted at t/001_basic.pl line 6.

That's not nice. Perl's @INC usually contains the current directory, and those test suites rely on that, but that changed recently on Debian stretch, and other distributions are likely to follow. There's more information on this at https://www.debian.org/security/2016/dsa-3628.

I think we should fix this by the attached. Any better ideas?

I'm a bit surprised no-one else has reported this yet. Have I missed a report?

- Heikki
>From d6f4eea7ee41a1d2ab0335bd126bf2cca7017cdd Mon Sep 17 00:00:00 2001
From: Heikki Linnakangas <heikki.linnakan...@iki.fi>
Date: Fri, 7 Oct 2016 14:40:43 +0300
Subject: [PATCH 1/1] Make TAP test suites to work, when @INC does not contain
 current dir.

Perl and/or new Linux distributions are starting to remove "." from
the @INC list by default. That breaks the pg_rewind and ssl test suites,
which use helper perl modules that reside in the same directory. To fix,
add the correct directory explicitly to prove's include dir.
 src/bin/pg_rewind/Makefile | 2 ++
 src/test/ssl/Makefile      | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/bin/pg_rewind/Makefile b/src/bin/pg_rewind/Makefile
index d03a0a2..af4a800 100644
--- a/src/bin/pg_rewind/Makefile
+++ b/src/bin/pg_rewind/Makefile
@@ -18,6 +18,8 @@ include $(top_builddir)/src/Makefile.global
 PG_CPPFLAGS = -I$(libpq_srcdir)
 PG_LIBS = $(libpq_pgport)
+PG_PROVE_FLAGS += -I$(top_srcdir)/$(subdir)
 override CPPFLAGS := -I$(libpq_srcdir) -DFRONTEND $(CPPFLAGS)
 OBJS	= pg_rewind.o parsexlog.o xlogreader.o datapagemap.o timeline.o \
diff --git a/src/test/ssl/Makefile b/src/test/ssl/Makefile
index 2b04d82..c65791c 100644
--- a/src/test/ssl/Makefile
+++ b/src/test/ssl/Makefile
@@ -13,6 +13,8 @@ subdir = src/test/ssl
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
+PG_PROVE_FLAGS += -I$(top_srcdir)/$(subdir)
 CERTIFICATES := server_ca server-cn-and-alt-names \
 	server-cn-only server-single-alt-name server-multiple-alt-names \
 	server-no-names server-revoked server-ss \

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to