Skip to content

Run postgresql TAP suite with WAL encryption enabled #535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: TDE_REL_17_STABLE
Choose a base branch
from

Conversation

AndersAstrand
Copy link
Collaborator

@AndersAstrand AndersAstrand commented Aug 14, 2025

This is a concept for running the TAP suite with WAL encryption enabled when TDE_MODE=1.

I had to skip some tests (and also whole suites for tools we're not supporting in GA), but the rest passes.

TDE_MODE=1 meson test --no-suite pg_tde --no-suite pg_verifybackup --no-suite pg_combinebackup --no-suite pg_waldump passes for me.

There are still some test failures that might be because of test setup that I need to fix.

But do we like this? It's probably possible to monkeypatch PostgreSQL::Test::Cluster by adding -Msomething to PROVE_FLAGS, but I'm not enough of a perl hacker to spend time on that right now.



sub _provider_config_file {
"\xff\xff\xff\xff\x67\x6c\x6f\x62\x61\x6c\x5f\x74\x65\x73\x74\x5f" .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we generate "template" files in the setup suite, and then copy them for each test? That would be easier to understand/modify/verify than including a binary blob

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that would make sense. I just did the quickest thing I could think of for the PoC 🙂

Copy link
Collaborator

@jeltz jeltz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, especially with Zsolt's proposed changes if they can be implemented reaosnably which generates the files and copies them.

@AndersAstrand AndersAstrand force-pushed the tde/run-postgres-tap-tests-with-wal-encryption branch from 3aac647 to 0e93481 Compare August 15, 2025 09:44
@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.22%. Comparing base (415cb8d) to head (4ccb15e).
⚠️ Report is 1 commits behind head on TDE_REL_17_STABLE.

❌ Your project status has failed because the head coverage (82.22%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@                Coverage Diff                 @@
##           TDE_REL_17_STABLE     #535   +/-   ##
==================================================
  Coverage              82.22%   82.22%           
==================================================
  Files                     25       25           
  Lines                   3246     3246           
  Branches                 512      512           
==================================================
  Hits                    2669     2669           
  Misses                   465      465           
  Partials                 112      112           
Components Coverage Δ
access 84.70% <ø> (ø)
catalog 87.65% <ø> (ø)
common 77.77% <ø> (ø)
encryption 72.97% <ø> (ø)
keyring 73.21% <ø> (ø)
src 94.18% <ø> (ø)
smgr 96.53% <ø> (ø)
transam ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AndersAstrand AndersAstrand force-pushed the tde/run-postgres-tap-tests-with-wal-encryption branch 10 times, most recently from aac976b to 615c60f Compare August 19, 2025 15:33
This release is supposed to be 2.0. The SQL upgrade file is a dummy, but
I believe it's required.
This is the version we're about to release.
@AndersAstrand AndersAstrand force-pushed the tde/run-postgres-tap-tests-with-wal-encryption branch from 615c60f to 4ccb15e Compare August 20, 2025 08:26
@dutow dutow force-pushed the TDE_REL_17_STABLE branch from b3b7e89 to 415cb8d Compare August 20, 2025 08:59
Comment on lines +13 to +17
if (defined($ENV{TDE_MODE}))
{
plan skip_all => "Slightly edited version of this test avaiable in pg_tde suite";
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test in pg_tde suite do only sanity checks for the -E flag, hence it doesn't overlap with this test at all.

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.

5 participants