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 3 commits into
masterfrom
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 3 commits into
masterfrom
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.

… 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 gballoc_ll_passthrough_ut PCH include order (umock_c.h must come
before timed_test_suite.h for proper rename activation).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@parth21999
Copy link
Copy Markdown
Member Author

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@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).

@parth21999
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread interfaces/tests/srw_lock_int/srw_lock_int.c Outdated
Comment thread interfaces/tests/srw_lock_ll_int/srw_lock_ll_int.c Outdated
anporumb
anporumb previously approved these changes Jun 6, 2026
Copy link
Copy Markdown
Contributor

@anporumb anporumb left a comment

Choose a reason for hiding this comment

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

:shipit:

@parth21999 parth21999 force-pushed the paaggarwal/remove-cpal-from-ut-libs branch from d7fac2f to 1cbc055 Compare June 6, 2026 02:07
@parth21999
Copy link
Copy Markdown
Member Author

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

… link libs

- Remove umock_c.h from srw_lock_int and srw_lock_ll_int (not used)
- Remove real_process_watchdog and c_pal_reals from srw_lock_int/ll CMakeLists
- Restore threadpool_int CMakeLists to original libs (c_pal_reals pre-existing)
- Move timed_test_suite.h before umock_c.h in threadpool_int to avoid renames

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@parth21999 parth21999 force-pushed the paaggarwal/remove-cpal-from-ut-libs branch from 1cbc055 to d7a7edd Compare June 6, 2026 02:31
@parth21999
Copy link
Copy Markdown
Member Author

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@parth21999
Copy link
Copy Markdown
Member Author

/azp 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.

2 participants