Fix portability issue with gzip in TAP test of pg_receivewal
authorMichael Paquier <michael@paquier.xyz>
Thu, 15 Jul 2021 12:25:03 +0000 (21:25 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 15 Jul 2021 12:25:03 +0000 (21:25 +0900)
commit0da3c1bc3f7261d5157f5b86ade88e8b379f8686
tree3160a1039c9ace80078cbb57794953f3f1b87b3f
parent768ea9bcf98120eef01a6deea9c5c6997b153ab1
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
src/bin/pg_basebackup/t/020_pg_receivewal.pl