Re: Making src/test/ssl more robust

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Making src/test/ssl more robust
Date: 2015-04-09 07:06:17
Message-ID: CAB7nPqSvxo7EPsa_D-z=51+UV5BWJMnpKKdswe=zRAyqA-eQwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 8, 2015 at 9:57 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> I noticed two things while looking at the SSL test suite:
> 1) When running the tests, some logs are generated in client-log, but
> this log file has no entry in .gitignore... A patch is attached.
> 2) cp is used with a wildcard and system_or_bail in ServerSetup.pm:
> system_or_bail "cp ssl/server-*.crt '$tempdir'/pgdata";
> system_or_bail "cp ssl/server-*.key '$tempdir'/pgdata";
> system_or_bail "chmod 0600 '$tempdir'/pgdata/server-*.key";
> system_or_bail "cp ssl/root+client_ca.crt '$tempdir'/pgdata";
> system_or_bail "cp ssl/root+client.crl '$tempdir'/pgdata";
> This does not look very portable to me. Wouldn't it be better to use
> glob to get a list of the files and then copy each matching entry?
> Thoughts?

Here are patches on top of those words. Instead of cp, glob is used
with File::Copy and File::Basename to make the code more portable,
something useful for Windows for example where cp is not directly
available.
--
Michael

Attachment Content-Type Size
0001-Ignore-content-generated-by-TAP-test-suite-of-SSL.patch text/x-patch 564 bytes
0002-Make-TAP-tests-of-SSL-more-portable-by-avoiding-cp.patch text/x-patch 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2015-04-09 07:48:28 Re: "rejected" vs "returned with feedback" in new CF app
Previous Message Kyotaro HORIGUCHI 2015-04-09 07:01:41 Re: GUC context information in the document.