Re: [HACKERS] Make more portable TAP tests of initdb

2015-05-02 Thread Noah Misch
On Fri, May 01, 2015 at 03:23:44PM +0900, Michael Paquier wrote: On Thu, Apr 30, 2015 at 12:17 PM, Noah Misch n...@leadboat.com wrote: As I pondered this, I felt it would do better to solve a different problem. The rm -rf invocations presumably crept in to reduce peak disk usage.

Re: [HACKERS] Make more portable TAP tests of initdb

2015-05-02 Thread Michael Paquier
On Sun, May 3, 2015 at 8:09 AM, Noah Misch n...@leadboat.com wrote: On Fri, May 01, 2015 at 03:23:44PM +0900, Michael Paquier wrote: On Thu, Apr 30, 2015 at 12:17 PM, Noah Misch n...@leadboat.com wrote: As I pondered this, I felt it would do better to solve a different problem. The rm -rf

Re: [HACKERS] Make more portable TAP tests of initdb

2015-05-01 Thread Michael Paquier
On Thu, Apr 30, 2015 at 12:17 PM, Noah Misch n...@leadboat.com wrote: On Wed, Apr 15, 2015 at 02:59:55PM +0900, Michael Paquier wrote: On Wed, Apr 15, 2015 at 2:38 PM, Noah Misch wrote: Solaris 10 ships Perl 5.8.4, and RHEL 5.11 ships Perl 5.8.8. Therefore, Perl installations lacking

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-29 Thread Noah Misch
On Wed, Apr 15, 2015 at 02:59:55PM +0900, Michael Paquier wrote: On Wed, Apr 15, 2015 at 2:38 PM, Noah Misch wrote: Solaris 10 ships Perl 5.8.4, and RHEL 5.11 ships Perl 5.8.8. Therefore, Perl installations lacking this File::Path feature will receive vendor support for years to

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-15 Thread Michael Paquier
On Wed, Apr 15, 2015 at 2:38 PM, Noah Misch wrote: Solaris 10 ships Perl 5.8.4, and RHEL 5.11 ships Perl 5.8.8. Therefore, Perl installations lacking this File::Path feature will receive vendor support for years to come. Replacing the use of keep_root with rmtree+mkdir will add 2-10 lines of

[HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread Michael Paquier
Hi all, I noticed that src/bin/initdb/t/001_initdb.pl uses directly rm via a system() call like that: system_or_bail rm -rf '$tempdir'/*; This way of doing is not portable, particularly on platforms that do not have rm like... Windows where the equivalent is del. And we could actually use

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread David E. Wheeler
On Apr 14, 2015, at 9:05 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: http://perldoc.perl.org/File/Path.html With this formulation: remove_tree($tempdir, {keep_root = 1}); Does Perl 5.8 have this? Yes, it does. http://cpansearch.perl.org/src/NWCLARK/perl-5.8.9/lib/File/Path.pm

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread Alvaro Herrera
Michael Paquier wrote: Hi all, I noticed that src/bin/initdb/t/001_initdb.pl uses directly rm via a system() call like that: system_or_bail rm -rf '$tempdir'/*; This way of doing is not portable, particularly on platforms that do not have rm like... Windows where the equivalent is del.

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread Michael Paquier
On Wed, Apr 15, 2015 at 5:29 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: David E. Wheeler wrote: On Apr 14, 2015, at 1:21 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Castoroides has 5.8.4. Oops. WUT. Yeah, eh? Anyway I don't think it matters much: just don't enable TAP

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread Noah Misch
On Tue, Apr 14, 2015 at 05:29:36PM -0300, Alvaro Herrera wrote: David E. Wheeler wrote: On Apr 14, 2015, at 1:21 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Castoroides has 5.8.4. Oops. WUT. Yeah, eh? Anyway I don't think it matters much: just don't enable TAP tests

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread David Fetter
On Tue, Apr 14, 2015 at 09:25:33AM -0700, David E. Wheeler wrote: On Apr 14, 2015, at 9:05 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: http://perldoc.perl.org/File/Path.html With this formulation: remove_tree($tempdir, {keep_root = 1}); Does Perl 5.8 have this? Yes, it

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread Alvaro Herrera
David E. Wheeler wrote: On Apr 14, 2015, at 9:05 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: http://perldoc.perl.org/File/Path.html With this formulation: remove_tree($tempdir, {keep_root = 1}); Does Perl 5.8 have this? Yes, it does.

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread Alvaro Herrera
David E. Wheeler wrote: On Apr 14, 2015, at 1:21 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Castoroides has 5.8.4. Oops. WUT. Yeah, eh? Anyway I don't think it matters much: just don't enable TAP tests on machines with obsolete Perl. I think this is fine since 5.8's latest

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread David E. Wheeler
On Apr 14, 2015, at 1:21 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Castoroides has 5.8.4. Oops. WUT. smime.p7s Description: S/MIME cryptographic signature