Re: More business with $Test::Builder::Level in the TAP tests

2021-10-11 Thread Michael Paquier
On Mon, Oct 11, 2021 at 10:48:54AM -0400, Andrew Dunstan wrote: > I would say: > > This should be incremented by any subroutine which directly or > indirectly calls test routines from Test::More, such as ok() or > is(). Indeed, that looks better. I have just used that and applied the

Re: More business with $Test::Builder::Level in the TAP tests

2021-10-11 Thread Andrew Dunstan
On 10/10/21 7:18 AM, Michael Paquier wrote: > On Fri, Oct 08, 2021 at 12:14:57PM -0400, Andrew Dunstan wrote: >> I think we need to be more explicit about it, especially w.r.t. indirect >> calls. Every subroutine in the call stack below where you want to error >> reported as coming from should co

Re: More business with $Test::Builder::Level in the TAP tests

2021-10-10 Thread Michael Paquier
On Fri, Oct 08, 2021 at 12:14:57PM -0400, Andrew Dunstan wrote: > I think we need to be more explicit about it, especially w.r.t. indirect > calls. Every subroutine in the call stack below where you want to error > reported as coming from should contain this line. Hmm. I got to think about that f

Re: More business with $Test::Builder::Level in the TAP tests

2021-10-08 Thread Andrew Dunstan
On 10/6/21 9:53 PM, Michael Paquier wrote: > On Wed, Oct 06, 2021 at 07:33:22AM -0400, Andrew Dunstan wrote: >> We should probably state a requirement for this somewhere. Maybe in >> src/test/perl/README. AIUI, the general rule is that any subroutine that >> directly or indirectly calls ok() and

Re: More business with $Test::Builder::Level in the TAP tests

2021-10-08 Thread Daniel Gustafsson
> On 8 Oct 2021, at 09:51, Michael Paquier wrote: > > On Fri, Oct 08, 2021 at 09:28:04AM +0200, Daniel Gustafsson wrote: >> LGTM. Maybe it should be added that it *must* be called before any >> Test::More >> function is called, it's sort of self-explanatory but not everyone writing >> TAP >> t

Re: More business with $Test::Builder::Level in the TAP tests

2021-10-08 Thread Michael Paquier
On Fri, Oct 08, 2021 at 09:28:04AM +0200, Daniel Gustafsson wrote: > LGTM. Maybe it should be added that it *must* be called before any Test::More > function is called, it's sort of self-explanatory but not everyone writing TAP > tests will be deeply familiar with Perl. I think that "must" is too

Re: More business with $Test::Builder::Level in the TAP tests

2021-10-08 Thread Daniel Gustafsson
> On 7 Oct 2021, at 03:53, Michael Paquier wrote: > > On Wed, Oct 06, 2021 at 07:33:22AM -0400, Andrew Dunstan wrote: >> We should probably state a requirement for this somewhere. Maybe in >> src/test/perl/README. AIUI, the general rule is that any subroutine that >> directly or indirectly calls

Re: More business with $Test::Builder::Level in the TAP tests

2021-10-06 Thread Michael Paquier
On Wed, Oct 06, 2021 at 07:33:22AM -0400, Andrew Dunstan wrote: > We should probably state a requirement for this somewhere. Maybe in > src/test/perl/README. AIUI, the general rule is that any subroutine that > directly or indirectly calls ok() and friends should increase the level. > Such subrouti

Re: More business with $Test::Builder::Level in the TAP tests

2021-10-06 Thread Daniel Gustafsson
> On 6 Oct 2021, at 13:33, Andrew Dunstan wrote: > We should probably state a requirement for this somewhere. Maybe in > src/test/perl/README. +1, I think that sounds like a very good idea. -- Daniel Gustafsson https://vmware.com/

Re: More business with $Test::Builder::Level in the TAP tests

2021-10-06 Thread Andrew Dunstan
On 10/6/21 2:28 AM, Michael Paquier wrote: > Hi all, > > Following up with Peter E's recent commit 73aa5e0 to add some > forgotten level incrementations, I got to look again at what I did > wrong and why this stuff is useful. > > I have gone through all the TAP tests and any code paths using > su

Re: More business with $Test::Builder::Level in the TAP tests

2021-10-06 Thread Peter Eisentraut
On 06.10.21 08:28, Michael Paquier wrote: Following up with Peter E's recent commit 73aa5e0 to add some forgotten level incrementations, I got to look again at what I did wrong and why this stuff is useful. I have gone through all the TAP tests and any code paths using subroutines, to note that

More business with $Test::Builder::Level in the TAP tests

2021-10-05 Thread Michael Paquier
Hi all, Following up with Peter E's recent commit 73aa5e0 to add some forgotten level incrementations, I got to look again at what I did wrong and why this stuff is useful. I have gone through all the TAP tests and any code paths using subroutines, to note that we could improve the locations of t