Skip to content

Drop duplicate mock.mk include in dispatcher tests - #2386

Open
tuhaihe wants to merge 1 commit into
apache:mainfrom
tuhaihe:fix-dispatcher-test-mock-include
Open

tuhaihe wants to merge 1 commit into
apache:mainfrom
tuhaihe:fix-dispatcher-test-mock-include

Conversation

@tuhaihe

@tuhaihe tuhaihe commented Nov 21, 2026

Copy link
Copy Markdown
Member

src/backend/cdb/dispatcher/test/Makefile has included src/backend/mock.mk twice since a910c04, after TARGETS and again at its end. mock.mk defines the recipe that builds src/backend/objfiles.txt, so the second include defines it once more, and every make in that directory, make unittest-check included, warns:

  mock.mk:127: warning: overriding recipe for target '.../objfiles.txt'
  mock.mk:127: warning: ignoring old recipe for target '.../objfiles.txt'

The second include does nothing else. The %.t rule takes its prerequisites from $^ when it runs, so the mocks each test lists after the first include reach the link all the same. Drop it, which leaves the Makefile like every other unit test Makefile.

Assisted-by: Claude Code

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


src/backend/cdb/dispatcher/test/Makefile has included
src/backend/mock.mk twice since a910c04, after TARGETS and again
at its end. mock.mk defines the recipe that builds
src/backend/objfiles.txt, so the second include defines it once more,
and every make in that directory, make unittest-check included, warns:

  mock.mk:127: warning: overriding recipe for target 'objfiles.txt'
  mock.mk:127: warning: ignoring old recipe for target 'objfiles.txt'

The second include does nothing else. The %.t rule takes its
prerequisites from $^ when it runs, so the mocks each test lists after
the first include reach the link all the same. Drop it, which leaves
the Makefile like every other unit test Makefile.

Assisted-by: Claude Code
@tuhaihe tuhaihe added this to the 3.x Meson milestone Nov 21, 2026
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