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-09 09:26:09
Message-ID: CAExHW5uG2jA34iJKcz-N0gZutkYjROwBO+GD_pnXbO3jT8=+AA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Jacob,

On Tue, Jul 23, 2024 at 7:54 PM Jacob Champion
<jacob(dot)champion(at)enterprisedb(dot)com> wrote:
>
> On Tue, Jul 23, 2024 at 3:32 AM Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> wrote:
> > Upthread Jacob said he could work on a patch about introducing the
> > PG_TEST_EXTRA configure option to make builds. Would you still be
> > interested in working on this? If not, I would gladly work on it.
>
> Sure! Attached is a minimalist approach using AC_ARG_VAR.
>
> It works for top-level `make check-world`, or `make check -C
> src/test`. If you run `make check` directly from a test subdirectory,
> the variable doesn't get picked up, because it's only exported from
> the src/test level as of your patch c3382a3c3cc -- but if that turns
> out to be a problem, we can plumb it all the way down or expand the
> scope of the export.

Sorry for the delay in reply.

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
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.
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 this the patch lacks overriding PG_TEST_EXTRA at run time.

AFAIU, following was expected behaviour from both meson and make.
Please correct if I am wrong.
1. If PG_TEST_EXTRA is set at the setup/configuration time, it is not
required to be set at run time.
2. Runtime PG_TEST_EXTRA always overrides configure time PG_TEST_EXTRA.
--
Best Wishes,
Ashutosh Bapat

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2024-08-09 09:44:04 Re: Improve error message for ICU libraries if pkg-config is absent
Previous Message Kirill Reshke 2024-08-09 09:20:15 Re: [Patch] remove duplicated smgrclose