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/