Re: [PATCH] Add regression tests of ecpg command notice (error / warning)

From: Ryo Kanbayashi <kanbayashi(dot)dev(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Add regression tests of ecpg command notice (error / warning)
Date: 2025-02-28 00:24:10
Message-ID: CANOn0ExcZ+UNgNfc-R=oCYKiWiEE-t-Ppox14TkOHc_+foT4xA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 18, 2025 at 12:49 PM Ryo Kanbayashi
<kanbayashi(dot)dev(at)gmail(dot)com> wrote:
>
> On Thu, Feb 13, 2025 at 10:49 PM Fujii Masao
> <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
> >
> >
> >
> > On 2025/02/06 8:57, Ryo Kanbayashi wrote:
> > > On Wed, Feb 5, 2025 at 9:31 PM Ryo Kanbayashi <kanbayashi(dot)dev(at)gmail(dot)com> wrote:
> > >>
> > >> Hi hackers,
> > >>
> > >> When I wrote patch of ecpg command notice bug, I recognized needs of
> > >> regression tests for ecpg command notices and I say that I write the
> > >> tests.
> >
> > Thanks for working on this!
> >
> >
> > >> I explain about implementation of this patch.
> > >>
> > >> What is this patch
> > >> - add regression tests which test ecpg command notices such as warning
> > >> and errors
> > >> - test notices implemented in ecpg.addons file
> > >>
> > >> Basic policy on implementation
> > >> - do in a way that matches the method using the existing pg_regress
> > >> command as much as possible
> > >> - avoid methods that increase the scope of influence
> > >>
> > >> Next, I list answers to points that are likely to be pointed out in
> > >> advance below :)
> > >> - shell scripts and bat files is used due to ...
> > >> avoid non zero exit code of ecpg command makes tests failure
> > >> avoid increasing C code for executing binary which cares cross platform
> > >> - python code is used because I couldn't write meson.build
> > >> appropriately describe dependency about materials which is used on
> > >> tests without it. please help me...
> > >> - as you said, kick this kind of tests by pg_regress accompanied with
> > >> needless PG server process execution. but pg_regress doesn't execute
> > >> test without it and making pg_regress require modification which has
> > >> not small scope of influence
> >
> > Wouldn't it be simpler to use the existing TAP test mechanism,
> > as shown in the attached patch? Please note that this patch is very WIP,
> > so there would be many places that need further implementation and refinement.
>
> Fujii San,
>
> Thank you for reviewing and indication of better implementation.
> I rewrite my patch based on your reference implementation :)

Fujii San and other hackers,

I have rewrote my patch on TAP test sttyle :)
File for build are also updated.

Commitfest entry:
https://commitfest.postgresql.org/patch/5543/

---
Great regards,
Ryo Kanbayashi
NTT Open Source Software Center

Attachment Content-Type Size
ecpg-notice-regress-patch-tap-ver.patch application/octet-stream 5.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2025-02-28 00:44:59 Re: long-standing data loss bug in initial sync of logical replication
Previous Message Jeff Davis 2025-02-27 23:48:03 Re: Should work_mem be stable for a prepared statement?