Skip to content

Add real_ps_util_renames to real_process_watchdog to avoid c_pal link in UTs#583

Open
parth21999 wants to merge 1 commit intomasterfrom
paaggarwal/remove-cpal-from-ut-libs
Open

Add real_ps_util_renames to real_process_watchdog to avoid c_pal link in UTs#583
parth21999 wants to merge 1 commit intomasterfrom
paaggarwal/remove-cpal-from-ut-libs

Conversation

@parth21999
Copy link
Copy Markdown
Member

This PR makes real_process_watchdog self-contained by adding real_ps_util_renames.h to its compilation. Previously, real_process_watchdog called ps_util_terminate_process (via LogCriticalAndTerminate), requiring downstream UTs to link c_pal. Now ps_util_terminate_process is renamed to real_ps_util_terminate_process, which is provided by c_pal_reals (already linked in all UTs).

Changes:

  • win32/reals/real_process_watchdog.c + linux/linux_reals/real_process_watchdog.c: Add #include "real_ps_util_renames.h"
  • 3 int test CMakeLists (srw_lock_int, srw_lock_ll_int, threadpool_int): Change c_pal_ll_reals to c_pal_reals to provide real_ps_util_terminate_process
  • gballoc_ll_passthrough_ut PCH: Add umock_c.h before timed_test_suite.h for proper rename activation

This enables downstream repos (c-util, etc.) to avoid linking c_pal in unit tests solely for watchdog support.

@parth21999
Copy link
Copy Markdown
Member Author

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

… dependency

real_process_watchdog calls ps_util_terminate_process via LogCriticalAndTerminate.
By adding real_ps_util_renames.h, this becomes real_ps_util_terminate_process
which is provided by c_pal_reals (already linked in UTs). This eliminates the
need for downstream repos to link c_pal in unit tests solely for watchdog support.

Also fixes include order in int tests (timed_test_suite.h before umock_c.h)
so renames are not triggered and int tests use process_watchdog directly from
c_pal without needing any reals libraries.

Fixes gballoc_ll_passthrough_ut PCH include order (umock_c.h must come
before timed_test_suite.h for proper rename activation in UTs).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@parth21999 parth21999 force-pushed the paaggarwal/remove-cpal-from-ut-libs branch from 623941f to 0a8e67c Compare April 23, 2026 04:43
@parth21999
Copy link
Copy Markdown
Member Author

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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.

1 participant