Re: PG_TEST_EXTRA and meson - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: PG_TEST_EXTRA and meson
Date
Msg-id CAExHW5tqYSs7n1o0HSR8RqLe5rmc9m-QYDNiotsSaJez_qLW8A@mail.gmail.com
Whole thread Raw
In response to Re: PG_TEST_EXTRA and meson  (Jacob Champion <jacob.champion@enterprisedb.com>)
List pgsql-hackers
On Wed, Aug 14, 2024 at 2:24 AM Jacob Champion
<jacob.champion@enterprisedb.com> wrote:
>
> On Fri, Aug 9, 2024 at 2:26 AM Ashutosh Bapat
> <ashutosh.bapat.oss@gmail.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



pgsql-hackers by date:

Previous
From: Ajin Cherian
Date:
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation
Next
From: shveta malik
Date:
Subject: Re: [bug fix] prepared transaction might be lost when max_prepared_transactions is zero on the subscriber