Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0da3c1b

Browse files
committed
Fix portability issue with gzip in TAP test of pg_receivewal
The OpenBSD implementation of gzip considers only files suffixed by "Z", "gz", "z", "tgz" or "taz" as valid targets, discarding anything else and making a command using --test exit with an error code of 512 if anything invalid is found. The test introduced in ffc9dda tested a WAL segment suffixed as .gz.partial, enough to make the test fail. Testing only a full segment is fine enough in terms of coverage, so simplify the code by discarding the .gz.partial segment in this check. This should be enough to make the test pass with OpenBSD environments. Per report from curculio. Discussion: https://postgr.es/m/YPAdf9r5aJbDoHoq@paquier.xyz
1 parent 768ea9b commit 0da3c1b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/bin/pg_basebackup/t/020_pg_receivewal.pl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,14 @@
112112
# Update the list of partial wals with the current one.
113113
@partial_wals = @zlib_partial_wals;
114114

115-
# There is one complete and one partial file compressed with ZLIB.
116-
# Check the integrity of both, if gzip is a command available.
115+
# Check the integrity of the completed segment, if gzip is a command
116+
# available.
117117
my $gzip = $ENV{GZIP_PROGRAM};
118118
skip "program gzip is not found in your system", 1
119119
if ( !defined $gzip
120120
|| $gzip eq ''
121121
|| system_log($gzip, '--version') != 0);
122122

123-
push(@zlib_wals, @zlib_partial_wals);
124123
my $gzip_is_valid = system_log($gzip, '--test', @zlib_wals);
125124
is($gzip_is_valid, 0,
126125
"gzip verified the integrity of compressed WAL segments");

0 commit comments

Comments
 (0)