Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc27aa21

Browse files
committed
Remove PostgreSQL::Test::Utils::perl2host completely
Commitf1ac4a7 disabled this processing, and as nothing has broken (asexpected) here we proceed to remove the routine and adjust all the callsites.Backpatch to release 10Discussion:https://postgr.es/m/0ba775a2-8aa0-0d56-d780-69427cf6f33d@dunslane.netDiscussion:https://postgr.es/m/20220125023609.5ohu3nslxgoygihl@alap3.anarazel.de
1 parent46b738f commitc27aa21

File tree

9 files changed

+8
-50
lines changed

9 files changed

+8
-50
lines changed

‎src/bin/pg_checksums/t/002_actions.pl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ sub check_relation_corruption
185185
my$basedir =$node->basedir;
186186
my$tablespace_dir ="$basedir/ts_corrupt_dir";
187187
mkdir($tablespace_dir);
188-
$tablespace_dir = TestLib::perl2host($tablespace_dir);
189188
$node->safe_psql('postgres',
190189
"CREATE TABLESPACE ts_corrupt LOCATION '$tablespace_dir';");
191190
check_relation_corruption($node,'corrupt2','ts_corrupt');

‎src/bin/pg_verifybackup/t/003_corruption.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# Include a user-defined tablespace in the hopes of detecting problems in that
1717
# area.
18-
my$source_ts_path = TestLib::perl2host(TestLib::tempdir_short());
18+
my$source_ts_path = TestLib::tempdir_short();
1919
my$source_ts_prefix =$source_ts_path;
2020
$source_ts_prefix =~s!(^[A-Z]:/[^/]*)/.*!$1!;
2121

@@ -104,7 +104,7 @@
104104

105105
# Take a backup and check that it verifies OK.
106106
my$backup_path =$master->backup_dir .'/' .$name;
107-
my$backup_ts_path = TestLib::perl2host(TestLib::tempdir_short());
107+
my$backup_ts_path = TestLib::tempdir_short();
108108
# The tablespace map parameter confuses Msys2, which tries to mangle
109109
# it. Tell it not to.
110110
# See https://www.msys2.org/wiki/Porting/#filesystem-namespaces

‎src/bin/pgbench/t/001_pgbench_with_server.pl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,10 @@ sub pgbench
6363
# for partitioned tables.
6464
my$ts =$node->basedir .'/regress_pgbench_tap_1_ts_dir';
6565
mkdir$tsordie"cannot create directory$ts";
66-
# this takes care of WIN-specific path issues
67-
my$ets = TestLib::perl2host($ts);
6866

6967
# the next commands will issue a syntax error if the path contains a "'"
7068
$node->safe_psql('postgres',
71-
"CREATE TABLESPACE regress_pgbench_tap_1_ts LOCATION '$ets';");
69+
"CREATE TABLESPACE regress_pgbench_tap_1_ts LOCATION '$ts';");
7270

7371
# Test concurrent OID generation via pg_enum_oid_index. This indirectly
7472
# exercises LWLock and spinlock concurrency.

