Re: psql - improve test coverage from 41% to 88%

2020-08-03 Thread Andrew Dunstan
On 8/3/20 3:34 PM, Fabien COELHO wrote: > > > I'm quite lost about Expect portability discussion wrt windows, it is > unclear to me whether it is expected to work there or not. Sorry if I was unclear. Expect will not work on Windows. Nor will use of IO::Pty  or IO::Tty, which are what Expect

Re: psql - improve test coverage from 41% to 88%

2020-08-03 Thread Fabien COELHO
Re-reading this thread, I see no complaints about introducing a dependency on Expect. Indeed, Tom's complaint was on another thread, possibly when interactive tests "src/bin/psql/t/010_tab_completion.pl" were added. ISTM that one of the issue was that some farm animal would be broken.

Re: psql - improve test coverage from 41% to 88%

2020-08-02 Thread Michael Paquier
On Sun, Aug 02, 2020 at 11:10:23AM -0400, Andrew Dunstan wrote: > +1. Also note that the Windows animals don't and probably will never > support Expect, since Windows doesn't have PTYs. Expect.pm is in fact a > pure perl module that sits on top of IO::Pty, which in turn sits on top > of IO::Tty.

Re: psql - improve test coverage from 41% to 88%

2020-08-02 Thread Andrew Dunstan
On 8/1/20 5:27 PM, Tom Lane wrote: > Daniel Gustafsson writes: >> On 1 Aug 2020, at 09:06, Fabien COELHO wrote: >>> AFAICR the feedback is that the Expect perl module is not welcome, which >>> seems to suggest that it would have to be re-implemented somehow. This is >>> not my dev

Re: psql - improve test coverage from 41% to 88%

2020-08-01 Thread Tom Lane
Daniel Gustafsson writes: > On 1 Aug 2020, at 09:06, Fabien COELHO wrote: >> AFAICR the feedback is that the Expect perl module is not welcome, which >> seems to suggest that it would have to be re-implemented somehow. This is >> not my dev philosophy, I won't do that, so I'm sorry to say that

Re: psql - improve test coverage from 41% to 88%

2020-08-01 Thread Daniel Gustafsson
> On 1 Aug 2020, at 09:06, Fabien COELHO wrote: > > Hello, > This patch no longer applies: http://cfbot.cputube.org/patch_27_2262.log CF entry has been updated to Waiting on Author. >>> >>> This patch hasn't been updated and still doesn't apply, do you intend to >>> rebase >>>

Re: psql - improve test coverage from 41% to 88%

2020-08-01 Thread Fabien COELHO
Hello, This patch no longer applies: http://cfbot.cputube.org/patch_27_2262.log CF entry has been updated to Waiting on Author. This patch hasn't been updated and still doesn't apply, do you intend to rebase it during this commitfest or should we move it to returned with feedback? It can

Re: psql - improve test coverage from 41% to 88%

2020-07-30 Thread Daniel Gustafsson
> On 5 Jul 2020, at 13:38, Daniel Gustafsson wrote: > >> On 24 Mar 2020, at 15:47, David Steele wrote: > >> This patch no longer applies: http://cfbot.cputube.org/patch_27_2262.log >> >> CF entry has been updated to Waiting on Author. > > This patch hasn't been updated and still doesn't

Re: psql - improve test coverage from 41% to 88%

2020-07-05 Thread Daniel Gustafsson
> On 24 Mar 2020, at 15:47, David Steele wrote: > This patch no longer applies: http://cfbot.cputube.org/patch_27_2262.log > > CF entry has been updated to Waiting on Author. This patch hasn't been updated and still doesn't apply, do you intend to rebase it during this commitfest or should we

Re: psql - improve test coverage from 41% to 88%

2020-03-24 Thread David Steele
Hi Fabien, On 11/27/19 11:01 PM, Michael Paquier wrote: On Wed, Nov 27, 2019 at 10:14:16AM +0100, Fabien COELHO wrote: Indeed, I did not notice. This patch no longer applies: http://cfbot.cputube.org/patch_27_2262.log CF entry has been updated to Waiting on Author. Regards, -- -David

Re: psql - improve test coverage from 41% to 88%

2019-11-27 Thread Michael Paquier
On Wed, Nov 27, 2019 at 10:14:16AM +0100, Fabien COELHO wrote: > Indeed, I did not notice. Thanks, Fabien! -- Michael signature.asc Description: PGP signature

Re: psql - improve test coverage from 41% to 88%

2019-11-27 Thread Fabien COELHO
Bonjour Michaël, Please note that you have received comments on this patch a couple of weeks ago. The patch was still marked as "needs review", which was incorrect, and it does not apply. Perhaps you did not notice it, so I am moving it to next CF, waiting on author for a rebase and for

Re: psql - improve test coverage from 41% to 88%

2019-11-26 Thread Michael Paquier
Hi Fabien, On Tue, Sep 17, 2019 at 04:48:06PM +0530, vignesh C wrote: > Few comments: > + [ 'START TRANSACTION', [ qr{ISOLATION LEVEL}, qr{(?!BEGIN)} ] ], > + [ 'TABLE', [ qr{ONLY} ] ], # hmmm... > + [ 'TRUNCATE', [ qr{CONTINUE IDENTITY} ] ], > + [ 'UNLISTEN', [ ] ], > > We can remove # hmmm...

Re: psql - improve test coverage from 41% to 88%

2019-09-17 Thread vignesh C
On Thu, Sep 12, 2019 at 4:49 PM Fabien COELHO wrote: > > > >> Here is a v5. > > > Few more in icommand_checks subroutine: > > Few unwanted code can be removed. > > Indeed, more debug and test code. > > Attached v6 fixes these, and I checked for remaining scrubs without > finding any. > Few

Re: psql - improve test coverage from 41% to 88%

2019-09-13 Thread Fabien COELHO
Hello Alvaro, I think the TestLib.pm changes should be done separately, not together with the rest of the hacking in this patch. Mostly, because I think they're going to cause trouble. Adding a parameter in the middle of the list may cause trouble for third-party users of TestLib. That is

Re: psql - improve test coverage from 41% to 88%

2019-09-13 Thread Alvaro Herrera
On 2019-Sep-13, Fabien COELHO wrote: > Hello Alvaro, > > > I think the TestLib.pm changes should be done separately, not together > > with the rest of the hacking in this patch. > > > > Mostly, because I think they're going to cause trouble. Adding a > > parameter in the middle of the list may

Re: psql - improve test coverage from 41% to 88%

2019-09-12 Thread Michael Paquier
On Thu, Sep 12, 2019 at 12:14:16PM -0300, Alvaro Herrera wrote: > Mostly, because I think they're going to cause trouble. Adding a > parameter in the middle of the list may cause trouble for third-party > users of TestLib. I propose that we make the routines a bit smarter to > cope with the API

Re: psql - improve test coverage from 41% to 88%

2019-09-12 Thread Alvaro Herrera
I think the TestLib.pm changes should be done separately, not together with the rest of the hacking in this patch. Mostly, because I think they're going to cause trouble. Adding a parameter in the middle of the list may cause trouble for third-party users of TestLib. I propose that we make the

Re: psql - improve test coverage from 41% to 88%

2019-09-12 Thread Fabien COELHO
Here is a v5. Few more in icommand_checks subroutine: Few unwanted code can be removed. Indeed, more debug and test code. Attached v6 fixes these, and I checked for remaining scrubs without finding any. -- Fabien.diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl

Re: psql - improve test coverage from 41% to 88%

2019-09-12 Thread vignesh C
On Thu, Sep 12, 2019 at 2:15 PM Fabien COELHO wrote: > > > >> Ok. Rebased version added, with some minor changes to improve readability > >> (comments, variables). > > > > Few comments: [...] > > > > Commented line can be removed > > Commented lines can be removed > > ??? can be changed to some

Re: psql - improve test coverage from 41% to 88%

2019-09-12 Thread Fabien COELHO
Ok. Rebased version added, with some minor changes to improve readability (comments, variables). Few comments: [...] Commented line can be removed Commented lines can be removed ??? can be changed to some suitable heading tab-complation to be changed to tab-completion Commented lines can be

Re: psql - improve test coverage from 41% to 88%

2019-09-12 Thread vignesh C
On Thu, Sep 12, 2019 at 11:56 AM Fabien COELHO wrote: > > > On Wed, Sep 11, 2019 at 10:52:01PM +0200, Fabien COELHO wrote: > >> AFAICR this is because the coverage was not the same:-) Some backslash > >> commands just skip silently to the end of the line, so that intermediate > >> \commands on

Re: psql - improve test coverage from 41% to 88%

2019-09-12 Thread Fabien COELHO
On Wed, Sep 11, 2019 at 10:52:01PM +0200, Fabien COELHO wrote: AFAICR this is because the coverage was not the same:-) Some backslash commands just skip silently to the end of the line, so that intermediate \commands on the same line are not recognized/processed the same, so I moved everything

Re: psql - improve test coverage from 41% to 88%

2019-09-11 Thread Michael Paquier
On Wed, Sep 11, 2019 at 10:52:01PM +0200, Fabien COELHO wrote: > AFAICR this is because the coverage was not the same:-) Some backslash > commands just skip silently to the end of the line, so that intermediate > \commands on the same line are not recognized/processed the same, so I moved >

Re: psql - improve test coverage from 41% to 88%

2019-09-11 Thread Fabien COELHO
Bonjour Michaël, +=item $node->icommand_checks(cmd, ...) + +=cut + +sub icommand_checks Surely this can have a better description, like say PostgresNode::command_checks_all. Ok. Is Expect compatible down to perl 5.8.0 which is the minimum required for the TAP tests (see

Re: psql - improve test coverage from 41% to 88%

2019-09-11 Thread Michael Paquier
On Tue, Sep 03, 2019 at 08:06:43AM +0200, Fabien COELHO wrote: > Attached is a rebase after TestLib.pm got a documentation in > 6fcc40b1. I am not completely sure what to think about this patch, but here are some high-level comments. +=item $node->icommand_checks(cmd, ...) + +=cut + +sub

Re: psql - improve test coverage from 41% to 88%

2019-09-03 Thread Fabien COELHO
Attached is a rebase after TestLib.pm got a documentation in 6fcc40b1. The attached patch improves psql code coverage by adding a specific TAP test. The 1709 tests take 4 seconds CPU (6.3 elapsed time) on my laptop. The infrastructure is updated to require perl module "Expect", allowing to

psql - improve test coverage from 41% to 88%

2019-08-28 Thread Fabien COELHO
Hello devs, The attached patch improves psql code coverage by adding a specific TAP test. The 1709 tests take 4 seconds CPU (6.3 elapsed time) on my laptop. The infrastructure is updated to require perl module "Expect", allowing to test interactive features such as tab completion and prompt