public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrew Dunstan <[email protected]>
To: Andres Freund <[email protected]>
Cc: [email protected]
Cc: Tom Lane <[email protected]>
Subject: Re: ssl tests aren't concurrency safe due to get_free_port()
Date: Sat, 19 Nov 2022 10:56:33 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On 2022-11-15 Tu 20:51, Andres Freund wrote:
>> @@ -140,6 +143,27 @@ INIT
>>
>> # Tracking of last port value assigned to accelerate free port lookup.
>> $last_port_assigned = int(rand() * 16384) + 49152;
>> +
>> + # Set the port lock directory
>> +
>> + # If we're told to use a directory (e.g. from a buildfarm client)
>> + # explicitly, use that
>> + $portdir = $ENV{PG_TEST_PORT_DIR};
>> + # Otherwise, try to use a directory at the top of the build tree
>> + if (! $portdir && $ENV{MESON_BUILD_ROOT})
>> + {
>> + $portdir = $ENV{MESON_BUILD_ROOT} . '/portlock'
>> + }
>> + elsif (! $portdir && ($ENV{TESTDATADIR} || "") =~ /\W(src|contrib)\W/p)
>> + {
>> + my $dir = ${^PREMATCH};
>> + $portdir = "$dir/portlock" if $dir;
>> + }
>> + # As a last resort use a directory under tmp_check
>> + $portdir ||= $PostgreSQL::Test::Utils::tmp_check . '/portlock';
>> + $portdir =~ s!\\!/!g;
>> + # Make sure the directory exists
>> + mkpath($portdir) unless -d $portdir;
>> }
> Perhaps we should just export a directory in configure instead of this
> guessing game?
>
>
>
I think the obvious candidate would be to export top_builddir from
src/Makefile.global. That would remove the need to infer it from
TESTDATADIR.
Any objections?
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
view thread (18+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: ssl tests aren't concurrency safe due to get_free_port()
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox