Re: PG_TEST_EXTRA and meson

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Cc: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Tristan Partin <tristan(at)partin(dot)io>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: PG_TEST_EXTRA and meson
Date: 2024-08-14 04:07:32
Message-ID: CAExHW5tqYSs7n1o0HSR8RqLe5rmc9m-QYDNiotsSaJez_qLW8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 14, 2024 at 2:24 AM Jacob Champion
<jacob(dot)champion(at)enterprisedb(dot)com> wrote:
>
> On Fri, Aug 9, 2024 at 2:26 AM Ashutosh Bapat
> <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> > Here are my observations with the patch applied
> > 1. If I run configure without setting PG_TEST_EXTRA, it won't run the
> > tests that require PG_TEST_EXTRA to be set. This is expected.
> > 2. But it wont' run tests even if PG_TEST_EXTRA is set while running
> > make check.- that's unexpected
>
> (see below)
>
> > 3. If I run configure with PG_TEST_EXTRA set and run 'make check' in
> > the test directory, it runs those tests. That's expected from the
> > final patch but that doesn't seem to be what you described above.
>
> I'm not entirely sure what you mean? src/test should work fine,
> anything lower than that (say src/test/ssl) does not.

I could run them from src/test/modules/xid_wraparound/. That's desirable.

>
> > 3. After 3, if I run `PG_TEST_EXTRA="something" make check`, it still
> > runs those tests. So it looks like PG_TEST_EXTRA doesn't get
> > overridden. If PG_TEST_EXTRA is set to something other than what was
> > configured, it doesn't take effect when running the corresponding
> > tests. E.g. PG_TEST_EXTRA is set to xid_wraparound at configure time,
> > but `PG_TEST_EXTRA=wal_consistency_check make check ` is run, the
> > tests won't use wal_consistency_check=all. - that's not expected.
>
> I think you're running into the GNU Make override order [1]. For
> instance when I want to override PG_TEST_EXTRA, I write
>
> make check PG_TEST_EXTRA=whatever
>
> If you want the environment variable to work by default instead, you can do
>
> PG_TEST_EXTRA=whatever make check -e
>
> If you don't want devs to have to worry about the difference, I think
> we can change the assignment operator to `?=` in Makefile.global.in.

What is working now should continue to work even after this change.
PG_TEST_EXTRA="xyz" make check works right now.

--
Best Wishes,
Ashutosh Bapat

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2024-08-14 04:55:56 Re: [bug fix] prepared transaction might be lost when max_prepared_transactions is zero on the subscriber
Previous Message Ajin Cherian 2024-08-14 03:50:38 Re: Introduce XID age and inactive timeout based replication slot invalidation