pgsql: Fix old TAP tests' method for selecting a valid PGPORT value.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix old TAP tests' method for selecting a valid PGPORT value.
Дата
Msg-id E1gOuQD-00018J-Vp@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix old TAP tests' method for selecting a valid PGPORT value.

This code was trying to be paranoid, but it wasn't paranoid enough.
It only ensured that the selected port is in 0..65535, while most
Unix systems will refuse unprivileged attempts to use TCP port numbers
below 1024.

Change it to allow specification of ports 1024..65535, while if the
port is outside that range, map it into 49152..65535 which is the
port range used by our later branches.

The main reason we've not noticed this up to now is that it's not
important when testing over Unix-socket connections, only TCP,
and most of our test code deliberately prevents the postmaster from
opening any TCP ports.  However, the SSL tests do open up a TCP port,
and I believe this explains why buildfarm member chipmunk has been
failing the SSL tests in 9.5: it's picking a reserved port number.

Patch in 9.5 and 9.4.  Later branches do not use this code.

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ced3aaa5b67870c907905203f0653524c622c163

Modified Files
--------------
src/test/perl/TestLib.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Add needed #include.
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Fix issues with TAP tests of pg_verify_checksums