Re: [HACKERS] [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches.

2015-11-17 Thread Michael Paquier
On Wed, Nov 18, 2015 at 4:15 AM, Tom Lane wrote:
> I'm not in a position to double-check that these patches work on Windows,
> but I reviewed them through the expedient of diff'ing the patched files
> against HEAD.

I'll double-check things a bit and post replies on this thread should
I detect a problem.

> The only problem I found was you'd left out the
> documentation addition about needing IPC::Run in install-windows.sgml.
> So I've pushed them with that fix.

Thanks, I clearly forgot this documentation bit.
-- 
Michael


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


Re: [HACKERS] [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches.

2015-11-17 Thread Andrew Dunstan



On 11/17/2015 02:15 PM, Tom Lane wrote:

Michael Paquier  writes:

On Tue, Oct 13, 2015 at 10:17 PM, Andrew Dunstan wrote:

In general I think we can be a good deal more liberal about backpatching the
testing regime than we are with production code, where we are always
cautious, and the caution has paid big dividends in our reputation for
stability.

Attached are patches for 9.4 and 9.5 syncing up everything with
master. I tested both of them on OSX, Linux and Windows (MSVC only
though using vcregress tapcheck).

I'm not in a position to double-check that these patches work on Windows,
but I reviewed them through the expedient of diff'ing the patched files
against HEAD.  The only problem I found was you'd left out the
documentation addition about needing IPC::Run in install-windows.sgml.
So I've pushed them with that fix.

Where do we now stand on invoking the TAP tests in the buildfarm?





This has fallen off my pile a bit :-( I will try to take a good look 
over the next 48 hours.


cheers

andrew



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


Re: [HACKERS] [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches.

2015-11-17 Thread Tom Lane
Michael Paquier  writes:
> On Tue, Oct 13, 2015 at 10:17 PM, Andrew Dunstan wrote:
>> In general I think we can be a good deal more liberal about backpatching the
>> testing regime than we are with production code, where we are always
>> cautious, and the caution has paid big dividends in our reputation for
>> stability.

> Attached are patches for 9.4 and 9.5 syncing up everything with
> master. I tested both of them on OSX, Linux and Windows (MSVC only
> though using vcregress tapcheck).

I'm not in a position to double-check that these patches work on Windows,
but I reviewed them through the expedient of diff'ing the patched files
against HEAD.  The only problem I found was you'd left out the
documentation addition about needing IPC::Run in install-windows.sgml.
So I've pushed them with that fix.

Where do we now stand on invoking the TAP tests in the buildfarm?

regards, tom lane


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


Re: [HACKERS] [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches.

2015-10-14 Thread Michael Paquier
On Tue, Oct 13, 2015 at 10:17 PM, Andrew Dunstan wrote:
> In general I think we can be a good deal more liberal about backpatching the
> testing regime than we are with production code, where we are always
> cautious, and the caution has paid big dividends in our reputation for
> stability.

Attached are patches for 9.4 and 9.5 syncing up everything with
master. I tested both of them on OSX, Linux and Windows (MSVC only
though using vcregress tapcheck).
-- 
Michael
diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml
index 9b77648..d3d8f5f 100644
--- a/doc/src/sgml/install-windows.sgml
+++ b/doc/src/sgml/install-windows.sgml
@@ -438,6 +438,7 @@ $ENV{CONFIG}="Debug";
 vcregress contribcheck
 vcregress ecpgcheck
 vcregress isolationcheck
+vcregress tapcheck
 vcregress upgradecheck
 
 
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index e92d3c6..333cb17 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -334,14 +334,14 @@ ifeq ($(enable_tap_tests),yes)
 
 define prove_installcheck
 rm -rf $(CURDIR)/tmp_check/log
-cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' top_builddir='$(CURDIR)/$(top_builddir)' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
+cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' top_builddir='$(CURDIR)/$(top_builddir)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
 endef
 
 define prove_check
 rm -rf $(CURDIR)/tmp_check/log
 $(MKDIR_P) tmp_check/log
 $(MAKE) -C $(top_builddir) DESTDIR='$(CURDIR)'/tmp_check/install install >'$(CURDIR)'/tmp_check/log/install.log 2>&1
-cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(CURDIR)/tmp_check/install$(bindir):$$PATH" $(call add_to_path,$(ld_library_path_var),$(CURDIR)/tmp_check/install$(libdir)) top_builddir='$(CURDIR)/$(top_builddir)' PGPORT='6$(DEF_PGPORT)' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
+cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(CURDIR)/tmp_check/install$(bindir):$$PATH" $(call add_to_path,$(ld_library_path_var),$(CURDIR)/tmp_check/install$(libdir)) top_builddir='$(CURDIR)/$(top_builddir)' PGPORT='6$(DEF_PGPORT)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
 endef
 
 else
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
index 538ca0a..b40f89a 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -25,11 +25,7 @@ if (open BADCHARS, ">>$tempdir/pgdata/FOO\xe0\xe0\xe0BAR")
 	close BADCHARS;
 }
 
-open HBA, ">>$tempdir/pgdata/pg_hba.conf";
-print HBA "local replication all trust\n";
-print HBA "host replication all 127.0.0.1/32 trust\n";
-print HBA "host replication all ::1/128 trust\n";
-close HBA;
+configure_hba_for_replication "$tempdir/pgdata";
 system_or_bail 'pg_ctl', '-D', "$tempdir/pgdata", 'reload';
 
 command_fails(
@@ -57,54 +53,60 @@ command_ok([ 'pg_basebackup', '-D', "$tempdir/tarbackup", '-Ft' ],
 	'tar format');
 ok(-f "$tempdir/tarbackup/base.tar", 'backup tar was created');
 
-# Create a temporary directory in the system location and symlink it
-# to our physical temp location.  That way we can use shorter names
-# for the tablespace directories, which hopefully won't run afoul of
-# the 99 character length limit.
-my $shorter_tempdir = tempdir_short . "/tempdir";
-symlink "$tempdir", $shorter_tempdir;
-
-mkdir "$tempdir/tblspc1";
-psql 'postgres', "CREATE TABLESPACE tblspc1 LOCATION '$shorter_tempdir/tblspc1';";
-psql 'postgres', "CREATE TABLE test1 (a int) TABLESPACE tblspc1;";
-command_ok([ 'pg_basebackup', '-D', "$tempdir/tarbackup2", '-Ft' ],
-	'tar format with tablespaces');
-ok(-f "$tempdir/tarbackup2/base.tar", 'backup tar was created');
-my @tblspc_tars = glob "$tempdir/tarbackup2/[0-9]*.tar";
-is(scalar(@tblspc_tars), 1, 'one tablespace tar was created');
-
-command_fails(
-	[ 'pg_basebackup', '-D', "$tempdir/backup1", '-Fp' ],
-	'plain format with tablespaces fails without tablespace mapping');
-
-command_ok(
-	[   'pg_basebackup','-D',
-		"$tempdir/backup1", '-Fp',
-		"-T$shorter_tempdir/tblspc1=$tempdir/tbackup/tblspc1" ],
-	'plain format with tablespaces succeeds with tablespace mapping');
-ok(-d "$tempdir/tbackup/tblspc1", 'tablespace was relocated');
-opendir(my $dh, "$tempdir/pgdata/pg_tblspc") or die;
-ok( (   grep
-		{
-			-l "$tempdir/backup1/pg_tblspc/$_"
-			  and readlink "$tempdir/backup1/pg_tblspc/$_" eq
-			  "$tempdir/tbackup/tblspc1"
-		  } readdir($dh)),
-	"tablespace symlink was updated");
-closedir $dh;
-
-mkdir "$tempdir/tbl=spc2";
-psql 'postgres', "DROP TABLE test1;";
-psql 'postgres', "DROP TABLESPACE tblspc1;";
-psql 'postgres', "CREATE TABLESPACE tblspc2 LOCATION '$shorter_tempdir/tbl=spc2';";
-command_ok(
-	[   'pg_basebackup','-D',
-		"$tempdir/backup3", '-Fp',
-		"-T$shorter_tempdir/tbl\\=spc2

Re: [HACKERS] [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches.

2015-10-12 Thread Michael Paquier
On Tue, Oct 13, 2015 at 11:31 AM, Tom Lane wrote:
> Hmm, well, why wasn't that back-patched?  We expect these tests to run
> on Windows don't we?

The message related to this particular commit is here:
http://www.postgresql.org/message-id/55b90161.5090...@iki.fi
I recall that we discussed about back-patching more such things to
improve the buildfarm coverage but I guess it fell from other's radar.
Would you consider pushing any sync-up patch for 9.5 and 9.4 I could
send? At quick glance, I think that's basically a combination of
adb4950, 13d856e1, 690ed2b and ff85fc8. Andrew, Noah, Heikki, and
others feel free to object of course if you think that's an utterly
bad idea.
-- 
Michael


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


Re: [HACKERS] [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches.

2015-10-12 Thread Tom Lane
Michael Paquier  writes:
> On Tue, Oct 13, 2015 at 8:35 AM, Tom Lane  wrote:
>> Cause TestLib.pm to define $windows_os in all branches.
>> 
>> Back-port of a part of commit 690ed2b76ab91eb79ea04ee2bfbdc8a2693f2a37 that
>> I'd depended on without realizing that it was only added recently.  Since
>> it seems entirely likely that other such tests will need to be back-patched
>> in future, providing the flag seems like a better answer than just putting
>> a test in-line.

> Is it really worth it back-patching the portions with $windows_os to
> back-branches? This indeed makes back-patch a bit easier but the tests
> cannot run on Windows because 13d856e1 has not been added in PG <=
> 9.5.

Hmm, well, why wasn't that back-patched?  We expect these tests to run
on Windows don't we?

regards, tom lane


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


Re: [HACKERS] [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches.

2015-10-12 Thread Michael Paquier
On Tue, Oct 13, 2015 at 8:35 AM, Tom Lane  wrote:
> Cause TestLib.pm to define $windows_os in all branches.
>
> Back-port of a part of commit 690ed2b76ab91eb79ea04ee2bfbdc8a2693f2a37 that
> I'd depended on without realizing that it was only added recently.  Since
> it seems entirely likely that other such tests will need to be back-patched
> in future, providing the flag seems like a better answer than just putting
> a test in-line.

Is it really worth it back-patching the portions with $windows_os to
back-branches? This indeed makes back-patch a bit easier but the tests
cannot run on Windows because 13d856e1 has not been added in PG <=
9.5.
-- 
Michael


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