Skip to content

Fix test modules compile-time issues - #1878

Open
reshke wants to merge 2 commits into
mainfrom
fix_heap_checksum
Open

Fix test modules compile-time issues#1878
reshke wants to merge 2 commits into
mainfrom
fix_heap_checksum

Conversation

@reshke

@reshke reshke commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

before:

reshke@oheijweoij:~/cloudberry/src/test/heap_checksum$ make -j32 install
make -C ../../../src/backend generated-headers
/usr/bin/mkdir -p '/usr/local/gpdb/lib/postgresql'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-but-set-variable -Werror=implicit-fallthrough=3 -Wno-format-truncation -Wno-stringop-truncation -g -O3 -fPIC  -DUSE_INTERNAL_FTS=1  -Werror=uninitialized -Werror=implicit-function-declaration -Werror -fPIC -fvisibility=hidden -I. -I. -I../../../src/include   -D_GNU_SOURCE -I/usr/include/libxml2   -c -o heap_checksum_helper.o heap_checksum_helper.c -MMD -MP -MF .deps/heap_checksum_helper.Po
make[1]: Entering directory '/home/reshke/cloudberry/src/backend'
make -C catalog distprep generated-header-symlinks
make -C utils distprep generated-header-symlinks
make[2]: Entering directory '/home/reshke/cloudberry/src/backend/utils'
make[2]: Nothing to be done for 'distprep'.
make -C adt jsonpath_gram.h
make[2]: Entering directory '/home/reshke/cloudberry/src/backend/catalog'
make[2]: Nothing to be done for 'distprep'.
make[2]: Nothing to be done for 'generated-header-symlinks'.
make[2]: Leaving directory '/home/reshke/cloudberry/src/backend/catalog'
make[3]: Entering directory '/home/reshke/cloudberry/src/backend/utils/adt'
make[3]: 'jsonpath_gram.h' is up to date.
make[3]: Leaving directory '/home/reshke/cloudberry/src/backend/utils/adt'
make[2]: Leaving directory '/home/reshke/cloudberry/src/backend/utils'
make[1]: Leaving directory '/home/reshke/cloudberry/src/backend'
heap_checksum_helper.c: In function ‘invalidate_buffers’:
heap_checksum_helper.c:28:9: error: unknown type name ‘RelFileNodeBackend’; did you mean ‘RelFileLocatorBackend’?
   28 |         RelFileNodeBackend  rnodebackend;
      |         ^~~~~~~~~~~~~~~~~~
      |         RelFileLocatorBackend
heap_checksum_helper.c:32:21: error: request for member ‘node’ in something not a structure or union
   32 |         rnodebackend.node.spcNode = PG_GETARG_OID(0);
      |                     ^
heap_checksum_helper.c:33:21: error: request for member ‘node’ in something not a structure or union
   33 |         rnodebackend.node.dbNode  = PG_GETARG_OID(1);
      |                     ^
heap_checksum_helper.c:34:21: error: request for member ‘node’ in something not a structure or union
   34 |         rnodebackend.node.relNode = PG_GETARG_OID(2);
      |                     ^
heap_checksum_helper.c:36:21: error: request for member ‘backend’ in something not a structure or union
   36 |         rnodebackend.backend = InvalidBackendId; /* not temporary/local */
      |                     ^
In file included from heap_checksum_helper.c:9:
heap_checksum_helper.c:37:17: error: ‘InRecovery’ undeclared (first use in this function)
   37 |         Assert(!InRecovery); /* can't be used in recovery mode */
      |                 ^~~~~~~~~~
../../../src/include/c.h:947:23: note: in definition of macro ‘Assert’
  947 |                 if (!(condition)) \
      |                       ^~~~~~~~~
heap_checksum_helper.c:37:17: note: each undeclared identifier is reported only once for each function it appears in
   37 |         Assert(!InRecovery); /* can't be used in recovery mode */
      |                 ^~~~~~~~~~
../../../src/include/c.h:947:23: note: in definition of macro ‘Assert’
  947 |                 if (!(condition)) \
      |                       ^~~~~~~~~
heap_checksum_helper.c:38:15: error: ‘SMgrRelationData’ has no member named ‘smgr_rnode’; did you mean ‘smgr_ao’?
   38 |         reln->smgr_rnode = rnodebackend;
      |               ^~~~~~~~~~
      |               smgr_ao




src/planner_test_helpers.c:17:32: error: implicit declaration of function ‘pg_analyze_and_rewrite’; did you mean ‘pg_analyze_and_rewrite_withcb’? [-Werror=implicit-function-declaration]
   17 |         List *querytree_list = pg_analyze_and_rewrite(parsetree, query_string, NULL, 0, NULL);
      |                                ^~~~~~~~~~~~~~~~~~~~~~
      |                                pg_analyze_and_rewrite_withcb
src/planner_test_helpers.c:17:32: error: initialization of ‘List *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
src/planner_test_helpers.c: In function ‘make_query’:
src/planner_test_helpers.c:25:27: error: initialization of ‘Node *’ from incompatible pointer type ‘RawStmt *’ [-Werror=incompatible-pointer-types]
   25 |         Node *parsetree = get_parsetree_for(query_string);
      |                           ^~~~~~~~~~~~~~~~~
test_copy_callbacks.c: In function ‘test_copy_to_callback’:
test_copy_callbacks.c:43:9: error: too few arguments to function ‘EndCopyTo’
   43 |         EndCopyTo(cstate);
      |         ^~~~~~~~~
In file included from test_copy_callbacks.c:18:
../../../../src/include/commands/copy.h:208:13: note: declared here
  208 | extern void EndCopyTo(CopyToState cstate, uint64 *processed);
      |             ^~~~~~~~~
make[1]: *** [../../../../src/Makefile.global:1058: test_copy_callbacks.o] Error 1

and so on

@reshke reshke changed the title Fix heap_checksum compile-time issues Fix test modules compile-time issues Aug 1, 2026
@yjhjstz
yjhjstz force-pushed the fix_heap_checksum branch from dbf94c6 to 90bc6bc Compare August 2, 2026 01:00

@yjhjstz yjhjstz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, Thanks.

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.

3 participants