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/
[email protected]
# Update the list of partial wals with the current one.
@partial_wals = @zlib_partial_wals;
- # There is one complete and one partial file compressed with ZLIB.
- # Check the integrity of both, if gzip is a command available.
+ # Check the integrity of the completed segment, if gzip is a command
+ # available.
my $gzip = $ENV{GZIP_PROGRAM};
skip "program gzip is not found in your system", 1
if ( !defined $gzip
|| $gzip eq ''
|| system_log($gzip, '--version') != 0);
- push(@zlib_wals, @zlib_partial_wals);
my $gzip_is_valid = system_log($gzip, '--test', @zlib_wals);
is($gzip_is_valid, 0,
"gzip verified the integrity of compressed WAL segments");