Skip to content

initdb: fix TAP test after REL_16_9 merge - #2229

Merged
yjhjstz merged 1 commit into
apache:mainfrom
chenjinbao1989:fix-initdb-tap-test
Nov 4, 2026
Merged

yjhjstz merged 1 commit into
apache:mainfrom
chenjinbao1989:fix-initdb-tap-test

Conversation

@chenjinbao1989

Copy link
Copy Markdown
Contributor

The merge left 001_initdb.pl importing the legacy PostgresNode and TestLib modules, which it does not use. PostgresNode.pm still loads PostgresVersion, which the merge moved to PostgreSQL/Version.pm, so the test failed to compile. It also kept a fixed plan of 22 + 2 tests while the upstream body ends with done_testing() and runs 45 tests.

Drop the unused imports and the fixed plan, matching upstream.

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

CI Skip Instructions


@Vlasdislav

Copy link
Copy Markdown
Collaborator

I don't see run test initdb in CI. I suggest add run test to build-cloudberry.yml:

 {"test":"ic-initdb",
   "make_configs":["src/bin/initdb:installcheck"]
 },

To see what has changed

@tuhaihe

tuhaihe commented Nov 4, 2026

Copy link
Copy Markdown
Member

I don't see run test initdb in CI. I suggest add run test to build-cloudberry.yml:

 {"test":"ic-initdb",
   "make_configs":["src/bin/initdb:installcheck"]
 },

To see what has changed

Good idea. I will try to add other similar tests to our daily CI workflow.

@yjhjstz
yjhjstz enabled auto-merge (rebase) November 4, 2026 04:51
The merge left 001_initdb.pl importing the legacy PostgresNode and
TestLib modules, which it does not use. PostgresNode.pm still loads
PostgresVersion, which the merge moved to PostgreSQL/Version.pm, so the
test failed to compile. It also kept a fixed plan of 22 + 2 tests while
the upstream body ends with done_testing() and runs 45 tests.

Drop the unused imports and the fixed plan, matching upstream.
@yjhjstz
yjhjstz force-pushed the fix-initdb-tap-test branch from ec9481c to da3b67d Compare November 4, 2026 04:51

@my-ship-it my-ship-it left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks

@yjhjstz
yjhjstz merged commit 78378ab into apache:main Nov 4, 2026
144 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Merge postgres 16 Nov 4, 2026
tuhaihe added a commit to tuhaihe/cloudberrydb that referenced this pull request Nov 4, 2026
configure-cloudberry.sh builds with --enable-tap-tests, but CI runs TAP
tests only in src/test/recovery.  The other TAP suites, and the suites
in src/pl and src/test/modules, do not run at all, so nobody sees when
they break.  For example, the REL_16_9 merge broke the initdb TAP test
(apache#2229).

Add two test jobs with the suites that pass without changes on Rocky 8,
9 and 10:

- ic-tap: the TAP suites of pg_archivecleanup, pg_config,
  pg_controldata, pg_resetwal, pg_waldump, libpq and the postmaster,
  and of the ssl_passphrase_callback and test_custom_rmgrs modules.
- ic-pl-modules: PL/Perl and twelve regression suites in
  src/test/modules.

The build does not install src/test/modules, so those entries run
"install installcheck".  The test steps joined make_configs with spaces
and then split the result on spaces, so such an entry became two
configurations.  Join the entries with newlines and read one entry per
line instead.  All other entries give the same configurations as before.

The other suites fail now.  We will add them after we fix them in
separate changes.

Assisted-by: Claude Code
tuhaihe added a commit to tuhaihe/cloudberrydb that referenced this pull request Nov 4, 2026
apache#2229 fixed src/bin/initdb/t/001_initdb.pl after the REL_16_9 merge,
but CI does not run this test, so the next break can go unnoticed.

Add an ic-initdb test job that runs it on Rocky 8, 9 and 10.

Assisted-by: Claude Code
@tuhaihe tuhaihe mentioned this pull request Nov 4, 2026
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants