aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/pg_checksums/t/002_actions.pl1
-rw-r--r--src/bin/pg_verifybackup/t/003_corruption.pl4
-rw-r--r--src/bin/pgbench/t/001_pgbench_with_server.pl4
-rw-r--r--src/test/perl/PostgresNode.pm4
-rw-r--r--src/test/perl/TestLib.pm35
-rw-r--r--src/test/recovery/t/014_unlogged_reinit.pl4
-rw-r--r--src/test/recovery/t/017_shm.pl2
-rw-r--r--src/test/recovery/t/018_wal_optimize.pl2
-rw-r--r--src/test/recovery/t/025_stuck_on_old_timeline.pl2
9 files changed, 8 insertions, 50 deletions
diff --git a/src/bin/pg_checksums/t/002_actions.pl b/src/bin/pg_checksums/t/002_actions.pl
index 4e4934532a3..b7a64de64c7 100644
--- a/src/bin/pg_checksums/t/002_actions.pl
+++ b/src/bin/pg_checksums/t/002_actions.pl
@@ -185,7 +185,6 @@ check_relation_corruption($node, 'corrupt1', 'pg_default');
my $basedir = $node->basedir;
my $tablespace_dir = "$basedir/ts_corrupt_dir";
mkdir($tablespace_dir);
-$tablespace_dir = TestLib::perl2host($tablespace_dir);
$node->safe_psql('postgres',
"CREATE TABLESPACE ts_corrupt LOCATION '$tablespace_dir';");
check_relation_corruption($node, 'corrupt2', 'ts_corrupt');
diff --git a/src/bin/pg_verifybackup/t/003_corruption.pl b/src/bin/pg_verifybackup/t/003_corruption.pl
index c2e04d0be20..40b2e3f5bb9 100644
--- a/src/bin/pg_verifybackup/t/003_corruption.pl
+++ b/src/bin/pg_verifybackup/t/003_corruption.pl
@@ -15,7 +15,7 @@ $master->start;
# Include a user-defined tablespace in the hopes of detecting problems in that
# area.
-my $source_ts_path = TestLib::perl2host(TestLib::tempdir_short());
+my $source_ts_path = TestLib::tempdir_short();
my $source_ts_prefix = $source_ts_path;
$source_ts_prefix =~ s!(^[A-Z]:/[^/]*)/.*!$1!;
@@ -104,7 +104,7 @@ for my $scenario (@scenario)
# Take a backup and check that it verifies OK.
my $backup_path = $master->backup_dir . '/' . $name;
- my $backup_ts_path = TestLib::perl2host(TestLib::tempdir_short());
+ my $backup_ts_path = TestLib::tempdir_short();
# The tablespace map parameter confuses Msys2, which tries to mangle
# it. Tell it not to.
# See https://www.msys2.org/wiki/Porting/#filesystem-namespaces
diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl
index 248da5b1e7a..f3f2fbc7a31 100644
--- a/src/bin/pgbench/t/001_pgbench_with_server.pl
+++ b/src/bin/pgbench/t/001_pgbench_with_server.pl
@@ -63,12 +63,10 @@ sub pgbench
# for partitioned tables.
my $ts = $node->basedir . '/regress_pgbench_tap_1_ts_dir';
mkdir $ts or die "cannot create directory $ts";
-# this takes care of WIN-specific path issues
-my $ets = TestLib::perl2host($ts);
# the next commands will issue a syntax error if the path contains a "'"
$node->safe_psql('postgres',
- "CREATE TABLESPACE regress_pgbench_tap_1_ts LOCATION '$ets';");
+ "CREATE TABLESPACE regress_pgbench_tap_1_ts LOCATION '$ts';");
# Test concurrent OID generation via pg_enum_oid_index. This indirectly
# exercises LWLock and spinlock concurrency.
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index b85068e0da1..d130d6fc817 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -975,7 +975,7 @@ primary_conninfo='$root_connstr'
sub enable_restoring
{
my ($self, $root_node, $standby) = @_;
- my $path = TestLib::perl2host($root_node->archive_dir);
+ my $path = $root_node->archive_dir;
my $name = $self->name;
print "### Enabling WAL restore for node \"$name\"\n";
@@ -1043,7 +1043,7 @@ sub set_standby_mode
sub enable_archiving
{
my ($self) = @_;
- my $path = TestLib::perl2host($self->archive_dir);
+ my $path = $self->archive_dir;
my $name = $self->name;
print "### Enabling WAL archiving for node \"$name\"\n";
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index f409a30acaf..2a9c8c6df6f 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -22,7 +22,6 @@ TestLib - helper module for writing PostgreSQL's C<prove> tests.
# Miscellanea
print "on Windows" if $TestLib::windows_os;
- my $path = TestLib::perl2host($backup_dir);
ok(check_mode_recursive($stream_dir, 0700, 0600),
"check stream dir permissions");
TestLib::system_log('pg_ctl', 'kill', 'QUIT', $slow_pid);
@@ -281,40 +280,6 @@ sub tempdir_short
=pod
-=item perl2host()
-
-Translate a Perl file name to a host file name. Currently, this is a no-op
-except for the case of Perl=msys and host=mingw32. The subject need not
-exist, but its parent directory must exist.
-
-=cut
-
-sub perl2host
-{
- my ($subject) = @_;
- return $subject unless $Config{osname} eq 'msys';
- my $here = cwd;
- my $leaf;
- if (chdir $subject)
- {
- $leaf = '';
- }
- else
- {
- $leaf = '/' . basename $subject;
- my $parent = dirname $subject;
- chdir $parent or die "could not chdir \"$parent\": $!";
- }
-
- # this odd way of calling 'pwd -W' is the only way that seems to work.
- my $dir = qx{sh -c "pwd -W"};
- chomp $dir;
- chdir $here;
- return $dir . $leaf;
-}
-
-=pod
-
=item has_wal_read_bug()
Returns true if $tmp_check is subject to a sparc64+ext4 bug that causes WAL
diff --git a/src/test/recovery/t/014_unlogged_reinit.pl b/src/test/recovery/t/014_unlogged_reinit.pl
index ee05e1a1ee1..b7ebe700c23 100644
--- a/src/test/recovery/t/014_unlogged_reinit.pl
+++ b/src/test/recovery/t/014_unlogged_reinit.pl
@@ -30,9 +30,7 @@ ok(-f "$pgdata/$baseUnloggedPath", 'main fork in base exists');
my $tablespaceDir = TestLib::tempdir;
-my $realTSDir = TestLib::perl2host($tablespaceDir);
-
-$node->safe_psql('postgres', "CREATE TABLESPACE ts1 LOCATION '$realTSDir'");
+$node->safe_psql('postgres', "CREATE TABLESPACE ts1 LOCATION '$tablespaceDir'");
$node->safe_psql('postgres',
'CREATE UNLOGGED TABLE ts1_unlogged (id int) TABLESPACE ts1');
diff --git a/src/test/recovery/t/017_shm.pl b/src/test/recovery/t/017_shm.pl
index ba6410a7aa3..8073b60c08a 100644
--- a/src/test/recovery/t/017_shm.pl
+++ b/src/test/recovery/t/017_shm.pl
@@ -113,7 +113,7 @@ log_ipcs();
$gnat->start;
log_ipcs();
-my $regress_shlib = TestLib::perl2host($ENV{REGRESS_SHLIB});
+my $regress_shlib = $ENV{REGRESS_SHLIB};
$gnat->safe_psql('postgres', <<EOSQL);
CREATE FUNCTION wait_pid(int)
RETURNS void
diff --git a/src/test/recovery/t/018_wal_optimize.pl b/src/test/recovery/t/018_wal_optimize.pl
index b49c32230f0..88bcd90a826 100644
--- a/src/test/recovery/t/018_wal_optimize.pl
+++ b/src/test/recovery/t/018_wal_optimize.pl
@@ -57,7 +57,6 @@ wal_skip_threshold = 0
# Setup
my $tablespace_dir = $node->basedir . '/tablespace_other';
mkdir($tablespace_dir);
- $tablespace_dir = TestLib::perl2host($tablespace_dir);
my $result;
# Test redo of CREATE TABLESPACE.
@@ -149,7 +148,6 @@ wal_skip_threshold = 0
$copy_file, qq(20000,30000
20001,30001
20002,30002));
- $copy_file = TestLib::perl2host($copy_file);
# Test truncation with inserted tuples using both INSERT and COPY. Tuples
# inserted after the truncation should be seen.
diff --git a/src/test/recovery/t/025_stuck_on_old_timeline.pl b/src/test/recovery/t/025_stuck_on_old_timeline.pl
index dbaab8e6e6d..5efcb7e02c5 100644
--- a/src/test/recovery/t/025_stuck_on_old_timeline.pl
+++ b/src/test/recovery/t/025_stuck_on_old_timeline.pl
@@ -28,7 +28,7 @@ $node_primary->init(allows_streaming => 1, has_archiving => 1);
# Note: consistent use of forward slashes here avoids any escaping problems
# that arise from use of backslashes. That means we need to double-quote all
# the paths in the archive_command
-my $perlbin = TestLib::perl2host($^X);
+my $perlbin = $^X;
$perlbin =~ s!\\!/!g if $TestLib::windows_os;
my $archivedir_primary = $node_primary->archive_dir;
$archivedir_primary =~ s!\\!/!g if $TestLib::windows_os;