Re: Test 041_checkpoint_at_promote.pl faild in installcheck due to missing injection_points - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Test 041_checkpoint_at_promote.pl faild in installcheck due to missing injection_points
Date
Msg-id 202408232225.y7hnnrinboo2@alvherre.pgsql
Whole thread Raw
In response to Test 041_checkpoint_at_promote.pl faild in installcheck due to missing injection_points  (Maxim Orlov <orlovmg@gmail.com>)
Responses Re: Test 041_checkpoint_at_promote.pl faild in installcheck due to missing injection_points
List pgsql-hackers
On 2024-Aug-23, Michael Paquier wrote:

> On Tue, Aug 20, 2024 at 12:30:35PM -0400, Alvaro Herrera wrote:
> > Yeah, I like this option.  Injection points require to be explicitly
> > enabled in configure, so skipping that test when injection_points can't
> > be found seems reasonable.
> 
> My apologies for the delay in doing something here.
> 
> The simplest thing would be to scan pg_available_extensions after the
> first node is started, like in the attached.  What do you think?

Hmm, I think you could test whether "--enable-injection-points" is in
the pg_config output in $node->config_data('--configure').  You don't
need to have started the node for that.

> > This also suggests that EXTRA_INSTALL should have injection_points only
> > when the option is enabled.
> 
> If the switch is disabled, the path is just ignored, so I don't see
> any harm in keeping it listed all the time.

Okay.

> > I've been curious about what exactly does this Makefile line
> >   export enable_injection_points enable_injection_points
> > achieve.
> 
> Without this line, the TAP tests would not be able to know if
> injection points are enabled or not, no?  Well, it is true that we
> could also do something like a scan of pg_config.h in the installation
> path, but this is consistent with what ./configure uses.

Right, I figured out afterwards that what that does is export the
make-level variable as an environment variable.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Samuel Marks
Date:
Subject: Re: [PATCH] Guard `CLOBBER_FREED_MEMORY` & `MEMORY_CONTEXT_CHECKING`
Next
From: Nathan Bossart
Date:
Subject: Re: 039_end_of_wal: error in "xl_tot_len zero" test