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

From: Andres Freund <andres(at)anarazel(dot)de>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: expressive test macros (was: Report test_atomic_ops() failures consistently, via macros)
Date: 2019-10-07 20:10:04
Message-ID: 20191007201004.o7n6tp35iyag7lwn@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2019-10-07 21:26:54 pgsql: docs: clarify that today/tomorrow/yesterday is at 00:00
Previous Message Tom Lane 2019-10-07 20:07:30 Re: expressive test macros (was: Report test_atomic_ops() failures consistently, via macros)

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2019-10-07 20:17:53 Re: maintenance_work_mem used by Vacuum
Previous Message Tom Lane 2019-10-07 20:07:30 Re: expressive test macros (was: Report test_atomic_ops() failures consistently, via macros)