From: Andres Freund <andres@anarazel.de>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: expressive test macros (was: Report test_atomic_ops() failures consistently, via macros)
Date: Mon, 7 Oct 2019 13:10:04 -0700
Message-ID: <20191007201004.o7n6tp35iyag7lwn@alap3.anarazel.de> (raw)
In-Reply-To: <eff1a2a2-f2ad-90c1-95eb-62631babacf8@2ndquadrant.com>
References: <E1iGnXq-0001K7-Aj@gemulon.postgresql.org>
<20191005190729.6sx7g23ifdu65s7s@alap3.anarazel.de>
<2144.1570471061@sss.pgh.pa.us>
<eff1a2a2-f2ad-90c1-95eb-62631babacf8@2ndquadrant.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de, peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, noah@leadboat.com, pgsql-hackers@lists.postgresql.org
Subject: Re: expressive test macros (was: Report test_atomic_ops() failures consistently, via macros)
In-Reply-To: <20191007201004.o7n6tp35iyag7lwn@alap3.anarazel.de>
References: <E1iGnXq-0001K7-Aj@gemulon.postgresql.org> <20191005190729.6sx7g23ifdu65s7s@alap3.anarazel.de> <2144.1570471061@sss.pgh.pa.us> <eff1a2a2-f2ad-90c1-95eb-62631babacf8@2ndquadrant.com> <20191007201004.o7n6tp35iyag7lwn@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox