On Fri, Aug 9, 2024 at 2:26 AM Ashutosh Bapat <ashutosh.bapat....@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. > 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. Thanks, --Jacob [1] https://www.gnu.org/software/make/manual/html_node/Environment.html