Re: pg_basebackup test coverage

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Noah Misch <noah(at)leadboat(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_basebackup test coverage
Date: 2020-12-11 17:23:10
Message-ID: CA+TgmoZKx9M4VN3+=Xpu2JUOCdzNM-uTCkynxd8b6uky4Ju8aw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 11, 2020 at 3:04 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> Why don't you just use Archive::Tar [1] instead of looking for some system
> commands? Combining list_files() with extract(), it is possible to
> extract an archive, with or without compression, without hoping for an
> equivalent to exist on Windows. That would not be the first time
> either that there is a TAP test that skips some tests if a module does
> not exist. See for example what psql does with IO::Pty.

Well, either this or Noah's method has the disadvantage that not
everyone will get the benefit of the tests, and that those who wish to
get that benefit must install more stuff. But, all three of the
computers I have within arm's reach (yeah, I might have a problem)
have Archive::Tar installed, so maybe it's not a big concern in
practice. I am slightly inclined to think that the perl package
approach might be better than shell commands because perhaps it is
more likely to work on Windows, but I'm not positive.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2020-12-11 17:30:57 Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit
Previous Message Tom Lane 2020-12-11 17:22:55 Re: Clean up ancient test style