pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid warnings in tests when openssl binary isn't available
Date: Fri, 17 Oct 2025 13:05:47 +0000
Message-ID: <E1v9k9T-00291G-1a@gemulon.postgresql.org> (raw)

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7d129ba54e7425baf43aa518d417ba3e4e94a443

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



view thread (4+ messages)  latest in thread

Message-ID: <E1v9k9T-00291G-1a@gemulon.postgresql.org>
Permalink:  ../E1v9k9T-00291G-1a@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1v9k9T-00291G-1a@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Avoid warnings in tests when openssl binary isn't available
  In-Reply-To: <E1v9k9T-00291G-1a@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox