On 04/22/2017 04:43 PM, Andrew Dunstan wrote: > After we got over the Test::More version issue, the recovery tests > proceeded to fail fairly spectacularly in a test run on jacana. > > > Test 6 fails because there is a CR in the returned stdout from psql. I'm > inclined to adjust that in PostgresNode::safe_psql so we don't have to > do it all over the place. > > It looks like at least some tests are failing because of confusion > between Windows paths and the MSys virtualized paths. For example, I see > this: > > 2017-04-22 10:01:14.436 EDT [2276] LOG: archive command failed with > exit code 1 > 2017-04-22 10:01:14.436 EDT [2276] DETAIL: The failed archive > command was: copy "pg_wal\000000010000000000000001" > > "/home/pgrunner/bf/root/HEAD/pgsql.build/src/test/recovery/tmp_check/data_master_TCeC/archives\000000010000000000000001" > The system cannot find the path specified. > 0 file(s) copied. > > Paths that go in recovery.conf or archive commands must of course be > pure Windows paths.In this case the path would have been correct if > prefixed with "c:/Mingw/Msys/1.0" > > I'll try to come up with a fix for that. > >
All the issue should be fixed by the attached patch. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index e42eb88..51cbec8 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -101,6 +101,15 @@ our @EXPORT = qw( our ($test_localhost, $test_pghost, $last_port_assigned, @all_nodes); +# Windows path to virtual file system root + +our $vfs_path = ''; +if ($Config{osname} eq 'msys') +{ + $vfs_path = `cd / && pwd -W`; + chomp $vfs_path; +} + INIT { @@ -763,7 +772,7 @@ standby_mode=on sub enable_restoring { my ($self, $root_node) = @_; - my $path = $root_node->archive_dir; + my $path = $vfs_path . $root_node->archive_dir; my $name = $self->name; print "### Enabling WAL restore for node \"$name\"\n"; @@ -791,7 +800,7 @@ standby_mode = on sub enable_archiving { my ($self) = @_; - my $path = $self->archive_dir; + my $path = $vfs_path . $self->archive_dir; my $name = $self->name; print "### Enabling WAL archiving for node \"$name\"\n"; @@ -979,6 +988,7 @@ sub safe_psql print "\n#### End standard error\n"; } + $stdout =~ s/\r//g if $TestLib::windows_os; return $stdout; } @@ -1579,6 +1589,9 @@ sub pg_recvlogical_upto } }; + $stdout =~ s/\r//g if $TestLib::windows_os; + $stderr =~ s/\r//g if $TestLib::windows_os; + if (wantarray) { return ($ret, $stdout, $stderr, $timeout);
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers