Skip to content

Fix the DLSUFFIX redefinition in the backend unit tests - #2115

Open
tuhaihe wants to merge 1 commit into
apache:mainfrom
tuhaihe:fix-mock-dlsuffix-redefined
Open

tuhaihe wants to merge 1 commit into
apache:mainfrom
tuhaihe:fix-mock-dlsuffix-redefined

Conversation

@tuhaihe

@tuhaihe tuhaihe commented Oct 10, 2026

Copy link
Copy Markdown
Member

Every object of the backend unit tests is compiled with -DDLSUFFIX=.so, and pg_config.h then defines DLSUFFIX as ".so":

  pg_config.h:47:9: warning: 'DLSUFFIX' redefined
     47 | #define DLSUFFIX ".so"
  <command-line>: note: this is the location of the previous definition

The two definitions differ, because the one from the command line is not a string. The warning is printed more than a hundred times in a unittest-check run, and the command line value is never the one that is used.

Quote the value, as src/backend/utils/fmgr/Makefile already does. The two definitions are then the same, and there is no warning.

Checked with GCC 13 and GCC 15: the unquoted form warns, and the quoted form does not.

Assisted-by: Claude Code
Backpatch-through: REL_2_STABLE

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


Every object of the backend unit tests is compiled with
-DDLSUFFIX=.so, and pg_config.h then defines DLSUFFIX as ".so":

  pg_config.h:47:9: warning: 'DLSUFFIX' redefined
     47 | #define DLSUFFIX ".so"
  <command-line>: note: this is the location of the previous definition

The two definitions differ, because the one from the command line is
not a string. The warning is printed more than a hundred times in a
unittest-check run, and the command line value is never the one that is
used.

Quote the value, as src/backend/utils/fmgr/Makefile already does. The
two definitions are then the same, and there is no warning.

Checked with GCC 13 and GCC 15: the unquoted form warns, and the quoted
form does not.

Assisted-by: Claude Code
Backpatch-through: REL_2_STABLE
@tuhaihe tuhaihe added this to the Ubuntu 26.04 Support milestone Oct 10, 2026
@tuhaihe

tuhaihe commented Oct 10, 2026

Copy link
Copy Markdown
Member Author

This change has been verified in Ubuntu 26.04 on #2096

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