‎src/test/perl/PostgresNode.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ primary_conninfo='$root_connstr'
975975
subenable_restoring
976976
{
977977
my ($self,$root_node,$standby) =@_;
978-
my$path =TestLib::perl2host($root_node->archive_dir);
978+
my$path =$root_node->archive_dir;
979979
my$name =$self->name;
980980

981981
print"### Enabling WAL restore for node\"$name\"\n";
@@ -1043,7 +1043,7 @@ sub set_standby_mode
10431043
subenable_archiving
10441044
{
10451045
my ($self) =@_;
1046-
my$path =TestLib::perl2host($self->archive_dir);
1046+
my$path =$self->archive_dir;
10471047
my$name =$self->name;
10481048

10491049
print"### Enabling WAL archiving for node\"$name\"\n";

‎src/test/perl/TestLib.pm

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ TestLib - helper module for writing PostgreSQL's C<prove> tests.
2222
2323
# Miscellanea
2424
print "on Windows" if $TestLib::windows_os;
25-
my $path = TestLib::perl2host($backup_dir);
2625
ok(check_mode_recursive($stream_dir, 0700, 0600),
2726
"check stream dir permissions");
2827
TestLib::system_log('pg_ctl', 'kill', 'QUIT', $slow_pid);
@@ -281,40 +280,6 @@ sub tempdir_short
281280

282281
=pod
283282
284-
=itemperl2host()
285-
286-
Translate a Perl file name to a host file name. Currently, this is a no-op
287-
except for the case of Perl=msys and host=mingw32. The subject need not
288-
exist, but its parent directory must exist.
289-
290-
=cut
291-
292-
subperl2host
293-
{
294-
my ($subject) =@_;
295-
return$subjectunless$Config{osname}eq'msys';
296-
my$here = cwd;
297-
my$leaf;
298-
if (chdir$subject)
299-
{
300-
$leaf ='';
301-
}
302-
else
303-
{
304-
$leaf ='/' . basename$subject;
305-
my$parent = dirname$subject;
306-
chdir$parentordie"could not chdir\"$parent\":$!";
307-
}
308-
309-
# this odd way of calling 'pwd -W' is the only way that seems to work.
310-
my$dir =qx{sh -c "pwd -W"};
311-
chomp$dir;
312-
chdir$here;
313-
return$dir .$leaf;
314-
}
315-
316-
=pod
317-
318283
=itemhas_wal_read_bug()
319284
320285
Returns true if $tmp_check is subject to a sparc64+ext4 bug that causes WAL

‎src/test/recovery/t/014_unlogged_reinit.pl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030

3131
my$tablespaceDir = TestLib::tempdir;
3232

33-
my$realTSDir = TestLib::perl2host($tablespaceDir);
34-
35-
$node->safe_psql('postgres',"CREATE TABLESPACE ts1 LOCATION '$realTSDir'");
33+
$node->safe_psql('postgres',"CREATE TABLESPACE ts1 LOCATION '$tablespaceDir'");
3634
$node->safe_psql('postgres',
3735
'CREATE UNLOGGED TABLE ts1_unlogged (id int) TABLESPACE ts1');
3836

‎src/test/recovery/t/017_shm.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ sub log_ipcs
113113
$gnat->start;
114114
log_ipcs();
115115

116-
my$regress_shlib =TestLib::perl2host($ENV{REGRESS_SHLIB});
116+
my$regress_shlib =$ENV{REGRESS_SHLIB};
117117
$gnat->safe_psql('postgres',<<EOSQL);
118118
CREATE FUNCTION wait_pid(int)
119119
RETURNS void

‎src/test/recovery/t/018_wal_optimize.pl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ sub run_wal_optimize
5757
# Setup
5858
my$tablespace_dir =$node->basedir .'/tablespace_other';
5959
mkdir($tablespace_dir);
60-
$tablespace_dir = TestLib::perl2host($tablespace_dir);
6160
my$result;
6261

6362
# Test redo of CREATE TABLESPACE.
@@ -149,7 +148,6 @@ sub run_wal_optimize
149148
$copy_file,qq(20000,30000
150149
20001,30001
151150
20002,30002));
152-
$copy_file = TestLib::perl2host($copy_file);
153151

154152
# Test truncation with inserted tuples using both INSERT and COPY. Tuples
155153
# inserted after the truncation should be seen.

‎src/test/recovery/t/025_stuck_on_old_timeline.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# Note: consistent use of forward slashes here avoids any escaping problems
2929
# that arise from use of backslashes. That means we need to double-quote all
3030
# the paths in the archive_command
31-
my$perlbin =TestLib::perl2host($^X);
31+
my$perlbin = $^X;
3232
$perlbin =~s!\\!/!gif$TestLib::windows_os;
3333
my$archivedir_primary =$node_primary->archive_dir;
3434
$archivedir_primary =~s!\\!/!gif$TestLib::windows_os;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp