Re: expressive test macros (was: Report test_atomic_ops() failuresconsistently, via macros)

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: expressive test macros (was: Report test_atomic_ops() failuresconsistently, via macros)
Дата
Msg-id 20191007201004.o7n6tp35iyag7lwn@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: expressive test macros (was: Report test_atomic_ops() failuresconsistently, via macros)  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
Hi,

On 2019-10-07 21:58:08 +0200, Peter Eisentraut wrote:
> On 2019-10-07 19:57, Tom Lane wrote:
> > I'd just put them all in c.h.  I see no reason why a new header
> > is helpful.
> 
> Assert stuff is already in there, but surely stuff that calls elog()
> doesn't belong in there?

Make it call an ExpectFailure() (or similar) function that takes the
various parameters (expression, file, line, severity, format string,
args) as an argument? And that's implemented in terms of elog() in the
backend, and pg_log* + abort() (when appropriate) in the frontend?

Greetings,

Andres Freund



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: expressive test macros (was: Report test_atomic_ops() failures consistently, via macros)
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: maintenance_work_mem used by Vacuum