pgsql: Avoid warnings in tests when openssl binary isn't available - Mailing list pgsql-committers

From Daniel Gustafsson
Subject pgsql: Avoid warnings in tests when openssl binary isn't available
Date
Msg-id E1v9kFZ-002950-1S@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Avoid warnings in tests when openssl binary isn't available

The SSL tests for pg_stat_ssl tries to exactly match the serial
from the certificate by extracting it with the openssl binary.
If that fails due to the binary not being available, a fallback
match is used, but the attempt to execute a missing binary adds
a warning to the output which can confuse readers for a failure
in the test.  Fix by only attempting if the openssl binary was
found by autoconf/meson.

Backpatch down to v16 where commit c8e4030d1bdd made the test
use the OPENSSL variable from autoconf/meson instead of a hard-
coded value.

Author: Daniel Gustafsson <daniel@yesql.se>
Reported-by: Christoph Berg <myon@debian.org>
Discussion: https://postgr.es/m/aNPSp1-RIAs3skZm@msg.df7cb.de
Backpatch-through: 16

Branch
------
REL_16_STABLE

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

Modified Files
--------------
src/test/ssl/t/001_ssltests.pl | 40 +++++++++++++++++++---------------------
1 file changed, 19 insertions(+), 21 deletions(-)


pgsql-committers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: pgsql: Avoid warnings in tests when openssl binary isn't available
Next
From: Tom Lane
Date:
Subject: pgsql: Improve TAP tests by replacing ok() with better Test::More funct