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 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 wrote: >> > As I pondered this, I felt it would do better to solve a different problem. >> > The "rm -rf" invocations presumably cre

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 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. > > Considering the rel

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

2015-04-30 Thread Michael Paquier
On Thu, Apr 30, 2015 at 12:17 PM, Noah Misch 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 this File

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 > > yea

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

2015-04-14 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

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 > > 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 machin

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 wrote: > David E. Wheeler wrote: >> On Apr 14, 2015, at 1:21 PM, Alvaro Herrera 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

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 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 release is supported.

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 wrote: > Castoroides has 5.8.4. Oops. WUT. smime.p7s Description: S/MIME cryptographic signature

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 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/p

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 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 David E. Wheeler
On Apr 14, 2015, at 9:05 AM, Alvaro Herrera 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 Best, David smim

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

[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 remov