Registry Mirror
Skip to content

Conversation

@tuhaihe

@tuhaihe tuhaihe commented Dec 3, 2026

Copy link
Copy Markdown
Member

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context


src/test/Makefile adds the crypto directory only when $(with_openssl)
is yes, and that variable is always empty since the PG14 rename.  So
nothing built or ran these tests, and they stopped working when the
code moved to PG16:

- testcrypto.c calls pg_log_fatal(), which PG15 removed.  Use
  pg_fatal(), which logs the message and exits, as before.
- The scripts load the PostgresNode and TestLib modules.  Use
  PostgreSQL::Test::Cluster and PostgreSQL::Test::Utils instead.
- The scripts find testcrypto through $ENV{TESTDIR}, which PG16 no
  longer sets.  Call it by name, because prove_check and
  prove_installcheck put the test directory in PATH.

With these changes, all 99 tests pass with "make check" and with
"make installcheck".

Add src/test/crypto:installcheck to the ic-tap CI job, so that the
tests do not break again without notice.  They take a few seconds.

Assisted-by: Claude Code
PG14 replaced --with-openssl with --with-ssl=openssl.  configure still
accepts the old option, but only to set with_ssl, and it does not
export with_openssl to the Makefiles.  So $(with_openssl) is always
empty, and every "ifeq ($(with_openssl),yes)" is false:

- GNUmakefile.in does not build or install contrib/sslinfo, and does
  not add it to ICW_TARGETS for installcheck-world.
- src/test/Makefile does not include src/test/crypto.
- src/test/ssl/Makefile skips the SSL TAP tests on "make check".

Check $(with_ssl) for openssl in these places.

configure.ac has the same problem for --enable-openssl-redirect.  It
checks $with_openssl, so --with-ssl=openssl --enable-openssl-redirect
fails with "must specify --with-ssl".  Check $with_ssl instead.  The
configure change is the same as the one autoconf 2.69 makes.

Also change the errhint in kmgr.c and cipher.c to name
--with-ssl=openssl.

Tested on Rocky 9: sslinfo installcheck passes, and the SSL TAP tests
pass with PG_TEST_EXTRA=ssl (247 tests).

Backpatch-through: REL_2_STABLE
Assisted-by: Claude Code
@tuhaihe
tuhaihe force-pushed the fix-with-ssl-make-vars branch from 9dab374 to 7a01876 Compare December 3, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants