Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions

From: Sadhuprasad Patro <b(dot)sadhu(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions
Date: 2025-10-15 12:36:47
Message-ID: CAFF0-CFR0OHGVHPjQpQtHja+FpGdNsvk21-Pxy66YLTrwiLbSQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 15, 2025 at 2:25 AM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:

>
> On 2025-10-14 Tu 4:01 AM, Michael Paquier wrote:
> > On Fri, Oct 10, 2025 at 09:33:10AM -0400, Andrew Dunstan wrote:
> >> Great, I think this is a definite improvement. I saw someone recently
> >> complaining about this overuse of ok(), so thanks for doing the work to
> >> improve it.
> > Yeah, it's really cool to see someone step up and do all this leg
> > work for the existing code. I have not checked the patch in details
> > or if there are missing spots. Andrew, is that something you are
> > planning to do?
>
>
>
> I believe Sadhuprasad used this recipe to find these:
>
>
> find src contrib -type f -name '*.p[lm]' -print | \
> xargs grep -P '\bok[(].*[~=]'
>
>
> Maybe that would miss a few, but I bet not too many.
>
>
> cheers
>
>
> andrew
>
>
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com
>
>
Yes.. I hv used the same you mentioned Andrew...

--
thank u
SADHU PRASAD

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-10-15 12:37:06 Re: Add log_autovacuum_{vacuum|analyze}_min_duration
Previous Message David Rowley 2025-10-15 12:35:44 Re: MergeAppend could consider sorting cheapest child path