Re: Using LibPq in TAP tests via FFI

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Using LibPq in TAP tests via FFI
Дата
Msg-id ABD5F85A-ADD7-41CC-9251-3C44A73B2D37@anarazel.de
обсуждение исходный текст
Ответ на Using LibPq in TAP tests via FFI  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Using LibPq in TAP tests via FFI
Список pgsql-hackers
Hi,

On June 14, 2024 8:09:43 AM PDT, Andrew Dunstan <andrew@dunslane.net> wrote:
>Over at [1] Andres expressed enthusiasm for enabling TAP tests to call LibPQ directly via FFI, and there was some
supportfrom others as well. Attached is a very rough POC for just that.There are two perl modules, one which wraps
libpq(or almost all of it) in perl, and another which uses that module to create a session object that can be used to
runSQL. Also in the patch is a modification of one TAP test (arbitrarily chosen as
src/bin/pg_amcheck/t/004_verify_heapam.p)to use the new interface, so it doesn't use psql at all. 
>
>There's a bunch of work to do here, but for a morning's work it's not too bad :-) Luckily I had most of the first file
alreadyto hand. 

Yay!


>Next I plan to look at some of the recovery tests and other uses of background_psql, which might be more challenging,a
dnrequire extension of the session API. Also there's a lot of error checking and documentation that need to be added. 

I'd suggest trying to convert the various looping constructs first, they're responsible for a large number of spawned
shells.And I vaguely recall that there were none/very few that depend on actually being run via psql.  

Andres

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: CI and test improvements
Следующее
От: Tom Lane
Дата:
Сообщение: Re: RFC: adding pytest as a supported test framework