From e9ac02b762c2a2ff7804f90584b34b880f7c681d Mon Sep 17 00:00:00 2001 From: Parth Aggarwal Date: Tue, 14 Apr 2026 18:57:23 -0700 Subject: [PATCH 01/17] Convert all tests to use TIMED_TEST_SUITE_INITIALIZE/CLEANUP - Update c-pal submodule to latest master (with timed test suite support) - Replace TEST_SUITE_INITIALIZE/CLEANUP with TIMED_ versions in 65 test files - Add c_pal/timed_test_suite.h to 49 PCH files and 17 int test files - Add real_process_watchdog and c_pal to UT CMakeLists - Add c_pal to int test CMakeLists Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- samples/async_op_samples_int/CMakeLists.txt | 2 +- samples/async_op_samples_int/async_op_samples_int.c | 5 +++-- tests/async_op_int/CMakeLists.txt | 2 +- tests/async_op_int/async_op_int.c | 5 +++-- tests/async_op_ut/CMakeLists.txt | 4 ++-- tests/async_op_ut/async_op_ut.c | 4 ++-- tests/async_op_ut/async_op_ut_pch.h | 2 ++ tests/async_retry_wrapper_ut/CMakeLists.txt | 4 ++-- tests/async_retry_wrapper_ut/async_retry_wrapper_ut.c | 4 ++-- tests/async_retry_wrapper_ut/async_retry_wrapper_ut_pch.h | 2 ++ .../async_type_helper_copy_value_handler_ut/CMakeLists.txt | 4 ++-- .../async_type_helper_copy_value_handler_ut.c | 6 +++--- .../async_type_helper_copy_value_handler_ut_pch.h | 2 ++ .../async_type_helper_ref_counted_handler_ut/CMakeLists.txt | 4 ++-- .../async_type_helper_ref_counted_handler_ut.c | 4 ++-- .../async_type_helper_ref_counted_handler_ut_pch.h | 2 ++ tests/async_type_helper_thandle_handler_ut/CMakeLists.txt | 4 ++-- .../async_type_helper_thandle_handler_ut.c | 4 ++-- .../async_type_helper_thandle_handler_ut_pch.h | 2 ++ tests/async_type_helper_ut/CMakeLists.txt | 4 ++-- tests/async_type_helper_ut/async_type_helper_ut.c | 6 +++--- tests/async_type_helper_ut/async_type_helper_ut_pch.h | 2 ++ tests/azure_base64_ut/CMakeLists.txt | 4 ++-- tests/azure_base64_ut/azure_base64_ut.c | 4 ++-- tests/azure_base64_ut/azure_base64_ut_pch.h | 2 ++ tests/buffer_ut/CMakeLists.txt | 4 ++-- tests/buffer_ut/buffer_ut.c | 4 ++-- tests/buffer_ut/buffer_ut_pch.h | 2 ++ tests/cancellation_token_ut/CMakeLists.txt | 4 ++-- tests/cancellation_token_ut/cancellation_token_ut.c | 4 ++-- tests/cancellation_token_ut/cancellation_token_ut_pch.h | 2 ++ tests/channel_int/channel_int.c | 5 +++-- tests/channel_ut/CMakeLists.txt | 4 ++-- tests/channel_ut/channel_ut.c | 4 ++-- tests/channel_ut/channel_ut_pch.h | 2 ++ tests/constbuffer_array_batcher_nv_ut/CMakeLists.txt | 4 ++-- .../constbuffer_array_batcher_nv_ut.c | 4 ++-- .../constbuffer_array_batcher_nv_ut_pch.h | 2 ++ tests/constbuffer_array_int/CMakeLists.txt | 2 +- tests/constbuffer_array_int/constbuffer_array_int.c | 5 +++-- tests/constbuffer_array_splitter_ut/CMakeLists.txt | 4 ++-- .../constbuffer_array_splitter_ut.c | 4 ++-- .../constbuffer_array_splitter_ut_pch.h | 2 ++ tests/constbuffer_array_ut/CMakeLists.txt | 4 ++-- tests/constbuffer_array_ut/constbuffer_array_ut.c | 4 ++-- tests/constbuffer_array_ut/constbuffer_array_ut_pch.h | 2 ++ tests/constbuffer_thandle_int/CMakeLists.txt | 2 +- tests/constbuffer_thandle_int/constbuffer_thandle_int.c | 5 +++-- tests/constbuffer_thandle_ut/CMakeLists.txt | 4 ++-- tests/constbuffer_thandle_ut/constbuffer_thandle_ut.c | 4 ++-- tests/constbuffer_thandle_ut/constbuffer_thandle_ut_pch.h | 2 ++ tests/constbuffer_ut/CMakeLists.txt | 4 ++-- tests/constbuffer_ut/constbuffer_ut.c | 4 ++-- tests/constbuffer_ut/constbuffer_ut_pch.h | 2 ++ tests/critical_section_ut/CMakeLists.txt | 4 ++-- tests/critical_section_ut/critical_section_ut.c | 6 +++--- tests/critical_section_ut/critical_section_ut_pch.h | 2 ++ tests/doublylinkedlist_ut/CMakeLists.txt | 4 ++-- tests/doublylinkedlist_ut/doublylinkedlist_ut.c | 4 ++-- tests/doublylinkedlist_ut/doublylinkedlist_ut_pch.h | 1 + .../external_command_helper_int.c | 5 +++-- tests/external_command_helper_ut/CMakeLists.txt | 4 ++-- .../external_command_helper_ut/external_command_helper_ut.c | 6 +++--- .../external_command_helper_ut_pch.h | 2 ++ tests/filename_helper_ut/CMakeLists.txt | 4 ++-- tests/filename_helper_ut/filename_helper_ut.c | 4 ++-- tests/filename_helper_ut/filename_helper_ut_pch.h | 2 ++ tests/flags_to_string_int/flags_to_string_int.c | 5 +++-- tests/flags_to_string_ut/CMakeLists.txt | 4 ++-- tests/flags_to_string_ut/flags_to_string_ut.c | 6 +++--- tests/flags_to_string_ut/flags_to_string_ut_pch.h | 2 ++ tests/for_each_in_folder_ut/CMakeLists.txt | 4 ++-- tests/for_each_in_folder_ut/for_each_in_folder_ut.c | 4 ++-- tests/for_each_in_folder_ut/for_each_in_folder_ut_pch.h | 2 ++ tests/for_each_in_sub_folder_ut/CMakeLists.txt | 4 ++-- tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut.c | 4 ++-- .../for_each_in_sub_folder_ut_pch.h | 2 ++ tests/hash_ut/CMakeLists.txt | 4 ++-- tests/hash_ut/hash_ut.c | 6 +++--- tests/hash_ut/hash_ut_pch.h | 1 + tests/map_ut/CMakeLists.txt | 4 ++-- tests/map_ut/map_ut.c | 4 ++-- tests/map_ut/map_ut_pch.h | 2 ++ tests/memory_data_ut/CMakeLists.txt | 4 ++-- tests/memory_data_ut/memory_data_ut.c | 4 ++-- tests/memory_data_ut/memory_data_ut_pch.h | 1 + tests/object_lifetime_tracker_ut/CMakeLists.txt | 4 ++-- .../object_lifetime_tracker_ut/object_lifetime_tracker_ut.c | 4 ++-- .../object_lifetime_tracker_ut_pch.h | 2 ++ tests/paged_sparse_array_int/paged_sparse_array_int.c | 5 +++-- tests/paged_sparse_array_ut/CMakeLists.txt | 2 +- tests/paged_sparse_array_ut/paged_sparse_array_ut.c | 4 ++-- tests/paged_sparse_array_ut/paged_sparse_array_ut_pch.h | 2 ++ tests/rc_ptr_ut/CMakeLists.txt | 4 ++-- tests/rc_ptr_ut/rc_ptr_ut.c | 4 ++-- tests/rc_ptr_ut/rc_ptr_ut_pch.h | 2 ++ tests/rc_string_array_ut/CMakeLists.txt | 4 ++-- tests/rc_string_array_ut/rc_string_array_ut.c | 6 +++--- tests/rc_string_array_ut/rc_string_array_ut_pch.h | 2 ++ tests/rc_string_ut/CMakeLists.txt | 4 ++-- tests/rc_string_ut/rc_string_ut.c | 4 ++-- tests/rc_string_ut/rc_string_ut_pch.h | 2 ++ tests/rc_string_utils_ut/CMakeLists.txt | 4 ++-- tests/rc_string_utils_ut/rc_string_utils_ut.c | 6 +++--- tests/rc_string_utils_ut/rc_string_utils_ut_pch.h | 2 ++ tests/reals_ut/CMakeLists.txt | 4 ++-- tests/reals_ut/c_util_reals_ut_pch.h | 1 + tests/singlylinkedlist_ut/CMakeLists.txt | 4 ++-- tests/singlylinkedlist_ut/singlylinkedlist_ut.c | 4 ++-- tests/singlylinkedlist_ut/singlylinkedlist_ut_pch.h | 2 ++ tests/sliding_window_average_by_count_ut/CMakeLists.txt | 4 ++-- .../sliding_window_average_by_count_ut.c | 4 ++-- .../sliding_window_average_by_count_ut_pch.h | 2 ++ tests/strings_ut/CMakeLists.txt | 4 ++-- tests/strings_ut/strings_ut.c | 4 ++-- tests/strings_ut/strings_ut_pch.h | 2 ++ tests/sync_wrapper_ut/CMakeLists.txt | 4 ++-- tests/sync_wrapper_ut/sync_wrapper_ut.c | 4 ++-- tests/sync_wrapper_ut/sync_wrapper_ut_pch.h | 2 ++ tests/tarray_2_int/tarray_2_int.c | 5 +++-- tests/tarray_int/CMakeLists.txt | 2 +- tests/tarray_int/tarray_int.c | 5 +++-- tests/tarray_ut/CMakeLists.txt | 4 ++-- tests/tarray_ut/tarray_ut.c | 4 ++-- tests/tarray_ut/tarray_ut_pch.h | 2 ++ tests/tcall_dispatcher_int/tcall_dispatcher_int.c | 5 +++-- tests/tcall_dispatcher_ut/CMakeLists.txt | 4 ++-- tests/tcall_dispatcher_ut/tcall_dispatcher_ut.c | 4 ++-- tests/tcall_dispatcher_ut/tcall_dispatcher_ut_pch.h | 2 ++ tests/thandle_tuple_array_ut/CMakeLists.txt | 4 ++-- tests/thandle_tuple_array_ut/thandle_tuple_array_ut.c | 6 +++--- tests/thandle_tuple_array_ut/thandle_tuple_array_ut_pch.h | 2 ++ .../thread_notifications_dispatcher_int.c | 5 +++-- tests/thread_notifications_dispatcher_ut/CMakeLists.txt | 4 ++-- .../thread_notifications_dispatcher_ut.c | 6 +++--- .../thread_notifications_dispatcher_ut_pch.h | 2 ++ .../CMakeLists.txt | 4 ++-- .../thread_notifications_dispatcher_wo_init_ut.c | 6 +++--- .../thread_notifications_dispatcher_wo_init_ut_pch.h | 2 ++ tests/tp_worker_thread_int/CMakeLists.txt | 2 +- tests/tp_worker_thread_int/tp_worker_thread_int.c | 5 +++-- tests/tp_worker_thread_ut/CMakeLists.txt | 4 ++-- tests/tp_worker_thread_ut/tp_worker_thread_ut.c | 6 +++--- tests/tp_worker_thread_ut/tp_worker_thread_ut_pch.h | 2 ++ tests/two_d_array_int/two_d_array_int.c | 5 +++-- tests/two_d_array_ut/CMakeLists.txt | 4 ++-- tests/two_d_array_ut/two_d_array_ut.c | 6 +++--- tests/two_d_array_ut/two_d_array_ut_pch.h | 2 ++ tests/uuid_string_ut/CMakeLists.txt | 4 ++-- tests/uuid_string_ut/uuid_string_ut.c | 4 ++-- tests/uuid_string_ut/uuid_string_ut_pch.h | 2 ++ tests/watchdog_int/watchdog_int.c | 5 +++-- tests/watchdog_threadpool_ut/CMakeLists.txt | 4 ++-- tests/watchdog_threadpool_ut/watchdog_threadpool_ut.c | 6 +++--- tests/watchdog_threadpool_ut/watchdog_threadpool_ut_pch.h | 2 ++ tests/watchdog_ut/CMakeLists.txt | 4 ++-- tests/watchdog_ut/watchdog_ut.c | 4 ++-- tests/watchdog_ut/watchdog_ut_pch.h | 2 ++ tests/worker_thread_int/CMakeLists.txt | 2 +- tests/worker_thread_int/worker_thread_int.c | 5 +++-- tests/worker_thread_ut/CMakeLists.txt | 4 ++-- tests/worker_thread_ut/worker_thread_ut.c | 4 ++-- tests/worker_thread_ut/worker_thread_ut_pch.h | 2 ++ .../tests/thread_notif_lackey_dll_wo_init_ut/CMakeLists.txt | 4 ++-- .../thread_notif_lackey_dll_wo_init_ut.c | 4 ++-- .../thread_notif_lackey_dll_wo_init_ut_pch.h | 2 ++ .../thread_notifications_lackey_dll_int/CMakeLists.txt | 2 +- .../thread_notifications_lackey_dll_int.c | 5 +++-- .../tests/thread_notifications_lackey_dll_ut/CMakeLists.txt | 4 ++-- .../thread_notifications_lackey_dll_ut.c | 4 ++-- .../thread_notifications_lackey_dll_ut_pch.h | 2 ++ 171 files changed, 360 insertions(+), 249 deletions(-) diff --git a/samples/async_op_samples_int/CMakeLists.txt b/samples/async_op_samples_int/CMakeLists.txt index 7caf66c0..3f15c3e1 100644 --- a/samples/async_op_samples_int/CMakeLists.txt +++ b/samples/async_op_samples_int/CMakeLists.txt @@ -28,4 +28,4 @@ set(${theseTestsName}_h_files ml_async_op_module_with_retries.h ) -build_test_artifacts(${theseTestsName} "samples" ADDITIONAL_LIBS c_util) +build_test_artifacts(${theseTestsName} "samples" ADDITIONAL_LIBS c_pal c_util) diff --git a/samples/async_op_samples_int/async_op_samples_int.c b/samples/async_op_samples_int/async_op_samples_int.c index 72ef93e6..1b0bc971 100644 --- a/samples/async_op_samples_int/async_op_samples_int.c +++ b/samples/async_op_samples_int/async_op_samples_int.c @@ -16,6 +16,7 @@ #include "c_pal/sync.h" #include "c_pal/thandle.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/async_op.h" @@ -366,12 +367,12 @@ static void test_ASYNC_OP_MODULE_CALLBACK(void* context, COMMON_ASYNC_OP_MODULE_ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(TestClassInit) +TIMED_TEST_SUITE_INITIALIZE(TestClassInit, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { gballoc_hl_deinit(); } diff --git a/tests/async_op_int/CMakeLists.txt b/tests/async_op_int/CMakeLists.txt index d1e64a6f..da79dbee 100644 --- a/tests/async_op_int/CMakeLists.txt +++ b/tests/async_op_int/CMakeLists.txt @@ -13,4 +13,4 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util) +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util) diff --git a/tests/async_op_int/async_op_int.c b/tests/async_op_int/async_op_int.c index 6c30ad86..8db355e9 100644 --- a/tests/async_op_int/async_op_int.c +++ b/tests/async_op_int/async_op_int.c @@ -15,6 +15,7 @@ #include "c_pal/gballoc_hl_redirect.h" #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" #include "c_util/async_op.h" @@ -84,12 +85,12 @@ static ASYNC_OP_DISPOSE disposes[] = BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(setsBufferTempSize) +TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { gballoc_hl_deinit(); } diff --git a/tests/async_op_ut/CMakeLists.txt b/tests/async_op_ut/CMakeLists.txt index 73777125..6b44c906 100644 --- a/tests/async_op_ut/CMakeLists.txt +++ b/tests/async_op_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName async_op_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_op_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_op_ut/async_op_ut.c b/tests/async_op_ut/async_op_ut.c index 4b486e34..c0817431 100644 --- a/tests/async_op_ut/async_op_ut.c +++ b/tests/async_op_ut/async_op_ut.c @@ -22,7 +22,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(setsBufferTempSize) +TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -33,7 +33,7 @@ TEST_SUITE_INITIALIZE(setsBufferTempSize) REGISTER_GLOBAL_MOCK_FAIL_RETURN(realloc, NULL); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/async_op_ut/async_op_ut_pch.h b/tests/async_op_ut/async_op_ut_pch.h index e1544d70..be4ea198 100644 --- a/tests/async_op_ut/async_op_ut_pch.h +++ b/tests/async_op_ut/async_op_ut_pch.h @@ -13,6 +13,8 @@ #include "testrunnerswitcher.h" #include "umock_c/umock_c.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" diff --git a/tests/async_retry_wrapper_ut/CMakeLists.txt b/tests/async_retry_wrapper_ut/CMakeLists.txt index 54814fd1..d3350150 100644 --- a/tests/async_retry_wrapper_ut/CMakeLists.txt +++ b/tests/async_retry_wrapper_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName async_retry_wrapper_ut) @@ -25,6 +25,6 @@ set(${theseTestsName}_h_files include_directories(../../inc) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_retry_wrapper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_retry_wrapper_ut/async_retry_wrapper_ut.c b/tests/async_retry_wrapper_ut/async_retry_wrapper_ut.c index 30a569b9..58728952 100644 --- a/tests/async_retry_wrapper_ut/async_retry_wrapper_ut.c +++ b/tests/async_retry_wrapper_ut/async_retry_wrapper_ut.c @@ -205,7 +205,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -258,7 +258,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_TYPE(TEST_ASYNC_API_SYNC_MULTIPLE_RESULT, TEST_ASYNC_API_SYNC_MULTIPLE_RESULT); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { THANDLE_ASSIGN(REAL_THREADPOOL)(&g.test_threadpool, NULL); umock_c_deinit(); diff --git a/tests/async_retry_wrapper_ut/async_retry_wrapper_ut_pch.h b/tests/async_retry_wrapper_ut/async_retry_wrapper_ut_pch.h index be1c02d9..264b0d9c 100644 --- a/tests/async_retry_wrapper_ut/async_retry_wrapper_ut_pch.h +++ b/tests/async_retry_wrapper_ut/async_retry_wrapper_ut_pch.h @@ -19,6 +19,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #define GBALLOC_HL_REDIRECT_H #undef GBALLOC_HL_REDIRECT_H diff --git a/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt b/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt index a0297034..3c407fa7 100644 --- a/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt +++ b/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName async_type_helper_copy_value_handler_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_copy_value_handler_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut.c b/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut.c index 202bd1c5..44cf9be4 100644 --- a/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut.c +++ b/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. @@ -27,7 +27,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -38,7 +38,7 @@ TEST_SUITE_INITIALIZE(suite_init) } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut_pch.h b/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut_pch.h index 85dfdf5a..399cb24c 100644 --- a/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut_pch.h +++ b/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut_pch.h @@ -17,6 +17,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to this interlocked.h, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt b/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt index 88f15e2c..fc1a62ff 100644 --- a/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt +++ b/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName async_type_helper_ref_counted_handler_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_ref_counted_handler_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut.c b/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut.c index 0b086f4f..3c62c0d1 100644 --- a/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut.c +++ b/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut.c @@ -21,7 +21,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -38,7 +38,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(TEST_REFCOUNTED_HANDLE, void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut_pch.h b/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut_pch.h index e642862e..0c7eaecd 100644 --- a/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut_pch.h +++ b/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut_pch.h @@ -17,6 +17,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to this interlocked.h, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt b/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt index 8a2c64d8..3a838311 100644 --- a/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt +++ b/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName async_type_helper_thandle_handler_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_thandle_handler_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut.c b/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut.c index de787392..15232345 100644 --- a/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut.c +++ b/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut.c @@ -27,7 +27,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -43,7 +43,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(TEST_THANDLE), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut_pch.h b/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut_pch.h index 3e88e1dc..1fa2c4a6 100644 --- a/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut_pch.h +++ b/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut_pch.h @@ -17,6 +17,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to this interlocked.h, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/async_type_helper_ut/CMakeLists.txt b/tests/async_type_helper_ut/CMakeLists.txt index 8790965c..0a37ad50 100644 --- a/tests/async_type_helper_ut/CMakeLists.txt +++ b/tests/async_type_helper_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName async_type_helper_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util c_pal_reals c_util_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_ut/async_type_helper_ut.c b/tests/async_type_helper_ut/async_type_helper_ut.c index 1207f620..8e95d7d0 100644 --- a/tests/async_type_helper_ut/async_type_helper_ut.c +++ b/tests/async_type_helper_ut/async_type_helper_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. #include "async_type_helper_ut_pch.h" @@ -18,7 +18,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -44,7 +44,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(constbuffer_array_ptr, CONSTBUFFER_ARRAY_HANDLE*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/async_type_helper_ut/async_type_helper_ut_pch.h b/tests/async_type_helper_ut/async_type_helper_ut_pch.h index 31ff59be..133753ad 100644 --- a/tests/async_type_helper_ut/async_type_helper_ut_pch.h +++ b/tests/async_type_helper_ut/async_type_helper_ut_pch.h @@ -19,6 +19,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/azure_base64_ut/CMakeLists.txt b/tests/azure_base64_ut/CMakeLists.txt index 9f4196ed..cd8ef168 100644 --- a/tests/azure_base64_ut/CMakeLists.txt +++ b/tests/azure_base64_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName azure_base64_ut) @@ -17,6 +17,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/azure_base64_ut_pch.h" ) \ No newline at end of file diff --git a/tests/azure_base64_ut/azure_base64_ut.c b/tests/azure_base64_ut/azure_base64_ut.c index 5ec640c3..5a0bc32f 100644 --- a/tests/azure_base64_ut/azure_base64_ut.c +++ b/tests/azure_base64_ut/azure_base64_ut.c @@ -1444,7 +1444,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(TestSuiteInitialize) +TIMED_TEST_SUITE_INITIALIZE(TestSuiteInitialize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -1453,7 +1453,7 @@ TEST_SUITE_INITIALIZE(TestSuiteInitialize) REGISTER_GBALLOC_HL_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/azure_base64_ut/azure_base64_ut_pch.h b/tests/azure_base64_ut/azure_base64_ut_pch.h index 3ca6b052..cf7cd737 100644 --- a/tests/azure_base64_ut/azure_base64_ut_pch.h +++ b/tests/azure_base64_ut/azure_base64_ut_pch.h @@ -15,6 +15,8 @@ #include "umock_c/umock_c.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/buffer_ut/CMakeLists.txt b/tests/buffer_ut/CMakeLists.txt index d06f6402..cdad16b5 100644 --- a/tests/buffer_ut/CMakeLists.txt +++ b/tests/buffer_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName buffer_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/buffer_ut_pch.h" ) \ No newline at end of file diff --git a/tests/buffer_ut/buffer_ut.c b/tests/buffer_ut/buffer_ut.c index 4893df8a..5adc0fc1 100644 --- a/tests/buffer_ut/buffer_ut.c +++ b/tests/buffer_ut/buffer_ut.c @@ -31,7 +31,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - TEST_SUITE_INITIALIZE(setsBufferTempSize) + TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -44,7 +44,7 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) REGISTER_GLOBAL_MOCK_FAIL_RETURN(realloc, NULL); } - TEST_SUITE_CLEANUP(TestClassCleanup) + TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/buffer_ut/buffer_ut_pch.h b/tests/buffer_ut/buffer_ut_pch.h index cf352d7f..3787f1ac 100644 --- a/tests/buffer_ut/buffer_ut_pch.h +++ b/tests/buffer_ut/buffer_ut_pch.h @@ -17,6 +17,8 @@ #include "real_gballoc_ll.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/cancellation_token_ut/CMakeLists.txt b/tests/cancellation_token_ut/CMakeLists.txt index 51c20599..00ac72ca 100644 --- a/tests/cancellation_token_ut/CMakeLists.txt +++ b/tests/cancellation_token_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName cancellation_token_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals c_util c_util_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/cancellation_token_ut_pch.h" ) \ No newline at end of file diff --git a/tests/cancellation_token_ut/cancellation_token_ut.c b/tests/cancellation_token_ut/cancellation_token_ut.c index f41bb5e0..6e0cc6b3 100644 --- a/tests/cancellation_token_ut/cancellation_token_ut.c +++ b/tests/cancellation_token_ut/cancellation_token_ut.c @@ -20,7 +20,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -40,7 +40,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/tests/cancellation_token_ut/cancellation_token_ut_pch.h b/tests/cancellation_token_ut/cancellation_token_ut_pch.h index 4cd118c1..1f2d17f9 100644 --- a/tests/cancellation_token_ut/cancellation_token_ut_pch.h +++ b/tests/cancellation_token_ut/cancellation_token_ut_pch.h @@ -18,6 +18,8 @@ #include "umock_c/umocktypes_bool.h" #include "umock_c/umocktypes_stdint.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/channel_int/channel_int.c b/tests/channel_int/channel_int.c index 325b77bc..1d824fc0 100644 --- a/tests/channel_int/channel_int.c +++ b/tests/channel_int/channel_int.c @@ -18,6 +18,7 @@ #include "c_pal/threadapi.h" #include "c_pal/sync.h" #include "c_pal/srw_lock.h" +#include "c_pal/timed_test_suite.h" #include "c_util/rc_ptr.h" #include "c_util/channel.h" @@ -350,7 +351,7 @@ static int push_data(void* context) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { void* execution_engine_parameters = NULL; @@ -374,7 +375,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_IS_NOT_NULL(g.g_push_correlation_id); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { THANDLE_ASSIGN(RC_STRING)(&g.g_push_correlation_id, NULL); THANDLE_ASSIGN(RC_STRING)(&g.g_pull_correlation_id, NULL); diff --git a/tests/channel_ut/CMakeLists.txt b/tests/channel_ut/CMakeLists.txt index 7aa28b54..844d5cf1 100644 --- a/tests/channel_ut/CMakeLists.txt +++ b/tests/channel_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName channel_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util c_pal c_util_reals c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal c_util_reals c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/channel_ut_pch.h" ) \ No newline at end of file diff --git a/tests/channel_ut/channel_ut.c b/tests/channel_ut/channel_ut.c index 8eb0f4b3..fff818b7 100644 --- a/tests/channel_ut/channel_ut.c +++ b/tests/channel_ut/channel_ut.c @@ -272,7 +272,7 @@ static int hook_threadpool_schedule_work_do_nothing(THANDLE(THREADPOOL) threadpo } BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_bool_register_types(), "umocktypes_bool_register_types"); @@ -349,7 +349,7 @@ TEST_SUITE_INITIALIZE(suite_init) } } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { THANDLE_ASSIGN(REAL_THREADPOOL)(&g.g_threadpool, NULL); THANDLE_ASSIGN(real_RC_STRING)((THANDLE(RC_STRING)*) & g.g_push_correlation_id, NULL); diff --git a/tests/channel_ut/channel_ut_pch.h b/tests/channel_ut/channel_ut_pch.h index 7bb31552..bb31ac9c 100644 --- a/tests/channel_ut/channel_ut_pch.h +++ b/tests/channel_ut/channel_ut_pch.h @@ -22,6 +22,8 @@ #include "c_pal/execution_engine.h" #include "c_pal/interlocked.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/constbuffer_array_batcher_nv_ut/CMakeLists.txt b/tests/constbuffer_array_batcher_nv_ut/CMakeLists.txt index 0dfa80f3..b7ebdc0c 100644 --- a/tests/constbuffer_array_batcher_nv_ut/CMakeLists.txt +++ b/tests/constbuffer_array_batcher_nv_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName constbuffer_array_batcher_nv_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals c_util_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_array_batcher_nv_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut.c b/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut.c index 8ad82175..53feb205 100644 --- a/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut.c +++ b/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut.c @@ -13,7 +13,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result; @@ -41,7 +41,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(CONSTBUFFER_ARRAY_HANDLE, void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut_pch.h b/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut_pch.h index 819b75a4..4984e561 100644 --- a/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut_pch.h +++ b/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut_pch.h @@ -17,6 +17,8 @@ #include "umock_c/umocktypes_stdint.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_util/constbuffer.h" diff --git a/tests/constbuffer_array_int/CMakeLists.txt b/tests/constbuffer_array_int/CMakeLists.txt index 768f867b..9112f826 100644 --- a/tests/constbuffer_array_int/CMakeLists.txt +++ b/tests/constbuffer_array_int/CMakeLists.txt @@ -13,4 +13,4 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util) \ No newline at end of file +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util) \ No newline at end of file diff --git a/tests/constbuffer_array_int/constbuffer_array_int.c b/tests/constbuffer_array_int/constbuffer_array_int.c index a0327787..85eb62ce 100644 --- a/tests/constbuffer_array_int/constbuffer_array_int.c +++ b/tests/constbuffer_array_int/constbuffer_array_int.c @@ -12,18 +12,19 @@ #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" +#include "c_pal/timed_test_suite.h" #include "c_util/constbuffer.h" #include "c_util/constbuffer_array.h" BEGIN_TEST_SUITE(constbuffer_array_int) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { gballoc_hl_deinit(); } diff --git a/tests/constbuffer_array_splitter_ut/CMakeLists.txt b/tests/constbuffer_array_splitter_ut/CMakeLists.txt index f8c3fba0..a6a94720 100644 --- a/tests/constbuffer_array_splitter_ut/CMakeLists.txt +++ b/tests/constbuffer_array_splitter_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName constbuffer_array_splitter_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_array_splitter_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut.c b/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut.c index 2f1968d7..c498c6e0 100644 --- a/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut.c +++ b/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut.c @@ -68,7 +68,7 @@ static CONSTBUFFER_ARRAY_HANDLE generate_test_buffer_array(uint32_t buffer_count BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -101,7 +101,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(TARRAY(CONSTBUFFER_ARRAY_HANDLE), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut_pch.h b/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut_pch.h index 5def8c45..3b530847 100644 --- a/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut_pch.h +++ b/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut_pch.h @@ -18,6 +18,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/constbuffer_array_ut/CMakeLists.txt b/tests/constbuffer_array_ut/CMakeLists.txt index d9c6a649..e622dd0f 100644 --- a/tests/constbuffer_array_ut/CMakeLists.txt +++ b/tests/constbuffer_array_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName constbuffer_array_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals c_util_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_array_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_array_ut/constbuffer_array_ut.c b/tests/constbuffer_array_ut/constbuffer_array_ut.c index 3557de3f..b61b776b 100644 --- a/tests/constbuffer_array_ut/constbuffer_array_ut.c +++ b/tests/constbuffer_array_ut/constbuffer_array_ut.c @@ -262,7 +262,7 @@ static void validate_sorted_constbuffer_array(CONSTBUFFER_ARRAY_HANDLE constbuff BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result; @@ -292,7 +292,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_INTERLOCKED_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/constbuffer_array_ut/constbuffer_array_ut_pch.h b/tests/constbuffer_array_ut/constbuffer_array_ut_pch.h index 60a17b7d..07e4a90d 100644 --- a/tests/constbuffer_array_ut/constbuffer_array_ut_pch.h +++ b/tests/constbuffer_array_ut/constbuffer_array_ut_pch.h @@ -19,6 +19,8 @@ #include "umock_c/umocktypes_bool.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/constbuffer_thandle_int/CMakeLists.txt b/tests/constbuffer_thandle_int/CMakeLists.txt index 96d20b09..d6f01b79 100644 --- a/tests/constbuffer_thandle_int/CMakeLists.txt +++ b/tests/constbuffer_thandle_int/CMakeLists.txt @@ -13,4 +13,4 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util) +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util) diff --git a/tests/constbuffer_thandle_int/constbuffer_thandle_int.c b/tests/constbuffer_thandle_int/constbuffer_thandle_int.c index d3581a9d..2c7b6518 100644 --- a/tests/constbuffer_thandle_int/constbuffer_thandle_int.c +++ b/tests/constbuffer_thandle_int/constbuffer_thandle_int.c @@ -13,18 +13,19 @@ #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" #include "c_util/constbuffer_thandle.h" BEGIN_TEST_SUITE(constbuffer_thandle_int) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result = gballoc_hl_init(NULL, NULL); ASSERT_ARE_EQUAL(int, 0, result); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { gballoc_hl_deinit(); } diff --git a/tests/constbuffer_thandle_ut/CMakeLists.txt b/tests/constbuffer_thandle_ut/CMakeLists.txt index f6f043f9..73f66100 100644 --- a/tests/constbuffer_thandle_ut/CMakeLists.txt +++ b/tests/constbuffer_thandle_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.18) +cmake_minimum_required(VERSION 3.18) set(theseTestsName constbuffer_thandle_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_thandle_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_thandle_ut/constbuffer_thandle_ut.c b/tests/constbuffer_thandle_ut/constbuffer_thandle_ut.c index be48fe12..9c7ff0c1 100644 --- a/tests/constbuffer_thandle_ut/constbuffer_thandle_ut.c +++ b/tests/constbuffer_thandle_ut/constbuffer_thandle_ut.c @@ -62,7 +62,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(constbuffer_thandle_ut) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result = real_gballoc_hl_init(NULL, NULL); ASSERT_ARE_EQUAL(int, 0, result); @@ -85,7 +85,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GLOBAL_MOCK_HOOK(BUFFER_length, my_BUFFER_length); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); real_gballoc_hl_deinit(); diff --git a/tests/constbuffer_thandle_ut/constbuffer_thandle_ut_pch.h b/tests/constbuffer_thandle_ut/constbuffer_thandle_ut_pch.h index 77d5cd53..714ba121 100644 --- a/tests/constbuffer_thandle_ut/constbuffer_thandle_ut_pch.h +++ b/tests/constbuffer_thandle_ut/constbuffer_thandle_ut_pch.h @@ -25,6 +25,8 @@ #include "umock_c/umocktypes_charptr.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_util/buffer_.h" #include "c_pal/gballoc_hl.h" diff --git a/tests/constbuffer_ut/CMakeLists.txt b/tests/constbuffer_ut/CMakeLists.txt index 198bb547..c1545838 100644 --- a/tests/constbuffer_ut/CMakeLists.txt +++ b/tests/constbuffer_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName constbuffer_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_ut/constbuffer_ut.c b/tests/constbuffer_ut/constbuffer_ut.c index 512dd4cf..2478942f 100644 --- a/tests/constbuffer_ut/constbuffer_ut.c +++ b/tests/constbuffer_ut/constbuffer_ut.c @@ -92,7 +92,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - TEST_SUITE_INITIALIZE(setsBufferTempSize) + TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -110,7 +110,7 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) REGISTER_GLOBAL_MOCK_HOOK(test_alloc, test_alloc_impl); } - TEST_SUITE_CLEANUP(TestClassCleanup) + TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/constbuffer_ut/constbuffer_ut_pch.h b/tests/constbuffer_ut/constbuffer_ut_pch.h index b786dadc..3ac680f8 100644 --- a/tests/constbuffer_ut/constbuffer_ut_pch.h +++ b/tests/constbuffer_ut/constbuffer_ut_pch.h @@ -17,6 +17,8 @@ #include "macro_utils/macro_utils.h" #include "testrunnerswitcher.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_util/buffer_.h" #include "c_pal/gballoc_hl.h" diff --git a/tests/critical_section_ut/CMakeLists.txt b/tests/critical_section_ut/CMakeLists.txt index aed37b5e..e37aaaa3 100644 --- a/tests/critical_section_ut/CMakeLists.txt +++ b/tests/critical_section_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName critical_section_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/critical_section_ut_pch.h" ) \ No newline at end of file diff --git a/tests/critical_section_ut/critical_section_ut.c b/tests/critical_section_ut/critical_section_ut.c index 91061c70..e2633751 100644 --- a/tests/critical_section_ut/critical_section_ut.c +++ b/tests/critical_section_ut/critical_section_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "critical_section_ut_pch.h" @@ -14,13 +14,13 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - TEST_SUITE_INITIALIZE(test_suite_intialize) + TIMED_TEST_SUITE_INITIALIZE(test_suite_intialize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_stdint_register_types(), "umocktypes_stdint_register_types failed"); } - TEST_SUITE_CLEANUP(test_class_cleanup) + TIMED_TEST_SUITE_CLEANUP(test_class_cleanup) { umock_c_deinit(); } diff --git a/tests/critical_section_ut/critical_section_ut_pch.h b/tests/critical_section_ut/critical_section_ut_pch.h index 87003176..faf9d29e 100644 --- a/tests/critical_section_ut/critical_section_ut_pch.h +++ b/tests/critical_section_ut/critical_section_ut_pch.h @@ -15,6 +15,8 @@ #include "umock_c/umocktypes.h" #include "umock_c/umocktypes_stdint.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/sync.h" diff --git a/tests/doublylinkedlist_ut/CMakeLists.txt b/tests/doublylinkedlist_ut/CMakeLists.txt index 3155bcd9..f267fd05 100644 --- a/tests/doublylinkedlist_ut/CMakeLists.txt +++ b/tests/doublylinkedlist_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName doublylinkedlist_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/doublylinkedlist_ut_pch.h" ) \ No newline at end of file diff --git a/tests/doublylinkedlist_ut/doublylinkedlist_ut.c b/tests/doublylinkedlist_ut/doublylinkedlist_ut.c index fa8918ba..4193c0fa 100644 --- a/tests/doublylinkedlist_ut/doublylinkedlist_ut.c +++ b/tests/doublylinkedlist_ut/doublylinkedlist_ut.c @@ -57,7 +57,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(TestClassInitialize) +TIMED_TEST_SUITE_INITIALIZE(TestClassInitialize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init"); ASSERT_ARE_EQUAL(int, 0, umocktypes_charptr_register_types(), "umocktypes_charptr_register_types"); @@ -65,7 +65,7 @@ TEST_SUITE_INITIALIZE(TestClassInitialize) REGISTER_UMOCK_ALIAS_TYPE(PDLIST_ENTRY, void*); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); } diff --git a/tests/doublylinkedlist_ut/doublylinkedlist_ut_pch.h b/tests/doublylinkedlist_ut/doublylinkedlist_ut_pch.h index 30465faa..701195b9 100644 --- a/tests/doublylinkedlist_ut/doublylinkedlist_ut_pch.h +++ b/tests/doublylinkedlist_ut/doublylinkedlist_ut_pch.h @@ -11,6 +11,7 @@ #include "umock_c/umocktypes_charptr.h" #include "c_pal/containing_record.h" +#include "c_pal/timed_test_suite.h" #include "c_util/doublylinkedlist.h" #include "testrunnerswitcher.h" diff --git a/tests/external_command_helper_int/external_command_helper_int.c b/tests/external_command_helper_int/external_command_helper_int.c index 05288960..3afc49f9 100644 --- a/tests/external_command_helper_int/external_command_helper_int.c +++ b/tests/external_command_helper_int/external_command_helper_int.c @@ -12,6 +12,7 @@ #include "macro_utils/macro_utils.h" #include "c_pal/gballoc_hl.h" +#include "c_pal/timed_test_suite.h" #include "c_logging/logger.h" #include "c_util/rc_string_array.h" @@ -42,12 +43,12 @@ TEST_DEFINE_ENUM_TYPE(EXTERNAL_COMMAND_RESULT, EXTERNAL_COMMAND_RESULT_VALUES); BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { gballoc_hl_deinit(); } diff --git a/tests/external_command_helper_ut/CMakeLists.txt b/tests/external_command_helper_ut/CMakeLists.txt index 53e715eb..3695e816 100644 --- a/tests/external_command_helper_ut/CMakeLists.txt +++ b/tests/external_command_helper_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName external_command_helper_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal_reals c_util_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/external_command_helper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/external_command_helper_ut/external_command_helper_ut.c b/tests/external_command_helper_ut/external_command_helper_ut.c index 984d6e77..a932e335 100644 --- a/tests/external_command_helper_ut/external_command_helper_ut.c +++ b/tests/external_command_helper_ut/external_command_helper_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "external_command_helper_ut_pch.h" @@ -105,7 +105,7 @@ static void expect_store_lines(uint32_t line_count) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -129,7 +129,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(RC_STRING), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/external_command_helper_ut/external_command_helper_ut_pch.h b/tests/external_command_helper_ut/external_command_helper_ut_pch.h index eda02d8b..f058340c 100644 --- a/tests/external_command_helper_ut/external_command_helper_ut_pch.h +++ b/tests/external_command_helper_ut/external_command_helper_ut_pch.h @@ -22,6 +22,8 @@ #include "c_logging/logger.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/filename_helper_ut/CMakeLists.txt b/tests/filename_helper_ut/CMakeLists.txt index c533b8f6..8ccc7de3 100644 --- a/tests/filename_helper_ut/CMakeLists.txt +++ b/tests/filename_helper_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName filename_helper_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/filename_helper.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/filename_helper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/filename_helper_ut/filename_helper_ut.c b/tests/filename_helper_ut/filename_helper_ut.c index 26f0bf9a..0376aa2e 100644 --- a/tests/filename_helper_ut/filename_helper_ut.c +++ b/tests/filename_helper_ut/filename_helper_ut.c @@ -82,7 +82,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -97,7 +97,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_VALUE_TYPE(va_list, umockvalue_stringify_va_list, umockvalue_are_equal_va_list, umockvalue_copy_va_list, umockvalue_free_va_list); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/filename_helper_ut/filename_helper_ut_pch.h b/tests/filename_helper_ut/filename_helper_ut_pch.h index 7a7acad1..33e7fcc4 100644 --- a/tests/filename_helper_ut/filename_helper_ut_pch.h +++ b/tests/filename_helper_ut/filename_helper_ut_pch.h @@ -19,6 +19,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/flags_to_string_int/flags_to_string_int.c b/tests/flags_to_string_int/flags_to_string_int.c index d5339610..6ddf4b8a 100644 --- a/tests/flags_to_string_int/flags_to_string_int.c +++ b/tests/flags_to_string_int/flags_to_string_int.c @@ -7,6 +7,7 @@ #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" +#include "c_pal/timed_test_suite.h" #include "c_util/flags_to_string.h" @@ -15,11 +16,11 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { } diff --git a/tests/flags_to_string_ut/CMakeLists.txt b/tests/flags_to_string_ut/CMakeLists.txt index e8dce123..00c3d644 100644 --- a/tests/flags_to_string_ut/CMakeLists.txt +++ b/tests/flags_to_string_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName flags_to_string_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files flags_to_string_helper.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/flags_to_string_ut_pch.h" ) \ No newline at end of file diff --git a/tests/flags_to_string_ut/flags_to_string_ut.c b/tests/flags_to_string_ut/flags_to_string_ut.c index 03cd94fb..b7613010 100644 --- a/tests/flags_to_string_ut/flags_to_string_ut.c +++ b/tests/flags_to_string_ut/flags_to_string_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "flags_to_string_ut_pch.h" @@ -51,7 +51,7 @@ static void umockvalue_free_va_list(void* value) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -68,7 +68,7 @@ TEST_SUITE_INITIALIZE(suite_init) } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/flags_to_string_ut/flags_to_string_ut_pch.h b/tests/flags_to_string_ut/flags_to_string_ut_pch.h index 28916836..089b4d99 100644 --- a/tests/flags_to_string_ut/flags_to_string_ut_pch.h +++ b/tests/flags_to_string_ut/flags_to_string_ut_pch.h @@ -19,6 +19,8 @@ #include "umock_c/umocktypes_windows.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/string_utils.h" #include "c_pal/gballoc_hl.h" diff --git a/tests/for_each_in_folder_ut/CMakeLists.txt b/tests/for_each_in_folder_ut/CMakeLists.txt index a3696660..f4031fc9 100644 --- a/tests/for_each_in_folder_ut/CMakeLists.txt +++ b/tests/for_each_in_folder_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName for_each_in_folder_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal_reals c_util_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/for_each_in_folder_ut_pch.h" ) \ No newline at end of file diff --git a/tests/for_each_in_folder_ut/for_each_in_folder_ut.c b/tests/for_each_in_folder_ut/for_each_in_folder_ut.c index e164b27b..d0201b9b 100644 --- a/tests/for_each_in_folder_ut/for_each_in_folder_ut.c +++ b/tests/for_each_in_folder_ut/for_each_in_folder_ut.c @@ -74,7 +74,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -105,7 +105,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GLOBAL_MOCK_RETURNS(mocked_GetLastError, ERROR_SUCCESS, ERROR_ACCESS_DENIED); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/for_each_in_folder_ut/for_each_in_folder_ut_pch.h b/tests/for_each_in_folder_ut/for_each_in_folder_ut_pch.h index 8857a629..6c91bbb7 100644 --- a/tests/for_each_in_folder_ut/for_each_in_folder_ut_pch.h +++ b/tests/for_each_in_folder_ut/for_each_in_folder_ut_pch.h @@ -21,6 +21,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/for_each_in_sub_folder_ut/CMakeLists.txt b/tests/for_each_in_sub_folder_ut/CMakeLists.txt index 695b2a6c..a1e29f40 100644 --- a/tests/for_each_in_sub_folder_ut/CMakeLists.txt +++ b/tests/for_each_in_sub_folder_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName for_each_in_sub_folder_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal_reals c_util_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/for_each_in_sub_folder_ut_pch.h" ) \ No newline at end of file diff --git a/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut.c b/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut.c index 579a6eff..9f10a53f 100644 --- a/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut.c +++ b/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut.c @@ -237,7 +237,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -266,7 +266,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(va_list, void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut_pch.h b/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut_pch.h index 208b352e..becc88c4 100644 --- a/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut_pch.h +++ b/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut_pch.h @@ -21,6 +21,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/hash_ut/CMakeLists.txt b/tests/hash_ut/CMakeLists.txt index c7bf3095..fe93118d 100644 --- a/tests/hash_ut/CMakeLists.txt +++ b/tests/hash_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName hash_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ../../deps/smhasher/src/MurmurHash2.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/hash_ut_pch.h" ) \ No newline at end of file diff --git a/tests/hash_ut/hash_ut.c b/tests/hash_ut/hash_ut.c index 1c5aafb4..a3d9c515 100644 --- a/tests/hash_ut/hash_ut.c +++ b/tests/hash_ut/hash_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "hash_ut_pch.h" @@ -17,14 +17,14 @@ MOCK_FUNCTION_END(0x42) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init"); ASSERT_ARE_EQUAL(int, 0, umocktypes_stdint_register_types(), "umocktypes_stdint_register_types"); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); } diff --git a/tests/hash_ut/hash_ut_pch.h b/tests/hash_ut/hash_ut_pch.h index 503c4072..07269c1f 100644 --- a/tests/hash_ut/hash_ut_pch.h +++ b/tests/hash_ut/hash_ut_pch.h @@ -12,6 +12,7 @@ #include "macro_utils/macro_utils.h" #include "testrunnerswitcher.h" +#include "c_pal/timed_test_suite.h" #include "umock_c/umock_c.h" #include "umock_c/umocktypes_stdint.h" #include "umock_c/umocktypes.h" diff --git a/tests/map_ut/CMakeLists.txt b/tests/map_ut/CMakeLists.txt index fa918f2c..fb7cea27 100644 --- a/tests/map_ut/CMakeLists.txt +++ b/tests/map_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName map_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/map_ut_pch.h" ) \ No newline at end of file diff --git a/tests/map_ut/map_ut.c b/tests/map_ut/map_ut.c index f9237662..a0bbb1e2 100644 --- a/tests/map_ut/map_ut.c +++ b/tests/map_ut/map_ut.c @@ -77,7 +77,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - TEST_SUITE_INITIALIZE(TestClassInitialize) + TIMED_TEST_SUITE_INITIALIZE(TestClassInitialize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result; @@ -97,7 +97,7 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) REGISTER_GLOBAL_MOCK_HOOK(STRING_new_JSON, my_STRING_new_JSON); } - TEST_SUITE_CLEANUP(TestClassCleanup) + TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/map_ut/map_ut_pch.h b/tests/map_ut/map_ut_pch.h index 87672a91..f368697f 100644 --- a/tests/map_ut/map_ut_pch.h +++ b/tests/map_ut/map_ut_pch.h @@ -14,6 +14,8 @@ #include "umock_c/umock_c.h" #include "umock_c/umocktypes_charptr.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_util/strings.h" diff --git a/tests/memory_data_ut/CMakeLists.txt b/tests/memory_data_ut/CMakeLists.txt index 7d7cece2..e5f3e3f5 100644 --- a/tests/memory_data_ut/CMakeLists.txt +++ b/tests/memory_data_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName memory_data_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util c_pal c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/memory_data_ut_pch.h" ) \ No newline at end of file diff --git a/tests/memory_data_ut/memory_data_ut.c b/tests/memory_data_ut/memory_data_ut.c index bef7f289..eebbecab 100644 --- a/tests/memory_data_ut/memory_data_ut.c +++ b/tests/memory_data_ut/memory_data_ut.c @@ -11,14 +11,14 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(a) +TIMED_TEST_SUITE_INITIALIZE(a, TIMED_TEST_DEFAULT_TIMEOUT_MS) { umock_c_init(on_umock_c_error); (void)umocktypes_stdint_register_types(); } -TEST_SUITE_CLEANUP(b) +TIMED_TEST_SUITE_CLEANUP(b) { umock_c_deinit(); } diff --git a/tests/memory_data_ut/memory_data_ut_pch.h b/tests/memory_data_ut/memory_data_ut_pch.h index c221b657..926b8436 100644 --- a/tests/memory_data_ut/memory_data_ut_pch.h +++ b/tests/memory_data_ut/memory_data_ut_pch.h @@ -15,6 +15,7 @@ #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" +#include "c_pal/timed_test_suite.h" #include "c_util/uuid_string.h" diff --git a/tests/object_lifetime_tracker_ut/CMakeLists.txt b/tests/object_lifetime_tracker_ut/CMakeLists.txt index 9bc26846..732b972b 100644 --- a/tests/object_lifetime_tracker_ut/CMakeLists.txt +++ b/tests/object_lifetime_tracker_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName object_lifetime_tracker_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/object_lifetime_tracker.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util_reals c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/object_lifetime_tracker_ut_pch.h" ) \ No newline at end of file diff --git a/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut.c b/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut.c index bfa87a3e..a02112c7 100644 --- a/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut.c +++ b/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut.c @@ -173,7 +173,7 @@ static void setup_object_lifetime_tracker_destroy_all_objects_for_key_expectatio BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_bool_register_types(), "umocktypes_bool_register_types"); @@ -200,7 +200,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_TYPE(OBJECT_LIFETIME_TRACKER_ACT_RESULT, OBJECT_LIFETIME_TRACKER_ACT_RESULT); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); } diff --git a/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut_pch.h b/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut_pch.h index e89c426b..5b3c1044 100644 --- a/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut_pch.h +++ b/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut_pch.h @@ -18,6 +18,8 @@ #include "umock_c/umocktypes_stdint.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/paged_sparse_array_int/paged_sparse_array_int.c b/tests/paged_sparse_array_int/paged_sparse_array_int.c index f82c6ab4..9583cd12 100644 --- a/tests/paged_sparse_array_int/paged_sparse_array_int.c +++ b/tests/paged_sparse_array_int/paged_sparse_array_int.c @@ -15,6 +15,7 @@ #include "c_pal/interlocked.h" #include "c_pal/thandle.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/paged_sparse_array.h" @@ -68,14 +69,14 @@ TEST_DEFINE_ENUM_TYPE(PAGED_SPARSE_ARRAY_GET_RESULT, PAGED_SPARSE_ARRAY_GET_RESU BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { time_t seed = time(NULL); LogInfo("Test using random seed=%u", (unsigned int)seed); srand((unsigned int)seed); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } diff --git a/tests/paged_sparse_array_ut/CMakeLists.txt b/tests/paged_sparse_array_ut/CMakeLists.txt index 5e5b3ff9..dad93738 100644 --- a/tests/paged_sparse_array_ut/CMakeLists.txt +++ b/tests/paged_sparse_array_ut/CMakeLists.txt @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/paged_sparse_array.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals c_util c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/paged_sparse_array_ut_pch.h" ) diff --git a/tests/paged_sparse_array_ut/paged_sparse_array_ut.c b/tests/paged_sparse_array_ut/paged_sparse_array_ut.c index b112c568..24a68498 100644 --- a/tests/paged_sparse_array_ut/paged_sparse_array_ut.c +++ b/tests/paged_sparse_array_ut/paged_sparse_array_ut.c @@ -53,7 +53,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -62,7 +62,7 @@ TEST_SUITE_INITIALIZE(it_does_something) REGISTER_GBALLOC_HL_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/paged_sparse_array_ut/paged_sparse_array_ut_pch.h b/tests/paged_sparse_array_ut/paged_sparse_array_ut_pch.h index 81b9eb8a..c57cc88c 100644 --- a/tests/paged_sparse_array_ut/paged_sparse_array_ut_pch.h +++ b/tests/paged_sparse_array_ut/paged_sparse_array_ut_pch.h @@ -19,6 +19,8 @@ #include "umock_c/umock_c.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/rc_ptr_ut/CMakeLists.txt b/tests/rc_ptr_ut/CMakeLists.txt index 20e4924f..81bae635 100644 --- a/tests/rc_ptr_ut/CMakeLists.txt +++ b/tests/rc_ptr_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName rc_ptr_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util_reals c_pal_reals c_pal + ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals c_pal_reals c_pal ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_ptr_ut_pch.h" ) \ No newline at end of file diff --git a/tests/rc_ptr_ut/rc_ptr_ut.c b/tests/rc_ptr_ut/rc_ptr_ut.c index ad52e026..0b8513c4 100644 --- a/tests/rc_ptr_ut/rc_ptr_ut.c +++ b/tests/rc_ptr_ut/rc_ptr_ut.c @@ -27,7 +27,7 @@ static void check_free_func_called(void* context, void* ptr) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_bool_register_types(), "umocktypes_bool_register_types"); @@ -38,7 +38,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GLOBAL_MOCK_FAIL_RETURN(malloc, NULL); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); } diff --git a/tests/rc_ptr_ut/rc_ptr_ut_pch.h b/tests/rc_ptr_ut/rc_ptr_ut_pch.h index 4de339ef..e43b5145 100644 --- a/tests/rc_ptr_ut/rc_ptr_ut_pch.h +++ b/tests/rc_ptr_ut/rc_ptr_ut_pch.h @@ -20,6 +20,8 @@ #include "c_pal/interlocked.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/rc_string_array_ut/CMakeLists.txt b/tests/rc_string_array_ut/CMakeLists.txt index 4f8b9532..3b8d0bbe 100644 --- a/tests/rc_string_array_ut/CMakeLists.txt +++ b/tests/rc_string_array_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName rc_string_array_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/rc_string_array.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util_reals c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_util_reals c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_string_array_ut_pch.h" ) \ No newline at end of file diff --git a/tests/rc_string_array_ut/rc_string_array_ut.c b/tests/rc_string_array_ut/rc_string_array_ut.c index 1617944b..bfc696f2 100644 --- a/tests/rc_string_array_ut/rc_string_array_ut.c +++ b/tests/rc_string_array_ut/rc_string_array_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "rc_string_array_ut_pch.h" @@ -12,7 +12,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -27,7 +27,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(RC_STRING), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/rc_string_array_ut/rc_string_array_ut_pch.h b/tests/rc_string_array_ut/rc_string_array_ut_pch.h index ddf84076..e78e5257 100644 --- a/tests/rc_string_array_ut/rc_string_array_ut_pch.h +++ b/tests/rc_string_array_ut/rc_string_array_ut_pch.h @@ -19,6 +19,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/rc_string_ut/CMakeLists.txt b/tests/rc_string_ut/CMakeLists.txt index 87663810..61d66c18 100644 --- a/tests/rc_string_ut/CMakeLists.txt +++ b/tests/rc_string_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName rc_string_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/rc_string.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_string_ut_pch.h" ) \ No newline at end of file diff --git a/tests/rc_string_ut/rc_string_ut.c b/tests/rc_string_ut/rc_string_ut.c index b4afe2be..0cfe3136 100644 --- a/tests/rc_string_ut/rc_string_ut.c +++ b/tests/rc_string_ut/rc_string_ut.c @@ -77,7 +77,7 @@ MOCK_FUNCTION_END() BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_initialize) +TIMED_TEST_SUITE_INITIALIZE(suite_initialize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -97,7 +97,7 @@ TEST_SUITE_INITIALIZE(suite_initialize) REGISTER_GLOBAL_MOCK_FAIL_RETURN(malloc, NULL); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/rc_string_ut/rc_string_ut_pch.h b/tests/rc_string_ut/rc_string_ut_pch.h index ff1de471..d5bb63ac 100644 --- a/tests/rc_string_ut/rc_string_ut_pch.h +++ b/tests/rc_string_ut/rc_string_ut_pch.h @@ -20,6 +20,8 @@ #include "umock_c/umock_c_negative_tests.h" #include "umock_c/umocktypes_charptr.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/rc_string_utils_ut/CMakeLists.txt b/tests/rc_string_utils_ut/CMakeLists.txt index 3f2c74ee..d0fb3055 100644 --- a/tests/rc_string_utils_ut/CMakeLists.txt +++ b/tests/rc_string_utils_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName rc_string_utils_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/rc_string_utils.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util_reals c_pal_reals c_util_test_helpers +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_util_reals c_pal_reals c_util_test_helpers ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_string_utils_ut_pch.h" ) \ No newline at end of file diff --git a/tests/rc_string_utils_ut/rc_string_utils_ut.c b/tests/rc_string_utils_ut/rc_string_utils_ut.c index 96278e9a..116daf98 100644 --- a/tests/rc_string_utils_ut/rc_string_utils_ut.c +++ b/tests/rc_string_utils_ut/rc_string_utils_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "rc_string_utils_ut_pch.h" @@ -35,7 +35,7 @@ static void validate_split(RC_STRING_ARRAY* result, uint32_t count, const char** BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -53,7 +53,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(RC_STRING), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/rc_string_utils_ut/rc_string_utils_ut_pch.h b/tests/rc_string_utils_ut/rc_string_utils_ut_pch.h index 9c6e35d6..909fe761 100644 --- a/tests/rc_string_utils_ut/rc_string_utils_ut_pch.h +++ b/tests/rc_string_utils_ut/rc_string_utils_ut_pch.h @@ -17,6 +17,8 @@ #include "umock_c/umocktypes.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/reals_ut/CMakeLists.txt b/tests/reals_ut/CMakeLists.txt index 30447392..f954387c 100644 --- a/tests/reals_ut/CMakeLists.txt +++ b/tests/reals_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName c_util_reals_ut) @@ -7,7 +7,7 @@ set(${theseTestsName}_test_files ${theseTestsName}.c ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util c_util_reals c_pal +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_util_reals c_pal ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/c_util_reals_ut_pch.h" ) diff --git a/tests/reals_ut/c_util_reals_ut_pch.h b/tests/reals_ut/c_util_reals_ut_pch.h index 3481a464..7a29f850 100644 --- a/tests/reals_ut/c_util_reals_ut_pch.h +++ b/tests/reals_ut/c_util_reals_ut_pch.h @@ -7,6 +7,7 @@ #define C_UTIL_REALS_UT_PCH_H #include "testrunnerswitcher.h" +#include "c_pal/timed_test_suite.h" #define REGISTER_GLOBAL_MOCK_HOOK(original, real) \ (original == real) ? (void)0 : (void)1; diff --git a/tests/singlylinkedlist_ut/CMakeLists.txt b/tests/singlylinkedlist_ut/CMakeLists.txt index c5b0cbe3..7f7071f7 100644 --- a/tests/singlylinkedlist_ut/CMakeLists.txt +++ b/tests/singlylinkedlist_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName singlylinkedlist_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/singlylinkedlist_ut_pch.h" ) \ No newline at end of file diff --git a/tests/singlylinkedlist_ut/singlylinkedlist_ut.c b/tests/singlylinkedlist_ut/singlylinkedlist_ut.c index ffc78a9d..6451142c 100644 --- a/tests/singlylinkedlist_ut/singlylinkedlist_ut.c +++ b/tests/singlylinkedlist_ut/singlylinkedlist_ut.c @@ -19,7 +19,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result; @@ -33,7 +33,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(LIST_ITEM_HANDLE, void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); } diff --git a/tests/singlylinkedlist_ut/singlylinkedlist_ut_pch.h b/tests/singlylinkedlist_ut/singlylinkedlist_ut_pch.h index 4bda48e6..7c0bce03 100644 --- a/tests/singlylinkedlist_ut/singlylinkedlist_ut_pch.h +++ b/tests/singlylinkedlist_ut/singlylinkedlist_ut_pch.h @@ -16,6 +16,8 @@ #include "umock_c/umocktypes_bool.h" #include "c_util/singlylinkedlist.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS /* test match function mock */ diff --git a/tests/sliding_window_average_by_count_ut/CMakeLists.txt b/tests/sliding_window_average_by_count_ut/CMakeLists.txt index 6e6ac35f..48c6be4f 100644 --- a/tests/sliding_window_average_by_count_ut/CMakeLists.txt +++ b/tests/sliding_window_average_by_count_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName sliding_window_average_by_count_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/sliding_window_average_by_count.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals c_pal_umocktypes +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_pal_umocktypes ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/sliding_window_average_by_count_ut_pch.h" ) \ No newline at end of file diff --git a/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut.c b/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut.c index 4106d9c7..7b263b17 100644 --- a/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut.c +++ b/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut.c @@ -23,7 +23,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -41,7 +41,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GLOBAL_MOCK_FAIL_RETURN(malloc, NULL); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); real_gballoc_hl_deinit(); diff --git a/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut_pch.h b/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut_pch.h index b0f03dc5..98137d4c 100644 --- a/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut_pch.h +++ b/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut_pch.h @@ -19,6 +19,8 @@ #include "umock_c/umocktypes_stdint.h" #include "umock_c/umocktypes_struct.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/strings_ut/CMakeLists.txt b/tests/strings_ut/CMakeLists.txt index d363db31..0e147ff4 100644 --- a/tests/strings_ut/CMakeLists.txt +++ b/tests/strings_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName strings_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/strings_ut_pch.h" ) \ No newline at end of file diff --git a/tests/strings_ut/strings_ut.c b/tests/strings_ut/strings_ut.c index dd83d5b3..c9ba8d2b 100644 --- a/tests/strings_ut/strings_ut.c +++ b/tests/strings_ut/strings_ut.c @@ -46,7 +46,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - TEST_SUITE_INITIALIZE(setsBufferTempSize) + TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -60,7 +60,7 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) REGISTER_GLOBAL_MOCK_FAIL_RETURN(realloc, NULL); } - TEST_SUITE_CLEANUP(TestClassCleanup) + TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/strings_ut/strings_ut_pch.h b/tests/strings_ut/strings_ut_pch.h index 56ca6067..7ee3e839 100644 --- a/tests/strings_ut/strings_ut_pch.h +++ b/tests/strings_ut/strings_ut_pch.h @@ -15,6 +15,8 @@ #include "umock_c/umock_c_negative_tests.h" #include "umock_c/umocktypes_charptr.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" diff --git a/tests/sync_wrapper_ut/CMakeLists.txt b/tests/sync_wrapper_ut/CMakeLists.txt index 6c4543e4..1b3f0410 100644 --- a/tests/sync_wrapper_ut/CMakeLists.txt +++ b/tests/sync_wrapper_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName sync_wrapper_ut) @@ -19,6 +19,6 @@ set(${theseTestsName}_h_files test_ref_counted.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal_reals c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/sync_wrapper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/sync_wrapper_ut/sync_wrapper_ut.c b/tests/sync_wrapper_ut/sync_wrapper_ut.c index 43aa7af6..92c6c99a 100644 --- a/tests/sync_wrapper_ut/sync_wrapper_ut.c +++ b/tests/sync_wrapper_ut/sync_wrapper_ut.c @@ -111,7 +111,7 @@ INTERLOCKED_HL_RESULT my_InterlockedHL_WaitForValue(int32_t volatile_atomic* add BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -144,7 +144,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_TYPE(INTERLOCKED_HL_RESULT, INTERLOCKED_HL_RESULT); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/sync_wrapper_ut/sync_wrapper_ut_pch.h b/tests/sync_wrapper_ut/sync_wrapper_ut_pch.h index 873c023a..3a57da36 100644 --- a/tests/sync_wrapper_ut/sync_wrapper_ut_pch.h +++ b/tests/sync_wrapper_ut/sync_wrapper_ut_pch.h @@ -21,6 +21,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ #include "c_pal/sync.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to sync.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" diff --git a/tests/tarray_2_int/tarray_2_int.c b/tests/tarray_2_int/tarray_2_int.c index 829e0557..b599dc85 100644 --- a/tests/tarray_2_int/tarray_2_int.c +++ b/tests/tarray_2_int/tarray_2_int.c @@ -15,6 +15,7 @@ #include "c_pal/threadapi.h" #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" #include "c_util/tarray.h" TEST_DEFINE_ENUM_TYPE(THREADAPI_RESULT, THREADAPI_RESULT_VALUES); @@ -36,11 +37,11 @@ TARRAY_TYPE_DEFINE(CAT); BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(it_undoes_something) +TIMED_TEST_SUITE_CLEANUP(it_undoes_something) { } diff --git a/tests/tarray_int/CMakeLists.txt b/tests/tarray_int/CMakeLists.txt index 3cd10608..330e48e8 100644 --- a/tests/tarray_int/CMakeLists.txt +++ b/tests/tarray_int/CMakeLists.txt @@ -17,5 +17,5 @@ play_undo_op_types.h play_undo_op_tarray_types.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals c_util_reals tarray_int_reals) +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal_ll_reals c_pal c_pal_reals c_util_reals tarray_int_reals) diff --git a/tests/tarray_int/tarray_int.c b/tests/tarray_int/tarray_int.c index 62c0bcea..0ed99d47 100644 --- a/tests/tarray_int/tarray_int.c +++ b/tests/tarray_int/tarray_int.c @@ -16,6 +16,7 @@ #include "umock_c/umock_c.h" #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" +#include "c_pal/timed_test_suite.h" #include "play_undo_op_types.h" #include "play_undo_op_tarray_types.h" #include "umock_c/umock_c_DISABLE_MOCKS.h" // ============================== DISABLE_MOCKS @@ -34,7 +35,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -48,7 +49,7 @@ TEST_SUITE_INITIALIZE(it_does_something) REGISTER_TARRAY_UNDO_OP_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/tarray_ut/CMakeLists.txt b/tests/tarray_ut/CMakeLists.txt index ef2d9bda..4b25808e 100644 --- a/tests/tarray_ut/CMakeLists.txt +++ b/tests/tarray_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName tarray_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/tarray.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/tarray_ut_pch.h" ) diff --git a/tests/tarray_ut/tarray_ut.c b/tests/tarray_ut/tarray_ut.c index 4203c18c..d24eb983 100644 --- a/tests/tarray_ut/tarray_ut.c +++ b/tests/tarray_ut/tarray_ut.c @@ -43,7 +43,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -52,7 +52,7 @@ TEST_SUITE_INITIALIZE(it_does_something) REGISTER_GBALLOC_HL_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/tarray_ut/tarray_ut_pch.h b/tests/tarray_ut/tarray_ut_pch.h index 099c641d..8ae2dfde 100644 --- a/tests/tarray_ut/tarray_ut_pch.h +++ b/tests/tarray_ut/tarray_ut_pch.h @@ -17,6 +17,8 @@ #include "umock_c/umock_c.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/tcall_dispatcher_int/tcall_dispatcher_int.c b/tests/tcall_dispatcher_int/tcall_dispatcher_int.c index a6341b3f..ece951ca 100644 --- a/tests/tcall_dispatcher_int/tcall_dispatcher_int.c +++ b/tests/tcall_dispatcher_int/tcall_dispatcher_int.c @@ -14,6 +14,7 @@ #include "c_pal/interlocked.h" #include "c_pal/thandle.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/tcall_dispatcher.h" #include "tcall_dispatcher_foo.h" @@ -69,11 +70,11 @@ TEST_DEFINE_ENUM_TYPE(THREADAPI_RESULT, THREADAPI_RESULT_VALUES); BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } diff --git a/tests/tcall_dispatcher_ut/CMakeLists.txt b/tests/tcall_dispatcher_ut/CMakeLists.txt index 5fa68c4f..0f78cb51 100644 --- a/tests/tcall_dispatcher_ut/CMakeLists.txt +++ b/tests/tcall_dispatcher_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName tcall_dispatcher_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/tcall_dispatcher.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals c_util c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/tcall_dispatcher_ut_pch.h" ) \ No newline at end of file diff --git a/tests/tcall_dispatcher_ut/tcall_dispatcher_ut.c b/tests/tcall_dispatcher_ut/tcall_dispatcher_ut.c index bd8446ef..bc3cfa75 100644 --- a/tests/tcall_dispatcher_ut/tcall_dispatcher_ut.c +++ b/tests/tcall_dispatcher_ut/tcall_dispatcher_ut.c @@ -47,7 +47,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -67,7 +67,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/tests/tcall_dispatcher_ut/tcall_dispatcher_ut_pch.h b/tests/tcall_dispatcher_ut/tcall_dispatcher_ut_pch.h index dfc4135f..6b538cd5 100644 --- a/tests/tcall_dispatcher_ut/tcall_dispatcher_ut_pch.h +++ b/tests/tcall_dispatcher_ut/tcall_dispatcher_ut_pch.h @@ -20,6 +20,8 @@ #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" diff --git a/tests/thandle_tuple_array_ut/CMakeLists.txt b/tests/thandle_tuple_array_ut/CMakeLists.txt index 8c8db257..9a21fce3 100644 --- a/tests/thandle_tuple_array_ut/CMakeLists.txt +++ b/tests/thandle_tuple_array_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName thandle_tuple_array_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/thandle_tuple_array.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util_reals c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_util_reals c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/thandle_tuple_array_ut_pch.h" ) \ No newline at end of file diff --git a/tests/thandle_tuple_array_ut/thandle_tuple_array_ut.c b/tests/thandle_tuple_array_ut/thandle_tuple_array_ut.c index 175a599e..5a3ec809 100644 --- a/tests/thandle_tuple_array_ut/thandle_tuple_array_ut.c +++ b/tests/thandle_tuple_array_ut/thandle_tuple_array_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "thandle_tuple_array_ut_pch.h" @@ -27,7 +27,7 @@ DEFINE_THANDLE_TUPLE_ARRAY(TUPLE_THREE, TUPLE_THREE_FIELDS); BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -42,7 +42,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(RC_STRING), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/thandle_tuple_array_ut/thandle_tuple_array_ut_pch.h b/tests/thandle_tuple_array_ut/thandle_tuple_array_ut_pch.h index a13548dd..16678f8a 100644 --- a/tests/thandle_tuple_array_ut/thandle_tuple_array_ut_pch.h +++ b/tests/thandle_tuple_array_ut/thandle_tuple_array_ut_pch.h @@ -19,6 +19,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/thread_notifications_dispatcher_int/thread_notifications_dispatcher_int.c b/tests/thread_notifications_dispatcher_int/thread_notifications_dispatcher_int.c index f18d050b..2970a26e 100644 --- a/tests/thread_notifications_dispatcher_int/thread_notifications_dispatcher_int.c +++ b/tests/thread_notifications_dispatcher_int/thread_notifications_dispatcher_int.c @@ -16,6 +16,7 @@ #include "c_pal/interlocked.h" #include "c_pal/interlocked_hl.h" #include "c_pal/sync.h" +#include "c_pal/timed_test_suite.h" #include "thread_notifications_lackey_dll/thread_notifications_lackey_dll.h" #include "c_util/tcall_dispatcher_thread_notification_call.h" @@ -23,12 +24,12 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { gballoc_hl_deinit(); } diff --git a/tests/thread_notifications_dispatcher_ut/CMakeLists.txt b/tests/thread_notifications_dispatcher_ut/CMakeLists.txt index d8e48d30..a773092c 100644 --- a/tests/thread_notifications_dispatcher_ut/CMakeLists.txt +++ b/tests/thread_notifications_dispatcher_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName thread_notifications_dispatcher_ut) @@ -15,7 +15,7 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals c_util c_util_reals thread_notifications_lackey_dll + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals thread_notifications_lackey_dll ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/thread_notifications_dispatcher_ut_pch.h" ) diff --git a/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut.c b/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut.c index 9e241d30..9d9da061 100644 --- a/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut.c +++ b/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license.See LICENSE file in the project root for full license information. #include "thread_notifications_dispatcher_ut_pch.h" @@ -15,7 +15,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -33,7 +33,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut_pch.h b/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut_pch.h index dcbfa412..c26c91fa 100644 --- a/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut_pch.h +++ b/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut_pch.h @@ -17,6 +17,8 @@ #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" diff --git a/tests/thread_notifications_dispatcher_wo_init_ut/CMakeLists.txt b/tests/thread_notifications_dispatcher_wo_init_ut/CMakeLists.txt index 05e5945b..314f4cff 100644 --- a/tests/thread_notifications_dispatcher_wo_init_ut/CMakeLists.txt +++ b/tests/thread_notifications_dispatcher_wo_init_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName thread_notifications_dispatcher_wo_init_ut) @@ -15,7 +15,7 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal c_pal_reals c_util c_util_reals thread_notifications_lackey_dll + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals thread_notifications_lackey_dll ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/thread_notifications_dispatcher_wo_init_ut_pch.h" ) diff --git a/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut.c b/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut.c index bd6c8443..9e3e0756 100644 --- a/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut.c +++ b/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license.See LICENSE file in the project root for full license information. #include "thread_notifications_dispatcher_wo_init_ut_pch.h" @@ -15,7 +15,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -33,7 +33,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut_pch.h b/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut_pch.h index ef92e167..427f8adf 100644 --- a/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut_pch.h +++ b/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut_pch.h @@ -20,6 +20,8 @@ #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" diff --git a/tests/tp_worker_thread_int/CMakeLists.txt b/tests/tp_worker_thread_int/CMakeLists.txt index 22e25133..89f876ba 100644 --- a/tests/tp_worker_thread_int/CMakeLists.txt +++ b/tests/tp_worker_thread_int/CMakeLists.txt @@ -16,4 +16,4 @@ set(${theseTestsName}_cpp_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util c_util_test_helpers) +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util c_util_test_helpers) diff --git a/tests/tp_worker_thread_int/tp_worker_thread_int.c b/tests/tp_worker_thread_int/tp_worker_thread_int.c index 2b2ecf39..217a0569 100644 --- a/tests/tp_worker_thread_int/tp_worker_thread_int.c +++ b/tests/tp_worker_thread_int/tp_worker_thread_int.c @@ -14,6 +14,7 @@ #include "c_pal/interlocked_hl.h" #include "c_pal/sync.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/tp_worker_thread.h" @@ -52,11 +53,11 @@ static void worker_thread_func(void* context) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } diff --git a/tests/tp_worker_thread_ut/CMakeLists.txt b/tests/tp_worker_thread_ut/CMakeLists.txt index 2836d982..f5dda873 100644 --- a/tests/tp_worker_thread_ut/CMakeLists.txt +++ b/tests/tp_worker_thread_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName tp_worker_thread_ut) @@ -15,7 +15,7 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util_reals c_util_test_helpers c_pal_reals c_pal_umocktypes + ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals c_util_test_helpers c_pal_reals c_pal_umocktypes ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/tp_worker_thread_ut_pch.h" ) \ No newline at end of file diff --git a/tests/tp_worker_thread_ut/tp_worker_thread_ut.c b/tests/tp_worker_thread_ut/tp_worker_thread_ut.c index 5af6408f..b6141669 100644 --- a/tests/tp_worker_thread_ut/tp_worker_thread_ut.c +++ b/tests/tp_worker_thread_ut/tp_worker_thread_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. #include "tp_worker_thread_ut_pch.h" @@ -178,7 +178,7 @@ static void expect_destroy(void) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -209,7 +209,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(THREADPOOL_WORK_ITEM), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/tp_worker_thread_ut/tp_worker_thread_ut_pch.h b/tests/tp_worker_thread_ut/tp_worker_thread_ut_pch.h index 945930b3..26b5f192 100644 --- a/tests/tp_worker_thread_ut/tp_worker_thread_ut_pch.h +++ b/tests/tp_worker_thread_ut/tp_worker_thread_ut_pch.h @@ -19,6 +19,8 @@ #include "umock_c/umocktypes_charptr.h" #include "umock_c/umocktypes_stdint.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/two_d_array_int/two_d_array_int.c b/tests/two_d_array_int/two_d_array_int.c index 01da0026..d34c3d7e 100644 --- a/tests/two_d_array_int/two_d_array_int.c +++ b/tests/two_d_array_int/two_d_array_int.c @@ -14,6 +14,7 @@ #include "c_pal/interlocked.h" #include "c_pal/thandle.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/two_d_array.h" @@ -41,14 +42,14 @@ TEST_DEFINE_ENUM_TYPE(TWO_D_ARRAY_GET_ROW_RESULT, TWO_D_ARRAY_GET_ROW_RESULT_VAL BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { time_t seed = time(NULL); LogInfo("Test using random seed=%u", (unsigned int)seed); srand((unsigned int)seed); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } diff --git a/tests/two_d_array_ut/CMakeLists.txt b/tests/two_d_array_ut/CMakeLists.txt index e3e5b8dc..772d0c95 100644 --- a/tests/two_d_array_ut/CMakeLists.txt +++ b/tests/two_d_array_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName two_d_array_ut) @@ -13,6 +13,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/two_d_array.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals c_util c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/two_d_array_ut_pch.h" ) \ No newline at end of file diff --git a/tests/two_d_array_ut/two_d_array_ut.c b/tests/two_d_array_ut/two_d_array_ut.c index 42b83965..74f2e4d4 100644 --- a/tests/two_d_array_ut/two_d_array_ut.c +++ b/tests/two_d_array_ut/two_d_array_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "two_d_array_ut_pch.h" @@ -52,7 +52,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -61,7 +61,7 @@ TEST_SUITE_INITIALIZE(it_does_something) REGISTER_GBALLOC_HL_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/two_d_array_ut/two_d_array_ut_pch.h b/tests/two_d_array_ut/two_d_array_ut_pch.h index a3192996..4e3f865f 100644 --- a/tests/two_d_array_ut/two_d_array_ut_pch.h +++ b/tests/two_d_array_ut/two_d_array_ut_pch.h @@ -18,6 +18,8 @@ #include "umock_c/umock_c.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/uuid_string_ut/CMakeLists.txt b/tests/uuid_string_ut/CMakeLists.txt index c40aed5e..409f8fb4 100644 --- a/tests/uuid_string_ut/CMakeLists.txt +++ b/tests/uuid_string_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName uuid_string_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals c_pal_umocktypes +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_pal_umocktypes ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/uuid_string_ut_pch.h" ) diff --git a/tests/uuid_string_ut/uuid_string_ut.c b/tests/uuid_string_ut/uuid_string_ut.c index 85b6bc09..d70cba0f 100644 --- a/tests/uuid_string_ut/uuid_string_ut.c +++ b/tests/uuid_string_ut/uuid_string_ut.c @@ -15,7 +15,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -29,7 +29,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GBALLOC_HL_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/uuid_string_ut/uuid_string_ut_pch.h b/tests/uuid_string_ut/uuid_string_ut_pch.h index 35c56e37..1e527fcc 100644 --- a/tests/uuid_string_ut/uuid_string_ut_pch.h +++ b/tests/uuid_string_ut/uuid_string_ut_pch.h @@ -16,6 +16,8 @@ #include "umock_c/umocktypes_charptr.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/watchdog_int/watchdog_int.c b/tests/watchdog_int/watchdog_int.c index 24df3181..0b17a0f6 100644 --- a/tests/watchdog_int/watchdog_int.c +++ b/tests/watchdog_int/watchdog_int.c @@ -20,6 +20,7 @@ #include "c_pal/interlocked_hl.h" #include "c_util/rc_string.h" #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" #include "c_util/watchdog.h" #include "c_util/watchdog_threadpool.h" @@ -78,12 +79,12 @@ static int test_watchdog_reset_thread(void* context) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { gballoc_hl_deinit(); } diff --git a/tests/watchdog_threadpool_ut/CMakeLists.txt b/tests/watchdog_threadpool_ut/CMakeLists.txt index ede4654d..7763906b 100644 --- a/tests/watchdog_threadpool_ut/CMakeLists.txt +++ b/tests/watchdog_threadpool_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName watchdog_threadpool_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/watchdog_threadpool.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal_reals c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/watchdog_threadpool_ut_pch.h" ) \ No newline at end of file diff --git a/tests/watchdog_threadpool_ut/watchdog_threadpool_ut.c b/tests/watchdog_threadpool_ut/watchdog_threadpool_ut.c index f38d5df5..f832ba2c 100644 --- a/tests/watchdog_threadpool_ut/watchdog_threadpool_ut.c +++ b/tests/watchdog_threadpool_ut/watchdog_threadpool_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. #include "watchdog_threadpool_ut_pch.h" @@ -84,7 +84,7 @@ static void dispose_REAL_THREADPOOL_do_nothing(REAL_THREADPOOL* nothing) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -110,7 +110,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GLOBAL_MOCK_HOOK(THANDLE_INITIALIZE(THREADPOOL), THANDLE_INITIALIZE(REAL_THREADPOOL)); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { THANDLE_ASSIGN(REAL_THREADPOOL)(&g.test_threadpool, NULL); diff --git a/tests/watchdog_threadpool_ut/watchdog_threadpool_ut_pch.h b/tests/watchdog_threadpool_ut/watchdog_threadpool_ut_pch.h index a46ce103..0d903b67 100644 --- a/tests/watchdog_threadpool_ut/watchdog_threadpool_ut_pch.h +++ b/tests/watchdog_threadpool_ut/watchdog_threadpool_ut_pch.h @@ -16,6 +16,8 @@ #include "umock_c/umocktypes_stdint.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/watchdog_ut/CMakeLists.txt b/tests/watchdog_ut/CMakeLists.txt index eec5cb15..223b8683 100644 --- a/tests/watchdog_ut/CMakeLists.txt +++ b/tests/watchdog_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName watchdog_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/watchdog.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal_reals c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/watchdog_ut_pch.h" ) \ No newline at end of file diff --git a/tests/watchdog_ut/watchdog_ut.c b/tests/watchdog_ut/watchdog_ut.c index 00e88fbf..1bfc232d 100644 --- a/tests/watchdog_ut/watchdog_ut.c +++ b/tests/watchdog_ut/watchdog_ut.c @@ -66,7 +66,7 @@ static WATCHDOG_HANDLE do_start(THREADPOOL_WORK_FUNCTION* callback, void** conte BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -92,7 +92,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(SM_HANDLE, void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/watchdog_ut/watchdog_ut_pch.h b/tests/watchdog_ut/watchdog_ut_pch.h index ef8a43b6..aebfb953 100644 --- a/tests/watchdog_ut/watchdog_ut_pch.h +++ b/tests/watchdog_ut/watchdog_ut_pch.h @@ -18,6 +18,8 @@ #include "umock_c/umock_c_negative_tests.h" #include "umock_c/umocktypes_bool.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/tests/worker_thread_int/CMakeLists.txt b/tests/worker_thread_int/CMakeLists.txt index 071e2b02..68c9ba16 100644 --- a/tests/worker_thread_int/CMakeLists.txt +++ b/tests/worker_thread_int/CMakeLists.txt @@ -14,7 +14,7 @@ set(${theseTestsName}_h_files ../../inc/c_util/worker_thread.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util) +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util) if (WIN32) if("${building}" STREQUAL "exe") diff --git a/tests/worker_thread_int/worker_thread_int.c b/tests/worker_thread_int/worker_thread_int.c index 489535d5..2be2476d 100644 --- a/tests/worker_thread_int/worker_thread_int.c +++ b/tests/worker_thread_int/worker_thread_int.c @@ -11,6 +11,7 @@ #include "c_pal/interlocked_hl.h" #include "c_pal/sync.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/worker_thread.h" @@ -33,11 +34,11 @@ static void worker_thread_func(void* context) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } diff --git a/tests/worker_thread_ut/CMakeLists.txt b/tests/worker_thread_ut/CMakeLists.txt index e32bca59..31dc9b4a 100644 --- a/tests/worker_thread_ut/CMakeLists.txt +++ b/tests/worker_thread_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName worker_thread_ut) @@ -15,7 +15,7 @@ set(${theseTestsName}_h_files ../../inc/c_util/worker_thread.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS pal_interfaces c_pal_reals c_pal_reals c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal pal_interfaces c_pal_reals c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/worker_thread_ut_pch.h" ) diff --git a/tests/worker_thread_ut/worker_thread_ut.c b/tests/worker_thread_ut/worker_thread_ut.c index 0ccd22da..69614074 100644 --- a/tests/worker_thread_ut/worker_thread_ut.c +++ b/tests/worker_thread_ut/worker_thread_ut.c @@ -74,7 +74,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -100,7 +100,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_TYPE(WORKER_THREAD_SCHEDULE_PROCESS_RESULT, WORKER_THREAD_SCHEDULE_PROCESS_RESULT); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/worker_thread_ut/worker_thread_ut_pch.h b/tests/worker_thread_ut/worker_thread_ut_pch.h index 634bbecf..b0561f46 100644 --- a/tests/worker_thread_ut/worker_thread_ut_pch.h +++ b/tests/worker_thread_ut/worker_thread_ut_pch.h @@ -18,6 +18,8 @@ #include "umock_c/umock_c_negative_tests.h" #include "umock_c/umocktypes_stdint.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" diff --git a/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/CMakeLists.txt b/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/CMakeLists.txt index 7adeb295..8f6cdc83 100644 --- a/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/CMakeLists.txt +++ b/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Licensed under the MIT license. See LICENSE file in the project root for full license information. +#Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName thread_notif_lackey_dll_wo_init_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files include_directories(../../inc) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_logging_v2 c_pal c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_logging_v2 c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/thread_notif_lackey_dll_wo_init_ut_pch.h" ) \ No newline at end of file diff --git a/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut.c b/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut.c index 0780c47a..891cdc77 100644 --- a/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut.c +++ b/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut.c @@ -22,7 +22,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_windows_register_types(), "umocktypes_windows_register_types failed"); @@ -32,7 +32,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut_pch.h b/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut_pch.h index 1f9cc28a..06506f6b 100644 --- a/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut_pch.h +++ b/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut_pch.h @@ -23,6 +23,8 @@ #include "c_pal/interlocked.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/ps_util.h" diff --git a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/CMakeLists.txt b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/CMakeLists.txt index a98453dc..2194f4af 100644 --- a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/CMakeLists.txt +++ b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/CMakeLists.txt @@ -12,7 +12,7 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/thread_notifications_lackey_dll" ADDITIONAL_LIBS thread_notifications_lackey_dll) +build_test_artifacts(${theseTestsName} "tests/thread_notifications_lackey_dll" ADDITIONAL_LIBS c_pal thread_notifications_lackey_dll) if("${building}" STREQUAL "exe") copy_thread_notifications_lackey_outputs(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} $) diff --git a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/thread_notifications_lackey_dll_int.c b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/thread_notifications_lackey_dll_int.c index 4cf057f9..ef5438be 100644 --- a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/thread_notifications_lackey_dll_int.c +++ b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/thread_notifications_lackey_dll_int.c @@ -11,6 +11,7 @@ #include "c_pal/interlocked.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "thread_notifications_lackey_dll/thread_notifications_lackey_dll.h" @@ -24,11 +25,11 @@ MU_DEFINE_ENUM_STRINGS(THREAD_NOTIFICATIONS_LACKEY_DLL_REASON, THREAD_NOTIFICATI BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } diff --git a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/CMakeLists.txt b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/CMakeLists.txt index a2510283..f53ca06f 100644 --- a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/CMakeLists.txt +++ b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Licensed under the MIT license. See LICENSE file in the project root for full license information. +#Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName thread_notifications_lackey_dll_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files include_directories(../../inc) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_logging_v2 c_pal c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_logging_v2 c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/thread_notifications_lackey_dll_ut_pch.h" ) \ No newline at end of file diff --git a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut.c b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut.c index 4b4e6eb8..94958b43 100644 --- a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut.c +++ b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut.c @@ -31,7 +31,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_windows_register_types(), "umocktypes_windows_register_types failed"); @@ -42,7 +42,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut_pch.h b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut_pch.h index 07368213..19cb07bf 100644 --- a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut_pch.h +++ b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut_pch.h @@ -23,6 +23,8 @@ #include "c_pal/interlocked.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/ps_util.h" From 61747006ddd77298b1f40d3f844cbe5e0aa6deae Mon Sep 17 00:00:00 2001 From: Parth Aggarwal Date: Tue, 14 Apr 2026 22:21:32 -0700 Subject: [PATCH 02/17] Increase channel_int timeout to 20 minutes for valgrind Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/channel_int/channel_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/channel_int/channel_int.c b/tests/channel_int/channel_int.c index 1d824fc0..893180ee 100644 --- a/tests/channel_int/channel_int.c +++ b/tests/channel_int/channel_int.c @@ -351,7 +351,7 @@ static int push_data(void* context) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) +TIMED_TEST_SUITE_INITIALIZE(suite_init, 20 * 60 * 1000) { void* execution_engine_parameters = NULL; From 5fed06a2c63dcf7cab57658e5840ba7878b872c1 Mon Sep 17 00:00:00 2001 From: Parth Aggarwal Date: Tue, 14 Apr 2026 22:34:30 -0700 Subject: [PATCH 03/17] Add valgrind suppression for process watchdog timer_helper_thread leak The process watchdog uses POSIX timer_create(SIGEV_THREAD) which spawns a helper thread that valgrind flags as a possible memory leak during timer_delete cleanup. This is a known false positive. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- build_functions/c_util_suppressions.sup | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build_functions/c_util_suppressions.sup b/build_functions/c_util_suppressions.sup index 011144a2..1cfa49a9 100644 --- a/build_functions/c_util_suppressions.sup +++ b/build_functions/c_util_suppressions.sup @@ -6,6 +6,19 @@ fun:timer_create@@GLIBC_2.3.3 ... } +{ + + Memcheck:Leak + match-leak-kinds: possible + fun:calloc + ... + fun:allocate_dtv + fun:_dl_allocate_tls + fun:allocate_stack + fun:pthread_create@@GLIBC_* + fun:timer_helper_thread + fun:start_thread +} { Helgrind:Race From 62ea06e16f1a46fdc5f041f2a7ebbb05970108f8 Mon Sep 17 00:00:00 2001 From: Parth Aggarwal Date: Sun, 26 Apr 2026 02:45:24 -0700 Subject: [PATCH 04/17] Update deps: c-build-tools: Propagation script: resume, autofix, and ... (#625) Dependency updates: c-build-tools: - ceb07ab Propagation script: resume, autofix, and resilience improvements (https://github.com/Azure/c-build-tools/pull/382) --- build/devops_gated.yml | 2 +- deps/c-build-tools | 2 +- deps/c-logging | 2 +- deps/c-pal | 2 +- deps/c-testrunnerswitcher | 2 +- deps/ctest | 2 +- deps/macro-utils-c | 2 +- deps/umock-c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/devops_gated.yml b/build/devops_gated.yml index d942bd66..9383b5e0 100644 --- a/build/devops_gated.yml +++ b/build/devops_gated.yml @@ -22,7 +22,7 @@ resources: type: github name: azure/c-build-tools endpoint: github.com_azure - ref: c90552d4b060023f8ccd50adb6ff6fd3a720e3ac + ref: ceb07abdecda4a8c06ab4b8bb34c68ead93bcbbf jobs: - template: /pipeline_templates/build_all_flavors.yml@c_build_tools parameters: diff --git a/deps/c-build-tools b/deps/c-build-tools index c90552d4..ceb07abd 160000 --- a/deps/c-build-tools +++ b/deps/c-build-tools @@ -1 +1 @@ -Subproject commit c90552d4b060023f8ccd50adb6ff6fd3a720e3ac +Subproject commit ceb07abdecda4a8c06ab4b8bb34c68ead93bcbbf diff --git a/deps/c-logging b/deps/c-logging index 9f7d5967..8853b33f 160000 --- a/deps/c-logging +++ b/deps/c-logging @@ -1 +1 @@ -Subproject commit 9f7d5967a85b04acfc94587ae49a07b3a0b2a5b8 +Subproject commit 8853b33f5ae17f5cab44ac1f97464064b8c1201c diff --git a/deps/c-pal b/deps/c-pal index 3f80be4c..cec8b66a 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit 3f80be4c89da94e1c484ea74b1c2d940c546a101 +Subproject commit cec8b66acb0de5f39462c3cf376422371768fa89 diff --git a/deps/c-testrunnerswitcher b/deps/c-testrunnerswitcher index 498d324e..01339d80 160000 --- a/deps/c-testrunnerswitcher +++ b/deps/c-testrunnerswitcher @@ -1 +1 @@ -Subproject commit 498d324ee1928b978e5caf7dc2deb01af7849a43 +Subproject commit 01339d80713b363b325c3989a7acc6eda9f67e3b diff --git a/deps/ctest b/deps/ctest index 6aa29edf..570c2d52 160000 --- a/deps/ctest +++ b/deps/ctest @@ -1 +1 @@ -Subproject commit 6aa29edf6fbf12a15cff0d00f8818470e96b46d1 +Subproject commit 570c2d520417397676445b8156e38bcff6635ab0 diff --git a/deps/macro-utils-c b/deps/macro-utils-c index 4ee6528b..a24042c4 160000 --- a/deps/macro-utils-c +++ b/deps/macro-utils-c @@ -1 +1 @@ -Subproject commit 4ee6528be07cb3f7144c89177be87b1afa2fb258 +Subproject commit a24042c4def3228c2d8baa701236349f622059a7 diff --git a/deps/umock-c b/deps/umock-c index 7ac3a7ae..f7825e99 160000 --- a/deps/umock-c +++ b/deps/umock-c @@ -1 +1 @@ -Subproject commit 7ac3a7aea834a3872176a47277de0e6aa01270ca +Subproject commit f7825e998956995e83d250d508a5d3d2444ae20e From 299f18267c66df5a08a775ca3978e2a8f2346ee4 Mon Sep 17 00:00:00 2001 From: anporumb Date: Mon, 27 Apr 2026 06:31:52 -0700 Subject: [PATCH 05/17] Update deps: c-build-tools: CETCOMAT is not ARM64 compatible (https:/... (#626) Dependency updates: c-build-tools: - 6cc58a1 CETCOMAT is not ARM64 compatible (https://github.com/Azure/c-build-tools/pull/396) --- build/devops_gated.yml | 2 +- deps/c-build-tools | 2 +- deps/c-logging | 2 +- deps/c-pal | 2 +- deps/c-testrunnerswitcher | 2 +- deps/ctest | 2 +- deps/macro-utils-c | 2 +- deps/umock-c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/devops_gated.yml b/build/devops_gated.yml index 9383b5e0..824819e3 100644 --- a/build/devops_gated.yml +++ b/build/devops_gated.yml @@ -22,7 +22,7 @@ resources: type: github name: azure/c-build-tools endpoint: github.com_azure - ref: ceb07abdecda4a8c06ab4b8bb34c68ead93bcbbf + ref: e25364682cf2239eda040a4b22aa333e9c8096b2 jobs: - template: /pipeline_templates/build_all_flavors.yml@c_build_tools parameters: diff --git a/deps/c-build-tools b/deps/c-build-tools index ceb07abd..e2536468 160000 --- a/deps/c-build-tools +++ b/deps/c-build-tools @@ -1 +1 @@ -Subproject commit ceb07abdecda4a8c06ab4b8bb34c68ead93bcbbf +Subproject commit e25364682cf2239eda040a4b22aa333e9c8096b2 diff --git a/deps/c-logging b/deps/c-logging index 8853b33f..41193616 160000 --- a/deps/c-logging +++ b/deps/c-logging @@ -1 +1 @@ -Subproject commit 8853b33f5ae17f5cab44ac1f97464064b8c1201c +Subproject commit 411936166aa2f6c8335f12fe185f34804c955a48 diff --git a/deps/c-pal b/deps/c-pal index cec8b66a..f9bbda72 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit cec8b66acb0de5f39462c3cf376422371768fa89 +Subproject commit f9bbda7284514f67cfc614353be24a537b1da96d diff --git a/deps/c-testrunnerswitcher b/deps/c-testrunnerswitcher index 01339d80..8e443473 160000 --- a/deps/c-testrunnerswitcher +++ b/deps/c-testrunnerswitcher @@ -1 +1 @@ -Subproject commit 01339d80713b363b325c3989a7acc6eda9f67e3b +Subproject commit 8e44347308446c6599190381f265c42b4180daec diff --git a/deps/ctest b/deps/ctest index 570c2d52..66562c84 160000 --- a/deps/ctest +++ b/deps/ctest @@ -1 +1 @@ -Subproject commit 570c2d520417397676445b8156e38bcff6635ab0 +Subproject commit 66562c84334434a3884fb35db03923381ae77642 diff --git a/deps/macro-utils-c b/deps/macro-utils-c index a24042c4..a46f2195 160000 --- a/deps/macro-utils-c +++ b/deps/macro-utils-c @@ -1 +1 @@ -Subproject commit a24042c4def3228c2d8baa701236349f622059a7 +Subproject commit a46f219530097dcb25cc00a4f63aac21a0670d9c diff --git a/deps/umock-c b/deps/umock-c index f7825e99..86f9de09 160000 --- a/deps/umock-c +++ b/deps/umock-c @@ -1 +1 @@ -Subproject commit f7825e998956995e83d250d508a5d3d2444ae20e +Subproject commit 86f9de09ecfd6218551667d1ab6a620a498726a5 From 07a98a7352fe2c332cfd400d66c3a6ecd5f9667c Mon Sep 17 00:00:00 2001 From: Parth Aggarwal Date: Tue, 5 May 2026 18:54:13 -0700 Subject: [PATCH 06/17] Update deps: azure-messaging-ai-context, c-build-tools, macro-utils-c (#627) Dependency updates: azure-messaging-ai-context: - d2f97f3 [MrBot][doc] Add ADO PR cross-reference convention (https://github.com/Azure/azure-messaging-ai-context/pull/7) c-build-tools: - 4fecdb3 [MrBot] Add review-pr skill for PR code review workflow (https://github.com/Azure/c-build-tools/pull/326) - c752f1a Bump picomatch from 2.3.1 to 2.3.2 in /srs_extension (https://github.com/Azure/c-build-tools/pull/366) - c424b9e Bump flatted from 3.2.5 to 3.4.2 in /srs_extension (https://github.com/Azure/c-build-tools/pull/359) macro-utils-c: - 62b2d61 Increase nArithmetic from 2048 to 2560 (https://github.com/Azure/macro-utils-c/pull/358) --- build/devops_gated.yml | 2 +- deps/azure-messaging-ai-context | 2 +- deps/c-build-tools | 2 +- deps/c-logging | 2 +- deps/c-pal | 2 +- deps/c-testrunnerswitcher | 2 +- deps/ctest | 2 +- deps/macro-utils-c | 2 +- deps/umock-c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build/devops_gated.yml b/build/devops_gated.yml index 824819e3..45c42d80 100644 --- a/build/devops_gated.yml +++ b/build/devops_gated.yml @@ -22,7 +22,7 @@ resources: type: github name: azure/c-build-tools endpoint: github.com_azure - ref: e25364682cf2239eda040a4b22aa333e9c8096b2 + ref: 4fecdb3d34bd8e66798424b3e6164094da96e516 jobs: - template: /pipeline_templates/build_all_flavors.yml@c_build_tools parameters: diff --git a/deps/azure-messaging-ai-context b/deps/azure-messaging-ai-context index 1cd417e1..d2f97f3b 160000 --- a/deps/azure-messaging-ai-context +++ b/deps/azure-messaging-ai-context @@ -1 +1 @@ -Subproject commit 1cd417e108a56bb822aa5d561ce4f5394a453860 +Subproject commit d2f97f3bce3c30753d98351f9aaf4321cd96ee0e diff --git a/deps/c-build-tools b/deps/c-build-tools index e2536468..4fecdb3d 160000 --- a/deps/c-build-tools +++ b/deps/c-build-tools @@ -1 +1 @@ -Subproject commit e25364682cf2239eda040a4b22aa333e9c8096b2 +Subproject commit 4fecdb3d34bd8e66798424b3e6164094da96e516 diff --git a/deps/c-logging b/deps/c-logging index 41193616..19a9176e 160000 --- a/deps/c-logging +++ b/deps/c-logging @@ -1 +1 @@ -Subproject commit 411936166aa2f6c8335f12fe185f34804c955a48 +Subproject commit 19a9176ef0ebf2843235d34fa2414bdb7ad31c91 diff --git a/deps/c-pal b/deps/c-pal index f9bbda72..88b37ed0 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit f9bbda7284514f67cfc614353be24a537b1da96d +Subproject commit 88b37ed0547b9fe8cdc9aa5d90883dd4737dbf33 diff --git a/deps/c-testrunnerswitcher b/deps/c-testrunnerswitcher index 8e443473..68eb5bf2 160000 --- a/deps/c-testrunnerswitcher +++ b/deps/c-testrunnerswitcher @@ -1 +1 @@ -Subproject commit 8e44347308446c6599190381f265c42b4180daec +Subproject commit 68eb5bf2b4a2ccfb4f6d8d1b17e5d41a5b342f2c diff --git a/deps/ctest b/deps/ctest index 66562c84..65de769c 160000 --- a/deps/ctest +++ b/deps/ctest @@ -1 +1 @@ -Subproject commit 66562c84334434a3884fb35db03923381ae77642 +Subproject commit 65de769c4cca2d7b97174b5844d801183fceaaa4 diff --git a/deps/macro-utils-c b/deps/macro-utils-c index a46f2195..d7a4d4bf 160000 --- a/deps/macro-utils-c +++ b/deps/macro-utils-c @@ -1 +1 @@ -Subproject commit a46f219530097dcb25cc00a4f63aac21a0670d9c +Subproject commit d7a4d4bf79526a1921d774a7ab220727b1501b1f diff --git a/deps/umock-c b/deps/umock-c index 86f9de09..416054f2 160000 --- a/deps/umock-c +++ b/deps/umock-c @@ -1 +1 @@ -Subproject commit 86f9de09ecfd6218551667d1ab6a620a498726a5 +Subproject commit 416054f2d79410686369b5e993a9bbfa00b7eada From 8eac3d077da36b76001e23ea4be1c6a957478826 Mon Sep 17 00:00:00 2001 From: anporumb Date: Thu, 7 May 2026 06:36:34 -0700 Subject: [PATCH 07/17] Update deps: c-build-tools: [MrBot] Add MAX_STAGE param; make ARM64 a... (#630) Dependency updates: c-build-tools: - 97498a8 [MrBot] Add MAX_STAGE param; make ARM64 a blocking, test-running leg (https://github.com/Azure/c-build-tools/pull/402) --- build/devops_gated.yml | 2 +- deps/c-build-tools | 2 +- deps/c-logging | 2 +- deps/c-pal | 2 +- deps/c-testrunnerswitcher | 2 +- deps/ctest | 2 +- deps/macro-utils-c | 2 +- deps/umock-c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/devops_gated.yml b/build/devops_gated.yml index 45c42d80..98f52059 100644 --- a/build/devops_gated.yml +++ b/build/devops_gated.yml @@ -22,7 +22,7 @@ resources: type: github name: azure/c-build-tools endpoint: github.com_azure - ref: 4fecdb3d34bd8e66798424b3e6164094da96e516 + ref: 97498a8d13d80133277ddcca390b30f72818db6c jobs: - template: /pipeline_templates/build_all_flavors.yml@c_build_tools parameters: diff --git a/deps/c-build-tools b/deps/c-build-tools index 4fecdb3d..97498a8d 160000 --- a/deps/c-build-tools +++ b/deps/c-build-tools @@ -1 +1 @@ -Subproject commit 4fecdb3d34bd8e66798424b3e6164094da96e516 +Subproject commit 97498a8d13d80133277ddcca390b30f72818db6c diff --git a/deps/c-logging b/deps/c-logging index 19a9176e..7dcc4bf1 160000 --- a/deps/c-logging +++ b/deps/c-logging @@ -1 +1 @@ -Subproject commit 19a9176ef0ebf2843235d34fa2414bdb7ad31c91 +Subproject commit 7dcc4bf12029a6b1ca88de9e6d256b639ef248ca diff --git a/deps/c-pal b/deps/c-pal index 88b37ed0..a3e5c038 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit 88b37ed0547b9fe8cdc9aa5d90883dd4737dbf33 +Subproject commit a3e5c038cd8b6365ef57d236d95744a01b06f311 diff --git a/deps/c-testrunnerswitcher b/deps/c-testrunnerswitcher index 68eb5bf2..aabf9af7 160000 --- a/deps/c-testrunnerswitcher +++ b/deps/c-testrunnerswitcher @@ -1 +1 @@ -Subproject commit 68eb5bf2b4a2ccfb4f6d8d1b17e5d41a5b342f2c +Subproject commit aabf9af7aa18ffc30c309ee271275e56ca49ea2e diff --git a/deps/ctest b/deps/ctest index 65de769c..f033a7dc 160000 --- a/deps/ctest +++ b/deps/ctest @@ -1 +1 @@ -Subproject commit 65de769c4cca2d7b97174b5844d801183fceaaa4 +Subproject commit f033a7dccd6050fb9567201aadee331bde11159b diff --git a/deps/macro-utils-c b/deps/macro-utils-c index d7a4d4bf..5cd358f0 160000 --- a/deps/macro-utils-c +++ b/deps/macro-utils-c @@ -1 +1 @@ -Subproject commit d7a4d4bf79526a1921d774a7ab220727b1501b1f +Subproject commit 5cd358f023311b932cae63263f86254d0e141af5 diff --git a/deps/umock-c b/deps/umock-c index 416054f2..7f1190a7 160000 --- a/deps/umock-c +++ b/deps/umock-c @@ -1 +1 @@ -Subproject commit 416054f2d79410686369b5e993a9bbfa00b7eada +Subproject commit 7f1190a705eaf0cc72d2ba1d3f68246428dd8a11 From edd0cbd4a8cb0cb9c51db47ad15c8c1c8ca68f07 Mon Sep 17 00:00:00 2001 From: anporumb Date: Thu, 7 May 2026 13:45:52 -0700 Subject: [PATCH 08/17] Update deps: c-build-tools, c-logging, c-pal, c-testrunnerswitcher, c... (#632) Dependency updates: c-build-tools: - updated to latest c-logging: - updated to latest c-pal: - updated to latest c-testrunnerswitcher: - updated to latest c-util: - updated build/devops_gated.yml ctest: - updated to latest macro-utils-c: - updated to latest umock-c: - updated to latest --- build/devops_gated.yml | 2 +- deps/c-build-tools | 2 +- deps/c-logging | 2 +- deps/c-pal | 2 +- deps/c-testrunnerswitcher | 2 +- deps/ctest | 2 +- deps/macro-utils-c | 2 +- deps/umock-c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/devops_gated.yml b/build/devops_gated.yml index 98f52059..78f3bfca 100644 --- a/build/devops_gated.yml +++ b/build/devops_gated.yml @@ -22,7 +22,7 @@ resources: type: github name: azure/c-build-tools endpoint: github.com_azure - ref: 97498a8d13d80133277ddcca390b30f72818db6c + ref: 1500379b63315f692d25a18532c4b3553c5e3747 jobs: - template: /pipeline_templates/build_all_flavors.yml@c_build_tools parameters: diff --git a/deps/c-build-tools b/deps/c-build-tools index 97498a8d..1500379b 160000 --- a/deps/c-build-tools +++ b/deps/c-build-tools @@ -1 +1 @@ -Subproject commit 97498a8d13d80133277ddcca390b30f72818db6c +Subproject commit 1500379b63315f692d25a18532c4b3553c5e3747 diff --git a/deps/c-logging b/deps/c-logging index 7dcc4bf1..74835a90 160000 --- a/deps/c-logging +++ b/deps/c-logging @@ -1 +1 @@ -Subproject commit 7dcc4bf12029a6b1ca88de9e6d256b639ef248ca +Subproject commit 74835a9023fa441ad2f8fccd8875798da9dc5ddb diff --git a/deps/c-pal b/deps/c-pal index a3e5c038..baecb1b8 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit a3e5c038cd8b6365ef57d236d95744a01b06f311 +Subproject commit baecb1b85cbb22447b96190e4aea14b25fa38f2b diff --git a/deps/c-testrunnerswitcher b/deps/c-testrunnerswitcher index aabf9af7..4896b5e0 160000 --- a/deps/c-testrunnerswitcher +++ b/deps/c-testrunnerswitcher @@ -1 +1 @@ -Subproject commit aabf9af7aa18ffc30c309ee271275e56ca49ea2e +Subproject commit 4896b5e067e044138f731b5429e3fffaa36384cd diff --git a/deps/ctest b/deps/ctest index f033a7dc..b116358a 160000 --- a/deps/ctest +++ b/deps/ctest @@ -1 +1 @@ -Subproject commit f033a7dccd6050fb9567201aadee331bde11159b +Subproject commit b116358ad96443412d243307b5ec21b4163d371f diff --git a/deps/macro-utils-c b/deps/macro-utils-c index 5cd358f0..4734feb1 160000 --- a/deps/macro-utils-c +++ b/deps/macro-utils-c @@ -1 +1 @@ -Subproject commit 5cd358f023311b932cae63263f86254d0e141af5 +Subproject commit 4734feb13a8db0cf1af74c7ff32b8afba984c3fe diff --git a/deps/umock-c b/deps/umock-c index 7f1190a7..934fe596 160000 --- a/deps/umock-c +++ b/deps/umock-c @@ -1 +1 @@ -Subproject commit 7f1190a705eaf0cc72d2ba1d3f68246428dd8a11 +Subproject commit 934fe59681b99ec576e3dc7473774d56ef4b61fb From 5518493683c5da0535d1622711ee2d3f81fa11ad Mon Sep 17 00:00:00 2001 From: Parth Aggarwal Date: Thu, 14 May 2026 13:49:09 -0700 Subject: [PATCH 09/17] Fix channel_int_valgrind 'possibly lost' leaks: release channel ref before user callbacks (#631) * fix channel ref release * Address PR comments: drop extra newline, add why-comment, add regression test - src/channel.c: remove the stray blank line introduced before the if (channel_op->on_data_available_cb != NULL) block. Add a why-comment explaining the rationale for releasing channel_op->channel before the user callbacks fire (avoid keeping a transitive THREADPOOL ref alive past the point where the caller wakes and drops its own references). - tests/channel_int: add test_pull_and_cancel_with_sleep_in_callback, a regression test that uses a new callback variant which sleeps for 100ms after wake_by_address_single. The sleep widens the cleanup-after- callback race window so that, without the fix, the worker is guaranteed to still be holding channel_op->channel at the time the test thread proceeds with channel_close and channel-ref release. With the fix in place this is harmless because the channel reference was already dropped before the user callback fired. Verified locally: * pre-fix code + new test: valgrind reports 12 'possibly lost' blocks totaling 33,730 B - same signature as build 161912975. * post-fix code + new test: valgrind passes, 0 leaks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR #631 review comments - src/channel.c: remove the why-comment per @parth21999 (the move itself is self-explanatory; the rationale lives in the PR description). - tests/channel_int: condense the sleep-callback comment to 2 short lines per @parth21999. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add short why-comment explaining early channel ref release * update comment --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/channel.c | 6 ++- tests/channel_int/channel_int.c | 66 +++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/src/channel.c b/src/channel.c index f84fb978..6f74db28 100644 --- a/src/channel.c +++ b/src/channel.c @@ -265,6 +265,11 @@ static void execute_callbacks(void* context) sm_exec_end(channel_op->channel->sm); } + // Release the channel reference before the user callbacks. The callbacks wake the + // caller, which may then release its own channel reference. + // That should be enough to let the channel be destroyed if the user disposes it in the callback. + THANDLE_ASSIGN(CHANNEL)(&channel_op->channel, NULL); + if (channel_op->on_data_available_cb != NULL) { /*Codes_SRS_CHANNEL_43_145: [ execute_callbacks shall call the stored callback(s) with the result of the operation. ]*/ @@ -280,7 +285,6 @@ static void execute_callbacks(void* context) THANDLE_ASSIGN(RC_STRING)(&channel_op->pull_correlation_id, NULL); THANDLE_ASSIGN(RC_STRING)(&channel_op->push_correlation_id, NULL); THANDLE_ASSIGN(RC_PTR)(&channel_op->data, NULL); - THANDLE_ASSIGN(CHANNEL)(&channel_op->channel, NULL); // copy to local reference to avoid cutting the branch you are sitting on THANDLE(ASYNC_OP) temp = NULL; diff --git a/tests/channel_int/channel_int.c b/tests/channel_int/channel_int.c index 893180ee..abed8ecd 100644 --- a/tests/channel_int/channel_int.c +++ b/tests/channel_int/channel_int.c @@ -70,6 +70,23 @@ static int32_t push_abandoned = 0x0007; static volatile_atomic int32_t test_signal; static SRW_LOCK_HANDLE g_lock; +static void test_on_data_available_cb_cancelled_with_callback_sleep(void* context, CHANNEL_CALLBACK_RESULT result, THANDLE(RC_STRING) pull_correlation_id, THANDLE(RC_STRING) push_correlation_id, THANDLE(RC_PTR) data) +{ + ASSERT_IS_NOT_NULL(context); + ASSERT_ARE_EQUAL(CHANNEL_CALLBACK_RESULT, CHANNEL_CALLBACK_RESULT_CANCELLED, result); + ASSERT_IS_NOT_NULL(pull_correlation_id); + (void)push_correlation_id; // Cannot make any assertions about push_correlation_id. May or may not be valid. + ASSERT_IS_NULL(data); + + int32_t original_value = interlocked_exchange(context, pull_cancelled); + wake_by_address_single(context); + ASSERT_ARE_EQUAL(int32_t, TEST_ORIGINAL_VALUE, original_value); + + // Sleep widens the race: the test thread races ahead to channel_close while + // this callback (and execute_callbacks) is still running on the worker thread. + ThreadAPI_Sleep(100); +} + static void test_on_data_available_cb_cancelled(void* context, CHANNEL_CALLBACK_RESULT result, THANDLE(RC_STRING) pull_correlation_id, THANDLE(RC_STRING) push_correlation_id, THANDLE(RC_PTR) data) { ASSERT_IS_NOT_NULL(context); @@ -1082,4 +1099,53 @@ TEST_FUNCTION(channel_close_does_not_deadlock_if_called_from_pull_callback) THANDLE_ASSIGN(CHANNEL)(&channel, NULL); } +/* + * Regression test for the channel-ref-released-after-user-callback leak. + * + * The user callback wakes the test thread and then sleeps. While the callback is + * sleeping, the test thread proceeds with its cleanup: release async_op, call + * channel_close, release the channel reference. If channel_op->channel were + * released only after the user callback returns, the worker thread running this + * callback would still be holding a channel reference at the time the caller + * thinks it has fully torn down. At process exit the threadpool refcount could + * still be > 0, threadpool_dispose would never run, worker threads would not be + * joined, and valgrind would report pthread TLS and threadpool internals as + * "possibly lost". + * + * With the fix in place (channel ref released BEFORE the user callback fires), + * by the time this sleep runs the worker no longer holds any chain reaching the + * threadpool. The test thread's cleanup brings refcounts cleanly to zero, + * suite_cleanup releases its threadpool reference, and threadpool_dispose joins + * workers as expected. + */ +TEST_FUNCTION(test_pull_and_cancel_with_sleep_in_callback) +{ + /// arrange + THANDLE(CHANNEL) channel = channel_create(NULL, g.g_threadpool); + ASSERT_IS_NOT_NULL(channel); + ASSERT_ARE_EQUAL(int, 0, channel_open(channel)); + TRIGGER_CONTEXT* context = malloc(sizeof(TRIGGER_CONTEXT)); + ASSERT_IS_NOT_NULL(context); + (void)interlocked_exchange(&context->value, TEST_ORIGINAL_VALUE); + + /// act + THANDLE(ASYNC_OP) async_op = NULL; + CHANNEL_RESULT result = channel_pull(channel, g.g_pull_correlation_id, test_on_data_available_cb_cancelled_with_callback_sleep, (void*)&context->value, &async_op); + ASSERT_IS_NOT_NULL(async_op); + async_op_cancel(async_op); + + //wait for callback to start (it will wake us via wake_by_address_single, then sleep) + ASSERT_ARE_EQUAL(INTERLOCKED_HL_RESULT, INTERLOCKED_HL_OK, InterlockedHL_WaitForNotValue(&context->value, TEST_ORIGINAL_VALUE, UINT32_MAX)); + + /// assert + ASSERT_ARE_EQUAL(CHANNEL_RESULT, CHANNEL_RESULT_OK, result); + ASSERT_ARE_EQUAL(int32_t, pull_cancelled, interlocked_add(&context->value, 0)); + + // cleanup - this races with the still-sleeping callback on purpose + THANDLE_ASSIGN(ASYNC_OP)(&async_op, NULL); + channel_close(channel); + THANDLE_ASSIGN(CHANNEL)(&channel, NULL); + free(context); +} + END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) From a39a46bfc8e8d5845a05fc876a2a8fcbce05fc1f Mon Sep 17 00:00:00 2001 From: Navya Gaur <37734666+flash-sinx@users.noreply.github.com> Date: Fri, 15 May 2026 14:22:49 +0530 Subject: [PATCH 10/17] Update deps: c-build-tools, c-pal (#633) Dependency updates: c-build-tools: - 48198c5 [MrBot] Bump diff from 5.2.0 to 5.2.2 in /srs_extension (https://github.com/Azure/c-build-tools/pull/409) c-pal: - 6355add Fix socket handle leak: always call closesocket/close after shutdown in disconnect (https://github.com/Azure/c-pal/pull/561) - c95149d Fix InterlockedHL_WaitForXXX timeout accounting (https://github.com/Azure/c-pal/pull/587) Co-authored-by: Navya Gaur --- build/devops_gated.yml | 2 +- deps/c-build-tools | 2 +- deps/c-logging | 2 +- deps/c-pal | 2 +- deps/c-testrunnerswitcher | 2 +- deps/ctest | 2 +- deps/macro-utils-c | 2 +- deps/umock-c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/devops_gated.yml b/build/devops_gated.yml index 78f3bfca..ca2c2d40 100644 --- a/build/devops_gated.yml +++ b/build/devops_gated.yml @@ -22,7 +22,7 @@ resources: type: github name: azure/c-build-tools endpoint: github.com_azure - ref: 1500379b63315f692d25a18532c4b3553c5e3747 + ref: 48198c5277df0f6c9c2dd4fc7a7e8ee4665e84b8 jobs: - template: /pipeline_templates/build_all_flavors.yml@c_build_tools parameters: diff --git a/deps/c-build-tools b/deps/c-build-tools index 1500379b..48198c52 160000 --- a/deps/c-build-tools +++ b/deps/c-build-tools @@ -1 +1 @@ -Subproject commit 1500379b63315f692d25a18532c4b3553c5e3747 +Subproject commit 48198c5277df0f6c9c2dd4fc7a7e8ee4665e84b8 diff --git a/deps/c-logging b/deps/c-logging index 74835a90..a9e4f5a0 160000 --- a/deps/c-logging +++ b/deps/c-logging @@ -1 +1 @@ -Subproject commit 74835a9023fa441ad2f8fccd8875798da9dc5ddb +Subproject commit a9e4f5a0f3d22dfcb08927cf4f7a4c35b612a6e3 diff --git a/deps/c-pal b/deps/c-pal index baecb1b8..984af1c8 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit baecb1b85cbb22447b96190e4aea14b25fa38f2b +Subproject commit 984af1c8735a00ab4694f3b65fbbe251ab4c89b4 diff --git a/deps/c-testrunnerswitcher b/deps/c-testrunnerswitcher index 4896b5e0..1e04cb1f 160000 --- a/deps/c-testrunnerswitcher +++ b/deps/c-testrunnerswitcher @@ -1 +1 @@ -Subproject commit 4896b5e067e044138f731b5429e3fffaa36384cd +Subproject commit 1e04cb1fb230f77066d5e6bf063e6d1e5581367b diff --git a/deps/ctest b/deps/ctest index b116358a..02433349 160000 --- a/deps/ctest +++ b/deps/ctest @@ -1 +1 @@ -Subproject commit b116358ad96443412d243307b5ec21b4163d371f +Subproject commit 024333495a40f4307dc66ce4322c95100d657ba0 diff --git a/deps/macro-utils-c b/deps/macro-utils-c index 4734feb1..282d826a 160000 --- a/deps/macro-utils-c +++ b/deps/macro-utils-c @@ -1 +1 @@ -Subproject commit 4734feb13a8db0cf1af74c7ff32b8afba984c3fe +Subproject commit 282d826a33c1cdb5a23bae2806a1fa358e918252 diff --git a/deps/umock-c b/deps/umock-c index 934fe596..2983ade0 160000 --- a/deps/umock-c +++ b/deps/umock-c @@ -1 +1 @@ -Subproject commit 934fe59681b99ec576e3dc7473774d56ef4b61fb +Subproject commit 2983ade034bdd2507d82812705aa8aa962fa08d4 From 540e2ff94ea90705d8a6891988be34227699916d Mon Sep 17 00:00:00 2001 From: Parth Aggarwal Date: Fri, 15 May 2026 22:43:32 -0700 Subject: [PATCH 11/17] Update deps: c-build-tools: Configure Azure DevOps CLI defaults durin... (#634) Dependency updates: c-build-tools: - 184c20b Configure Azure DevOps CLI defaults during setup (https://github.com/Azure/c-build-tools/pull/407) --- build/devops_gated.yml | 2 +- deps/c-build-tools | 2 +- deps/c-logging | 2 +- deps/c-pal | 2 +- deps/c-testrunnerswitcher | 2 +- deps/ctest | 2 +- deps/macro-utils-c | 2 +- deps/umock-c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/devops_gated.yml b/build/devops_gated.yml index ca2c2d40..5a5c7806 100644 --- a/build/devops_gated.yml +++ b/build/devops_gated.yml @@ -22,7 +22,7 @@ resources: type: github name: azure/c-build-tools endpoint: github.com_azure - ref: 48198c5277df0f6c9c2dd4fc7a7e8ee4665e84b8 + ref: 184c20b2e5c6c1183d94c75c8a90dcb2024590e1 jobs: - template: /pipeline_templates/build_all_flavors.yml@c_build_tools parameters: diff --git a/deps/c-build-tools b/deps/c-build-tools index 48198c52..184c20b2 160000 --- a/deps/c-build-tools +++ b/deps/c-build-tools @@ -1 +1 @@ -Subproject commit 48198c5277df0f6c9c2dd4fc7a7e8ee4665e84b8 +Subproject commit 184c20b2e5c6c1183d94c75c8a90dcb2024590e1 diff --git a/deps/c-logging b/deps/c-logging index a9e4f5a0..46dae627 160000 --- a/deps/c-logging +++ b/deps/c-logging @@ -1 +1 @@ -Subproject commit a9e4f5a0f3d22dfcb08927cf4f7a4c35b612a6e3 +Subproject commit 46dae6276be1436a0adf3654a6ac0e48be96ac64 diff --git a/deps/c-pal b/deps/c-pal index 984af1c8..48d85e3c 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit 984af1c8735a00ab4694f3b65fbbe251ab4c89b4 +Subproject commit 48d85e3cae6197a8a9f872c1fd100f0287670ca7 diff --git a/deps/c-testrunnerswitcher b/deps/c-testrunnerswitcher index 1e04cb1f..8baef079 160000 --- a/deps/c-testrunnerswitcher +++ b/deps/c-testrunnerswitcher @@ -1 +1 @@ -Subproject commit 1e04cb1fb230f77066d5e6bf063e6d1e5581367b +Subproject commit 8baef079f73c3d957f8add20b1f5a51835b9cebd diff --git a/deps/ctest b/deps/ctest index 02433349..67960f72 160000 --- a/deps/ctest +++ b/deps/ctest @@ -1 +1 @@ -Subproject commit 024333495a40f4307dc66ce4322c95100d657ba0 +Subproject commit 67960f724f532890f49ee0a23e0032d32585b808 diff --git a/deps/macro-utils-c b/deps/macro-utils-c index 282d826a..9d3ea04d 160000 --- a/deps/macro-utils-c +++ b/deps/macro-utils-c @@ -1 +1 @@ -Subproject commit 282d826a33c1cdb5a23bae2806a1fa358e918252 +Subproject commit 9d3ea04dd316825bc969520c5da257810d487bda diff --git a/deps/umock-c b/deps/umock-c index 2983ade0..b657ab0e 160000 --- a/deps/umock-c +++ b/deps/umock-c @@ -1 +1 @@ -Subproject commit 2983ade034bdd2507d82812705aa8aa962fa08d4 +Subproject commit b657ab0e2ed211371db58dcd335cf690bd67b28d From 19c8b4aad200ce7926a55e370b48765dfa227f98 Mon Sep 17 00:00:00 2001 From: anporumb Date: Thu, 21 May 2026 10:35:46 -0700 Subject: [PATCH 12/17] Update deps: c-build-tools: changed pool (https://github.com/Azure/c-... (#635) Dependency updates: c-build-tools: - c021f80 changed pool (https://github.com/Azure/c-build-tools/pull/411) --- build/devops_gated.yml | 2 +- deps/c-build-tools | 2 +- deps/c-logging | 2 +- deps/c-pal | 2 +- deps/c-testrunnerswitcher | 2 +- deps/ctest | 2 +- deps/macro-utils-c | 2 +- deps/umock-c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/devops_gated.yml b/build/devops_gated.yml index 5a5c7806..c9d14d69 100644 --- a/build/devops_gated.yml +++ b/build/devops_gated.yml @@ -22,7 +22,7 @@ resources: type: github name: azure/c-build-tools endpoint: github.com_azure - ref: 184c20b2e5c6c1183d94c75c8a90dcb2024590e1 + ref: c021f8043dacf990ae9b28d77a6a7cf011003457 jobs: - template: /pipeline_templates/build_all_flavors.yml@c_build_tools parameters: diff --git a/deps/c-build-tools b/deps/c-build-tools index 184c20b2..c021f804 160000 --- a/deps/c-build-tools +++ b/deps/c-build-tools @@ -1 +1 @@ -Subproject commit 184c20b2e5c6c1183d94c75c8a90dcb2024590e1 +Subproject commit c021f8043dacf990ae9b28d77a6a7cf011003457 diff --git a/deps/c-logging b/deps/c-logging index 46dae627..b9d3649b 160000 --- a/deps/c-logging +++ b/deps/c-logging @@ -1 +1 @@ -Subproject commit 46dae6276be1436a0adf3654a6ac0e48be96ac64 +Subproject commit b9d3649bb46f16d15fe850c520ae305c03c95881 diff --git a/deps/c-pal b/deps/c-pal index 48d85e3c..bc3a8842 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit 48d85e3cae6197a8a9f872c1fd100f0287670ca7 +Subproject commit bc3a884251f9f29fee3ce111055973750dc24a02 diff --git a/deps/c-testrunnerswitcher b/deps/c-testrunnerswitcher index 8baef079..66e3d3ef 160000 --- a/deps/c-testrunnerswitcher +++ b/deps/c-testrunnerswitcher @@ -1 +1 @@ -Subproject commit 8baef079f73c3d957f8add20b1f5a51835b9cebd +Subproject commit 66e3d3ef8e5378b8ade764451aee79a3a4e5b79b diff --git a/deps/ctest b/deps/ctest index 67960f72..3955a0c4 160000 --- a/deps/ctest +++ b/deps/ctest @@ -1 +1 @@ -Subproject commit 67960f724f532890f49ee0a23e0032d32585b808 +Subproject commit 3955a0c4946c74ecbc393e21b56708f423c97324 diff --git a/deps/macro-utils-c b/deps/macro-utils-c index 9d3ea04d..99edf47e 160000 --- a/deps/macro-utils-c +++ b/deps/macro-utils-c @@ -1 +1 @@ -Subproject commit 9d3ea04dd316825bc969520c5da257810d487bda +Subproject commit 99edf47e6ad51294f5dd1c15e0a3aa58155b9f8d diff --git a/deps/umock-c b/deps/umock-c index b657ab0e..463e3284 160000 --- a/deps/umock-c +++ b/deps/umock-c @@ -1 +1 @@ -Subproject commit b657ab0e2ed211371db58dcd335cf690bd67b28d +Subproject commit 463e3284dbca34082451b07bf84b7263de1c6f68 From c45ded4f4cd2c54b771f9b9795d5dabdbf2a0980 Mon Sep 17 00:00:00 2001 From: anporumb Date: Sat, 30 May 2026 16:52:16 -0700 Subject: [PATCH 13/17] Update deps: c-build-tools: Clean up discover_native_tools output and... (#636) Dependency updates: c-build-tools: - e5e02dd Clean up discover_native_tools output and report agent version/arch (https://github.com/Azure/c-build-tools/pull/414) - 21b23fd [MrBot] Add C# MSTest AAA validation (https://github.com/Azure/c-build-tools/pull/413) - 57b4388 Fix MSB3836 binding redirect warning for System.Collections.Immutable (https://github.com/Azure/c-build-tools/pull/412) --- build/devops_gated.yml | 2 +- deps/c-build-tools | 2 +- deps/c-logging | 2 +- deps/c-pal | 2 +- deps/c-testrunnerswitcher | 2 +- deps/ctest | 2 +- deps/macro-utils-c | 2 +- deps/umock-c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/devops_gated.yml b/build/devops_gated.yml index c9d14d69..59ad4d49 100644 --- a/build/devops_gated.yml +++ b/build/devops_gated.yml @@ -22,7 +22,7 @@ resources: type: github name: azure/c-build-tools endpoint: github.com_azure - ref: c021f8043dacf990ae9b28d77a6a7cf011003457 + ref: e5e02dd2ad4b7902bc9cddd2c4a97f41fb1060b7 jobs: - template: /pipeline_templates/build_all_flavors.yml@c_build_tools parameters: diff --git a/deps/c-build-tools b/deps/c-build-tools index c021f804..e5e02dd2 160000 --- a/deps/c-build-tools +++ b/deps/c-build-tools @@ -1 +1 @@ -Subproject commit c021f8043dacf990ae9b28d77a6a7cf011003457 +Subproject commit e5e02dd2ad4b7902bc9cddd2c4a97f41fb1060b7 diff --git a/deps/c-logging b/deps/c-logging index b9d3649b..05b151a9 160000 --- a/deps/c-logging +++ b/deps/c-logging @@ -1 +1 @@ -Subproject commit b9d3649bb46f16d15fe850c520ae305c03c95881 +Subproject commit 05b151a9e905ec6afb7ec815b275beef011f556d diff --git a/deps/c-pal b/deps/c-pal index bc3a8842..cfa670e5 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit bc3a884251f9f29fee3ce111055973750dc24a02 +Subproject commit cfa670e5994758a078715292812b4d8b1278646b diff --git a/deps/c-testrunnerswitcher b/deps/c-testrunnerswitcher index 66e3d3ef..6256775b 160000 --- a/deps/c-testrunnerswitcher +++ b/deps/c-testrunnerswitcher @@ -1 +1 @@ -Subproject commit 66e3d3ef8e5378b8ade764451aee79a3a4e5b79b +Subproject commit 6256775b2bc51e0a2cfe3bc8fa49df222ecf89a7 diff --git a/deps/ctest b/deps/ctest index 3955a0c4..28dc98fd 160000 --- a/deps/ctest +++ b/deps/ctest @@ -1 +1 @@ -Subproject commit 3955a0c4946c74ecbc393e21b56708f423c97324 +Subproject commit 28dc98fdf01567628ccba79879e49d162f015998 diff --git a/deps/macro-utils-c b/deps/macro-utils-c index 99edf47e..baf47e7f 160000 --- a/deps/macro-utils-c +++ b/deps/macro-utils-c @@ -1 +1 @@ -Subproject commit 99edf47e6ad51294f5dd1c15e0a3aa58155b9f8d +Subproject commit baf47e7fe92d47b8e4547ac4ba1c93a50ddc57b4 diff --git a/deps/umock-c b/deps/umock-c index 463e3284..190a5a35 160000 --- a/deps/umock-c +++ b/deps/umock-c @@ -1 +1 @@ -Subproject commit 463e3284dbca34082451b07bf84b7263de1c6f68 +Subproject commit 190a5a35bc84169cb97ccc77dafa0c043f1ceca1 From 66da4759250a1ed5d8bef9c649e9a2c98ab4ed88 Mon Sep 17 00:00:00 2001 From: anporumb Date: Mon, 1 Jun 2026 16:24:00 -0700 Subject: [PATCH 14/17] Update deps: macro-utils-c: Mirror infra-generated test layout in mac... (#637) Dependency updates: macro-utils-c: - dadf1dd Mirror infra-generated test layout in macro-utils-c (https://github.com/Azure/macro-utils-c/pull/368) --- build/devops_gated.yml | 2 +- deps/c-build-tools | 2 +- deps/c-logging | 2 +- deps/c-pal | 2 +- deps/c-testrunnerswitcher | 2 +- deps/ctest | 2 +- deps/macro-utils-c | 2 +- deps/umock-c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/devops_gated.yml b/build/devops_gated.yml index 59ad4d49..c3aec885 100644 --- a/build/devops_gated.yml +++ b/build/devops_gated.yml @@ -22,7 +22,7 @@ resources: type: github name: azure/c-build-tools endpoint: github.com_azure - ref: e5e02dd2ad4b7902bc9cddd2c4a97f41fb1060b7 + ref: 612568af16b25422d82b634d267bd4b7d6ab5dd1 jobs: - template: /pipeline_templates/build_all_flavors.yml@c_build_tools parameters: diff --git a/deps/c-build-tools b/deps/c-build-tools index e5e02dd2..612568af 160000 --- a/deps/c-build-tools +++ b/deps/c-build-tools @@ -1 +1 @@ -Subproject commit e5e02dd2ad4b7902bc9cddd2c4a97f41fb1060b7 +Subproject commit 612568af16b25422d82b634d267bd4b7d6ab5dd1 diff --git a/deps/c-logging b/deps/c-logging index 05b151a9..3c21b93d 160000 --- a/deps/c-logging +++ b/deps/c-logging @@ -1 +1 @@ -Subproject commit 05b151a9e905ec6afb7ec815b275beef011f556d +Subproject commit 3c21b93db5205f0f37e57ee8523f0f32dae93aed diff --git a/deps/c-pal b/deps/c-pal index cfa670e5..ae106f87 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit cfa670e5994758a078715292812b4d8b1278646b +Subproject commit ae106f872e3a5bf49317fe1548b85c55af440aef diff --git a/deps/c-testrunnerswitcher b/deps/c-testrunnerswitcher index 6256775b..63618f09 160000 --- a/deps/c-testrunnerswitcher +++ b/deps/c-testrunnerswitcher @@ -1 +1 @@ -Subproject commit 6256775b2bc51e0a2cfe3bc8fa49df222ecf89a7 +Subproject commit 63618f09d2747bdabf69430a74dbfb9fda858c87 diff --git a/deps/ctest b/deps/ctest index 28dc98fd..3f90e39a 160000 --- a/deps/ctest +++ b/deps/ctest @@ -1 +1 @@ -Subproject commit 28dc98fdf01567628ccba79879e49d162f015998 +Subproject commit 3f90e39a592f55d84dc2d23f8f7a95a85220f36a diff --git a/deps/macro-utils-c b/deps/macro-utils-c index baf47e7f..9fb73050 160000 --- a/deps/macro-utils-c +++ b/deps/macro-utils-c @@ -1 +1 @@ -Subproject commit baf47e7fe92d47b8e4547ac4ba1c93a50ddc57b4 +Subproject commit 9fb73050bb6c6f3beea173120213d8793027868f diff --git a/deps/umock-c b/deps/umock-c index 190a5a35..c3f34a0e 160000 --- a/deps/umock-c +++ b/deps/umock-c @@ -1 +1 @@ -Subproject commit 190a5a35bc84169cb97ccc77dafa0c043f1ceca1 +Subproject commit c3f34a0efde814ffc7e784adad7adc59cce901be From 50010bed7de15209626b26cb084f5280f612b47a Mon Sep 17 00:00:00 2001 From: Parth Aggarwal Date: Fri, 5 Jun 2026 13:08:43 -0700 Subject: [PATCH 15/17] Update deps: azure-messaging-ai-context, c-build-tools, c-testrunners... (#638) Dependency updates: azure-messaging-ai-context: - 94278e4 [MrBot][AI] Tell address-pr-comments skill to stop leaving PR-narration comments in code (https://github.com/Azure/azure-messaging-ai-context/pull/9) c-build-tools: - d1a97aa Support consumers with internal-ADO submodules and C# projects with private NuGet feeds (https://github.com/Azure/c-build-tools/pull/405) c-testrunnerswitcher: - 658c3c6 [MrBot] Add guidance: prefer enum type in ASSERT_ARE_EQUAL (https://github.com/Azure/c-testrunnerswitcher/pull/332) macro-utils-c: - c016a7f ZZZ (https://github.com/Azure/macro-utils-c/pull/370) umock-c: - 037d2c1 have ALL max_stage fro ARM64 (https://github.com/Azure/umock-c/pull/488) --- build/devops_gated.yml | 2 +- deps/azure-messaging-ai-context | 2 +- deps/c-build-tools | 2 +- deps/c-logging | 2 +- deps/c-pal | 2 +- deps/c-testrunnerswitcher | 2 +- deps/ctest | 2 +- deps/macro-utils-c | 2 +- deps/umock-c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build/devops_gated.yml b/build/devops_gated.yml index c3aec885..253f7c07 100644 --- a/build/devops_gated.yml +++ b/build/devops_gated.yml @@ -22,7 +22,7 @@ resources: type: github name: azure/c-build-tools endpoint: github.com_azure - ref: 612568af16b25422d82b634d267bd4b7d6ab5dd1 + ref: d1a97aad0f80ea9534f20be57292aa5106917070 jobs: - template: /pipeline_templates/build_all_flavors.yml@c_build_tools parameters: diff --git a/deps/azure-messaging-ai-context b/deps/azure-messaging-ai-context index d2f97f3b..94278e48 160000 --- a/deps/azure-messaging-ai-context +++ b/deps/azure-messaging-ai-context @@ -1 +1 @@ -Subproject commit d2f97f3bce3c30753d98351f9aaf4321cd96ee0e +Subproject commit 94278e488fe1abc863dca0eb9cb541e93af1736a diff --git a/deps/c-build-tools b/deps/c-build-tools index 612568af..d1a97aad 160000 --- a/deps/c-build-tools +++ b/deps/c-build-tools @@ -1 +1 @@ -Subproject commit 612568af16b25422d82b634d267bd4b7d6ab5dd1 +Subproject commit d1a97aad0f80ea9534f20be57292aa5106917070 diff --git a/deps/c-logging b/deps/c-logging index 3c21b93d..cc7fcad8 160000 --- a/deps/c-logging +++ b/deps/c-logging @@ -1 +1 @@ -Subproject commit 3c21b93db5205f0f37e57ee8523f0f32dae93aed +Subproject commit cc7fcad805776aa2f0e9a1e816852fa9217789df diff --git a/deps/c-pal b/deps/c-pal index ae106f87..b2293987 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit ae106f872e3a5bf49317fe1548b85c55af440aef +Subproject commit b2293987df2c58fada0cf333011afd61665311b8 diff --git a/deps/c-testrunnerswitcher b/deps/c-testrunnerswitcher index 63618f09..43a68745 160000 --- a/deps/c-testrunnerswitcher +++ b/deps/c-testrunnerswitcher @@ -1 +1 @@ -Subproject commit 63618f09d2747bdabf69430a74dbfb9fda858c87 +Subproject commit 43a6874527b1c8b9e2c61b945a761db84650899e diff --git a/deps/ctest b/deps/ctest index 3f90e39a..652acfac 160000 --- a/deps/ctest +++ b/deps/ctest @@ -1 +1 @@ -Subproject commit 3f90e39a592f55d84dc2d23f8f7a95a85220f36a +Subproject commit 652acfacd348a121402055c9af486bb2dd0e232f diff --git a/deps/macro-utils-c b/deps/macro-utils-c index 9fb73050..5e7ee939 160000 --- a/deps/macro-utils-c +++ b/deps/macro-utils-c @@ -1 +1 @@ -Subproject commit 9fb73050bb6c6f3beea173120213d8793027868f +Subproject commit 5e7ee9394aa32d184b893dbfcef5ce6ca78cf1b5 diff --git a/deps/umock-c b/deps/umock-c index c3f34a0e..66d0cf86 160000 --- a/deps/umock-c +++ b/deps/umock-c @@ -1 +1 @@ -Subproject commit c3f34a0efde814ffc7e784adad7adc59cce901be +Subproject commit 66d0cf86a6a88e36039bb21bf860e4a3aeb94775 From 09d4f00b1739f4eefdf8ecb4cf0395b3acbef14e Mon Sep 17 00:00:00 2001 From: anporumb Date: Mon, 8 Jun 2026 11:06:31 -0700 Subject: [PATCH 16/17] Update deps: c-pal: updated to latest (#639) Dependency updates: c-pal: - updated to latest --- deps/c-pal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/c-pal b/deps/c-pal index b2293987..c6c62dfd 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit b2293987df2c58fada0cf333011afd61665311b8 +Subproject commit c6c62dfd398f20f7a5522de09459a6b6729f698d From d6a37821a8559aa6ee4a0c450361b2e5bad0fc56 Mon Sep 17 00:00:00 2001 From: Parth Aggarwal Date: Mon, 8 Jun 2026 13:06:20 -0700 Subject: [PATCH 17/17] Update c-pal submodule, remove c_pal from UTs where not pre-existing Update c-pal to include PR #583 (real_ps_util_renames in real_process_watchdog). This eliminates the need for UTs to link c_pal solely for watchdog support. Remove c_pal from ADDITIONAL_LIBS in UTs where it was added by the timed test conversion. Retain c_pal where it was pre-existing (needed for interlocked etc). Fix tarray_int: move timed_test_suite.h before ENABLE_MOCKS section to avoid unnecessary renames, remove real_process_watchdog and c_pal_ll_reals. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- deps/c-pal | 2 +- tests/async_op_ut/CMakeLists.txt | 10 +++---- tests/async_retry_wrapper_ut/CMakeLists.txt | 28 +++++++++---------- .../CMakeLists.txt | 10 +++---- .../CMakeLists.txt | 14 +++++----- .../CMakeLists.txt | 14 +++++----- tests/async_type_helper_ut/CMakeLists.txt | 12 ++++---- tests/azure_base64_ut/CMakeLists.txt | 14 +++++----- tests/buffer_ut/CMakeLists.txt | 10 +++---- tests/cancellation_token_ut/CMakeLists.txt | 10 +++---- tests/channel_ut/CMakeLists.txt | 6 ++-- .../CMakeLists.txt | 10 +++---- .../CMakeLists.txt | 6 ++-- tests/constbuffer_array_ut/CMakeLists.txt | 12 ++++---- tests/constbuffer_thandle_ut/CMakeLists.txt | 12 ++++---- tests/constbuffer_ut/CMakeLists.txt | 6 ++-- tests/critical_section_ut/CMakeLists.txt | 10 +++---- tests/doublylinkedlist_ut/CMakeLists.txt | 4 +-- .../external_command_helper_ut/CMakeLists.txt | 6 ++-- tests/filename_helper_ut/CMakeLists.txt | 4 +-- tests/flags_to_string_ut/CMakeLists.txt | 10 +++---- tests/for_each_in_folder_ut/CMakeLists.txt | 6 ++-- .../for_each_in_sub_folder_ut/CMakeLists.txt | 6 ++-- tests/hash_ut/CMakeLists.txt | 4 +-- tests/map_ut/CMakeLists.txt | 8 +++--- tests/memory_data_ut/CMakeLists.txt | 6 ++-- .../object_lifetime_tracker_ut/CMakeLists.txt | 4 +-- tests/paged_sparse_array_ut/CMakeLists.txt | 8 +++--- tests/rc_ptr_ut/CMakeLists.txt | 6 ++-- tests/rc_string_array_ut/CMakeLists.txt | 10 +++---- tests/rc_string_ut/CMakeLists.txt | 10 +++---- tests/rc_string_utils_ut/CMakeLists.txt | 10 +++---- tests/reals_ut/CMakeLists.txt | 18 ++++++------ tests/singlylinkedlist_ut/CMakeLists.txt | 10 +++---- .../CMakeLists.txt | 4 +-- tests/strings_ut/CMakeLists.txt | 8 +++--- tests/sync_wrapper_ut/CMakeLists.txt | 20 ++++++------- tests/tarray_int/CMakeLists.txt | 2 +- tests/tarray_int/tarray_int.c | 2 +- tests/tarray_ut/CMakeLists.txt | 4 +-- tests/tcall_dispatcher_ut/CMakeLists.txt | 4 +-- tests/thandle_tuple_array_ut/CMakeLists.txt | 8 +++--- .../CMakeLists.txt | 10 +++---- .../CMakeLists.txt | 10 +++---- tests/tp_worker_thread_ut/CMakeLists.txt | 4 +-- tests/two_d_array_ut/CMakeLists.txt | 4 +-- tests/uuid_string_ut/CMakeLists.txt | 8 +++--- tests/watchdog_threadpool_ut/CMakeLists.txt | 4 +-- tests/watchdog_ut/CMakeLists.txt | 4 +-- tests/worker_thread_ut/CMakeLists.txt | 26 ++++++++--------- 50 files changed, 219 insertions(+), 219 deletions(-) diff --git a/deps/c-pal b/deps/c-pal index c6c62dfd..198a0adf 160000 --- a/deps/c-pal +++ b/deps/c-pal @@ -1 +1 @@ -Subproject commit c6c62dfd398f20f7a5522de09459a6b6729f698d +Subproject commit 198a0adf3ec61f94b232f7ba26f656412fdc9bcc diff --git a/tests/async_op_ut/CMakeLists.txt b/tests/async_op_ut/CMakeLists.txt index 6b44c906..112639ff 100644 --- a/tests/async_op_ut/CMakeLists.txt +++ b/tests/async_op_ut/CMakeLists.txt @@ -4,17 +4,17 @@ set(theseTestsName async_op_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/async_op.c + ../../src/async_op.c ) set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_op_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_op_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_retry_wrapper_ut/CMakeLists.txt b/tests/async_retry_wrapper_ut/CMakeLists.txt index d3350150..c00a68d8 100644 --- a/tests/async_retry_wrapper_ut/CMakeLists.txt +++ b/tests/async_retry_wrapper_ut/CMakeLists.txt @@ -3,28 +3,28 @@ set(theseTestsName async_retry_wrapper_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/async_retry_wrapper.c - test_async.c - test_async_retry_wrappers.c - real_test_ref_counted.c + ../../src/async_retry_wrapper.c + test_async.c + test_async_retry_wrappers.c + real_test_ref_counted.c ) set(${theseTestsName}_h_files - ../../inc/c_util/async_retry_wrapper.h - test_async.h - test_async_retry_wrappers.h - test_ref_counted.h - real_test_ref_counted.h - real_test_ref_counted_renames.h + ../../inc/c_util/async_retry_wrapper.h + test_async.h + test_async_retry_wrappers.h + test_ref_counted.h + real_test_ref_counted.h + real_test_ref_counted_renames.h ) include_directories(../../inc) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_retry_wrapper_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_util c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_retry_wrapper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt b/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt index 3c407fa7..14b8f9a4 100644 --- a/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt +++ b/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt @@ -3,17 +3,17 @@ set(theseTestsName async_type_helper_copy_value_handler_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files ) set(${theseTestsName}_h_files - ../../inc/c_util/async_type_helper_copy_value_handler.h + ../../inc/c_util/async_type_helper_copy_value_handler.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_copy_value_handler_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_util c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_copy_value_handler_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt b/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt index fc1a62ff..f6da3cba 100644 --- a/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt +++ b/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt @@ -3,19 +3,19 @@ set(theseTestsName async_type_helper_ref_counted_handler_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - test_ref_counted_async_type_helper_handler.c + test_ref_counted_async_type_helper_handler.c ) set(${theseTestsName}_h_files - ../../inc/c_util/async_type_helper_ref_counted_handler.h - test_ref_counted_async_type_helper_handler.h + ../../inc/c_util/async_type_helper_ref_counted_handler.h + test_ref_counted_async_type_helper_handler.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_ref_counted_handler_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_util c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_ref_counted_handler_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt b/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt index 3a838311..b811dcfd 100644 --- a/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt +++ b/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt @@ -3,19 +3,19 @@ set(theseTestsName async_type_helper_thandle_handler_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - test_thandle_async_type_helper_handler.c + test_thandle_async_type_helper_handler.c ) set(${theseTestsName}_h_files - ../../inc/c_util/async_type_helper_thandle_handler.h - test_thandle_async_type_helper_handler.h + ../../inc/c_util/async_type_helper_thandle_handler.h + test_thandle_async_type_helper_handler.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_thandle_handler_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_util c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_thandle_handler_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_ut/CMakeLists.txt b/tests/async_type_helper_ut/CMakeLists.txt index 0a37ad50..4818e4ab 100644 --- a/tests/async_type_helper_ut/CMakeLists.txt +++ b/tests/async_type_helper_ut/CMakeLists.txt @@ -3,18 +3,18 @@ set(theseTestsName async_type_helper_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/async_type_helper.c + ../../src/async_type_helper.c ) set(${theseTestsName}_h_files - ../../inc/c_util/async_type_helper.h + ../../inc/c_util/async_type_helper.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal_reals c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_util c_pal_reals c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/azure_base64_ut/CMakeLists.txt b/tests/azure_base64_ut/CMakeLists.txt index cd8ef168..d28a5fb7 100644 --- a/tests/azure_base64_ut/CMakeLists.txt +++ b/tests/azure_base64_ut/CMakeLists.txt @@ -4,19 +4,19 @@ set(theseTestsName azure_base64_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/azure_base64.c - ../../src/strings.c - ../../src/buffer.c + ../../src/azure_base64.c + ../../src/strings.c + ../../src/buffer.c ) set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/azure_base64_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/azure_base64_ut_pch.h" ) \ No newline at end of file diff --git a/tests/buffer_ut/CMakeLists.txt b/tests/buffer_ut/CMakeLists.txt index cdad16b5..abdfada1 100644 --- a/tests/buffer_ut/CMakeLists.txt +++ b/tests/buffer_ut/CMakeLists.txt @@ -4,17 +4,17 @@ set(theseTestsName buffer_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/buffer.c + ../../src/buffer.c ) set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/buffer_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/buffer_ut_pch.h" ) \ No newline at end of file diff --git a/tests/cancellation_token_ut/CMakeLists.txt b/tests/cancellation_token_ut/CMakeLists.txt index 00ac72ca..29f16e15 100644 --- a/tests/cancellation_token_ut/CMakeLists.txt +++ b/tests/cancellation_token_ut/CMakeLists.txt @@ -4,17 +4,17 @@ set(theseTestsName cancellation_token_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/cancellation_token.c + ../../src/cancellation_token.c ) set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/cancellation_token_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/cancellation_token_ut_pch.h" ) \ No newline at end of file diff --git a/tests/channel_ut/CMakeLists.txt b/tests/channel_ut/CMakeLists.txt index 844d5cf1..027ec284 100644 --- a/tests/channel_ut/CMakeLists.txt +++ b/tests/channel_ut/CMakeLists.txt @@ -14,7 +14,7 @@ set(${theseTestsName}_h_files ../../inc/c_util/channel.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal c_util_reals c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/channel_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_util_reals c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/channel_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_array_batcher_nv_ut/CMakeLists.txt b/tests/constbuffer_array_batcher_nv_ut/CMakeLists.txt index b7ebdc0c..1a71e800 100644 --- a/tests/constbuffer_array_batcher_nv_ut/CMakeLists.txt +++ b/tests/constbuffer_array_batcher_nv_ut/CMakeLists.txt @@ -7,14 +7,14 @@ ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/constbuffer_array_batcher_nv.c + ../../src/constbuffer_array_batcher_nv.c ) set(${theseTestsName}_h_files - ../../inc/c_util/constbuffer_array_batcher_nv.h + ../../inc/c_util/constbuffer_array_batcher_nv.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_array_batcher_nv_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_array_batcher_nv_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_array_splitter_ut/CMakeLists.txt b/tests/constbuffer_array_splitter_ut/CMakeLists.txt index a6a94720..cca85a60 100644 --- a/tests/constbuffer_array_splitter_ut/CMakeLists.txt +++ b/tests/constbuffer_array_splitter_ut/CMakeLists.txt @@ -14,7 +14,7 @@ set(${theseTestsName}_h_files ../../inc/c_util/constbuffer_array_splitter.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_array_splitter_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_array_splitter_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_array_ut/CMakeLists.txt b/tests/constbuffer_array_ut/CMakeLists.txt index e622dd0f..00e58fa5 100644 --- a/tests/constbuffer_array_ut/CMakeLists.txt +++ b/tests/constbuffer_array_ut/CMakeLists.txt @@ -3,18 +3,18 @@ set(theseTestsName constbuffer_array_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/constbuffer_array.c + ../../src/constbuffer_array.c ) set(${theseTestsName}_h_files - ../../inc/c_util/constbuffer_array.h + ../../inc/c_util/constbuffer_array.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_array_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_array_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_thandle_ut/CMakeLists.txt b/tests/constbuffer_thandle_ut/CMakeLists.txt index 73f66100..cdc9e1fd 100644 --- a/tests/constbuffer_thandle_ut/CMakeLists.txt +++ b/tests/constbuffer_thandle_ut/CMakeLists.txt @@ -3,18 +3,18 @@ cmake_minimum_required(VERSION 3.18) set(theseTestsName constbuffer_thandle_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/constbuffer_thandle.c - ../../src/memory_data.c #don't want any mocks generated for memory_data so grab the real functions for the purpose of testing + ../../src/constbuffer_thandle.c + ../../src/memory_data.c #don't want any mocks generated for memory_data so grab the real functions for the purpose of testing ) set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_thandle_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_thandle_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_ut/CMakeLists.txt b/tests/constbuffer_ut/CMakeLists.txt index c1545838..5cb08898 100644 --- a/tests/constbuffer_ut/CMakeLists.txt +++ b/tests/constbuffer_ut/CMakeLists.txt @@ -15,7 +15,7 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_ut_pch.h" ) \ No newline at end of file diff --git a/tests/critical_section_ut/CMakeLists.txt b/tests/critical_section_ut/CMakeLists.txt index e37aaaa3..e1fb677b 100644 --- a/tests/critical_section_ut/CMakeLists.txt +++ b/tests/critical_section_ut/CMakeLists.txt @@ -4,17 +4,17 @@ set(theseTestsName critical_section_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/critical_section.c + ../../src/critical_section.c ) set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/critical_section_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/critical_section_ut_pch.h" ) \ No newline at end of file diff --git a/tests/doublylinkedlist_ut/CMakeLists.txt b/tests/doublylinkedlist_ut/CMakeLists.txt index f267fd05..c1320c64 100644 --- a/tests/doublylinkedlist_ut/CMakeLists.txt +++ b/tests/doublylinkedlist_ut/CMakeLists.txt @@ -14,6 +14,6 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/doublylinkedlist_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/doublylinkedlist_ut_pch.h" ) \ No newline at end of file diff --git a/tests/external_command_helper_ut/CMakeLists.txt b/tests/external_command_helper_ut/CMakeLists.txt index 3695e816..41c72850 100644 --- a/tests/external_command_helper_ut/CMakeLists.txt +++ b/tests/external_command_helper_ut/CMakeLists.txt @@ -15,7 +15,7 @@ set(${theseTestsName}_h_files ../../inc/c_util/external_command_helper.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/external_command_helper_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal_reals c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/external_command_helper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/filename_helper_ut/CMakeLists.txt b/tests/filename_helper_ut/CMakeLists.txt index 8ccc7de3..8a09d3b9 100644 --- a/tests/filename_helper_ut/CMakeLists.txt +++ b/tests/filename_helper_ut/CMakeLists.txt @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/filename_helper.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/filename_helper_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/filename_helper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/flags_to_string_ut/CMakeLists.txt b/tests/flags_to_string_ut/CMakeLists.txt index 00c3d644..53ea5ae8 100644 --- a/tests/flags_to_string_ut/CMakeLists.txt +++ b/tests/flags_to_string_ut/CMakeLists.txt @@ -4,17 +4,17 @@ set(theseTestsName flags_to_string_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - flags_to_string_helper.c + flags_to_string_helper.c ) set(${theseTestsName}_h_files - flags_to_string_helper.h + flags_to_string_helper.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/flags_to_string_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/flags_to_string_ut_pch.h" ) \ No newline at end of file diff --git a/tests/for_each_in_folder_ut/CMakeLists.txt b/tests/for_each_in_folder_ut/CMakeLists.txt index f4031fc9..f96a8f5f 100644 --- a/tests/for_each_in_folder_ut/CMakeLists.txt +++ b/tests/for_each_in_folder_ut/CMakeLists.txt @@ -15,7 +15,7 @@ set(${theseTestsName}_h_files ../../inc/c_util/for_each_in_folder.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/for_each_in_folder_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal_reals c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/for_each_in_folder_ut_pch.h" ) \ No newline at end of file diff --git a/tests/for_each_in_sub_folder_ut/CMakeLists.txt b/tests/for_each_in_sub_folder_ut/CMakeLists.txt index a1e29f40..6c108c03 100644 --- a/tests/for_each_in_sub_folder_ut/CMakeLists.txt +++ b/tests/for_each_in_sub_folder_ut/CMakeLists.txt @@ -15,7 +15,7 @@ set(${theseTestsName}_h_files ../../inc/c_util/for_each_in_sub_folder.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/for_each_in_sub_folder_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal_reals c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/for_each_in_sub_folder_ut_pch.h" ) \ No newline at end of file diff --git a/tests/hash_ut/CMakeLists.txt b/tests/hash_ut/CMakeLists.txt index fe93118d..5b98e5a1 100644 --- a/tests/hash_ut/CMakeLists.txt +++ b/tests/hash_ut/CMakeLists.txt @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ../../deps/smhasher/src/MurmurHash2.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/hash_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_util + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/hash_ut_pch.h" ) \ No newline at end of file diff --git a/tests/map_ut/CMakeLists.txt b/tests/map_ut/CMakeLists.txt index fb7cea27..3e13745d 100644 --- a/tests/map_ut/CMakeLists.txt +++ b/tests/map_ut/CMakeLists.txt @@ -4,16 +4,16 @@ set(theseTestsName map_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/map.c + ../../src/map.c ) set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/map_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/map_ut_pch.h" ) \ No newline at end of file diff --git a/tests/memory_data_ut/CMakeLists.txt b/tests/memory_data_ut/CMakeLists.txt index e5f3e3f5..df1a5978 100644 --- a/tests/memory_data_ut/CMakeLists.txt +++ b/tests/memory_data_ut/CMakeLists.txt @@ -5,7 +5,7 @@ set(theseTestsName memory_data_ut) set(${theseTestsName}_test_files ${theseTestsName}.c - ) + ) set(${theseTestsName}_c_files ../../src/memory_data.c @@ -14,6 +14,6 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/memory_data_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/memory_data_ut_pch.h" ) \ No newline at end of file diff --git a/tests/object_lifetime_tracker_ut/CMakeLists.txt b/tests/object_lifetime_tracker_ut/CMakeLists.txt index 732b972b..3d0ce46e 100644 --- a/tests/object_lifetime_tracker_ut/CMakeLists.txt +++ b/tests/object_lifetime_tracker_ut/CMakeLists.txt @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/object_lifetime_tracker.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/object_lifetime_tracker_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_util_reals c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/object_lifetime_tracker_ut_pch.h" ) \ No newline at end of file diff --git a/tests/paged_sparse_array_ut/CMakeLists.txt b/tests/paged_sparse_array_ut/CMakeLists.txt index dad93738..12f55a6c 100644 --- a/tests/paged_sparse_array_ut/CMakeLists.txt +++ b/tests/paged_sparse_array_ut/CMakeLists.txt @@ -4,16 +4,16 @@ set(theseTestsName paged_sparse_array_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files ) set(${theseTestsName}_h_files - ../../inc/c_util/paged_sparse_array.h + ../../inc/c_util/paged_sparse_array.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/paged_sparse_array_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/paged_sparse_array_ut_pch.h" ) diff --git a/tests/rc_ptr_ut/CMakeLists.txt b/tests/rc_ptr_ut/CMakeLists.txt index 81bae635..6edb6099 100644 --- a/tests/rc_ptr_ut/CMakeLists.txt +++ b/tests/rc_ptr_ut/CMakeLists.txt @@ -14,7 +14,7 @@ set(${theseTestsName}_h_files ../../inc/c_util/rc_ptr.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals c_pal_reals c_pal - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_ptr_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_ptr_ut_pch.h" ) \ No newline at end of file diff --git a/tests/rc_string_array_ut/CMakeLists.txt b/tests/rc_string_array_ut/CMakeLists.txt index 3b8d0bbe..cb9ed9bd 100644 --- a/tests/rc_string_array_ut/CMakeLists.txt +++ b/tests/rc_string_array_ut/CMakeLists.txt @@ -4,17 +4,17 @@ set(theseTestsName rc_string_array_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/rc_string_array.c + ../../src/rc_string_array.c ) set(${theseTestsName}_h_files - ../../inc/c_util/rc_string_array.h + ../../inc/c_util/rc_string_array.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_util_reals c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_string_array_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_string_array_ut_pch.h" ) \ No newline at end of file diff --git a/tests/rc_string_ut/CMakeLists.txt b/tests/rc_string_ut/CMakeLists.txt index 61d66c18..6495734b 100644 --- a/tests/rc_string_ut/CMakeLists.txt +++ b/tests/rc_string_ut/CMakeLists.txt @@ -4,17 +4,17 @@ set(theseTestsName rc_string_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - rc_string_mocked.c + rc_string_mocked.c ) set(${theseTestsName}_h_files - ../../inc/c_util/rc_string.h + ../../inc/c_util/rc_string.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_string_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_string_ut_pch.h" ) \ No newline at end of file diff --git a/tests/rc_string_utils_ut/CMakeLists.txt b/tests/rc_string_utils_ut/CMakeLists.txt index d0fb3055..8801c82b 100644 --- a/tests/rc_string_utils_ut/CMakeLists.txt +++ b/tests/rc_string_utils_ut/CMakeLists.txt @@ -4,17 +4,17 @@ set(theseTestsName rc_string_utils_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/rc_string_utils.c + ../../src/rc_string_utils.c ) set(${theseTestsName}_h_files - ../../inc/c_util/rc_string_utils.h + ../../inc/c_util/rc_string_utils.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_util_reals c_pal_reals c_util_test_helpers - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_string_utils_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals c_pal_reals c_util_test_helpers + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/rc_string_utils_ut_pch.h" ) \ No newline at end of file diff --git a/tests/reals_ut/CMakeLists.txt b/tests/reals_ut/CMakeLists.txt index f954387c..87f3ee72 100644 --- a/tests/reals_ut/CMakeLists.txt +++ b/tests/reals_ut/CMakeLists.txt @@ -4,19 +4,19 @@ set(theseTestsName c_util_reals_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_util_reals c_pal - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/c_util_reals_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/c_util_reals_ut_pch.h" ) if(WIN32) - if("${building}" STREQUAL "exe") - copy_thread_notifications_lackey_outputs(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} $) - endif() + if("${building}" STREQUAL "exe") + copy_thread_notifications_lackey_outputs(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} $) + endif() - if("${building}" STREQUAL "dll") - copy_thread_notifications_lackey_outputs(${theseTestsName}_dll_${CMAKE_PROJECT_NAME} $) - endif() + if("${building}" STREQUAL "dll") + copy_thread_notifications_lackey_outputs(${theseTestsName}_dll_${CMAKE_PROJECT_NAME} $) + endif() endif() \ No newline at end of file diff --git a/tests/singlylinkedlist_ut/CMakeLists.txt b/tests/singlylinkedlist_ut/CMakeLists.txt index 7f7071f7..8e79083a 100644 --- a/tests/singlylinkedlist_ut/CMakeLists.txt +++ b/tests/singlylinkedlist_ut/CMakeLists.txt @@ -4,17 +4,17 @@ set(theseTestsName singlylinkedlist_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/singlylinkedlist.c + ../../src/singlylinkedlist.c ) set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/singlylinkedlist_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/singlylinkedlist_ut_pch.h" ) \ No newline at end of file diff --git a/tests/sliding_window_average_by_count_ut/CMakeLists.txt b/tests/sliding_window_average_by_count_ut/CMakeLists.txt index 48c6be4f..20c49943 100644 --- a/tests/sliding_window_average_by_count_ut/CMakeLists.txt +++ b/tests/sliding_window_average_by_count_ut/CMakeLists.txt @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/sliding_window_average_by_count.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_pal_umocktypes - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/sliding_window_average_by_count_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_pal_umocktypes + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/sliding_window_average_by_count_ut_pch.h" ) \ No newline at end of file diff --git a/tests/strings_ut/CMakeLists.txt b/tests/strings_ut/CMakeLists.txt index 0e147ff4..0af5c55b 100644 --- a/tests/strings_ut/CMakeLists.txt +++ b/tests/strings_ut/CMakeLists.txt @@ -4,16 +4,16 @@ set(theseTestsName strings_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/strings.c + ../../src/strings.c ) set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/strings_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/strings_ut_pch.h" ) \ No newline at end of file diff --git a/tests/sync_wrapper_ut/CMakeLists.txt b/tests/sync_wrapper_ut/CMakeLists.txt index 1b3f0410..fba22b4b 100644 --- a/tests/sync_wrapper_ut/CMakeLists.txt +++ b/tests/sync_wrapper_ut/CMakeLists.txt @@ -3,22 +3,22 @@ set(theseTestsName sync_wrapper_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - test_async.c - test_sync_wrappers.c - test_ref_counted.c + test_async.c + test_sync_wrappers.c + test_ref_counted.c ) set(${theseTestsName}_h_files - ../../inc/c_util/sync_wrapper.h - test_async.h - test_sync_wrappers.h - test_ref_counted.h + ../../inc/c_util/sync_wrapper.h + test_async.h + test_sync_wrappers.h + test_ref_counted.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/sync_wrapper_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal_reals c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/sync_wrapper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/tarray_int/CMakeLists.txt b/tests/tarray_int/CMakeLists.txt index 330e48e8..3cd10608 100644 --- a/tests/tarray_int/CMakeLists.txt +++ b/tests/tarray_int/CMakeLists.txt @@ -17,5 +17,5 @@ play_undo_op_types.h play_undo_op_tarray_types.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal_ll_reals c_pal c_pal_reals c_util_reals tarray_int_reals) +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals c_util_reals tarray_int_reals) diff --git a/tests/tarray_int/tarray_int.c b/tests/tarray_int/tarray_int.c index 0ed99d47..ccbb9236 100644 --- a/tests/tarray_int/tarray_int.c +++ b/tests/tarray_int/tarray_int.c @@ -11,12 +11,12 @@ #include "umock_c/umocktypes_stdint.h" #include "c_pal/interlocked.h" +#include "c_pal/timed_test_suite.h" #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "umock_c/umock_c.h" #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" -#include "c_pal/timed_test_suite.h" #include "play_undo_op_types.h" #include "play_undo_op_tarray_types.h" #include "umock_c/umock_c_DISABLE_MOCKS.h" // ============================== DISABLE_MOCKS diff --git a/tests/tarray_ut/CMakeLists.txt b/tests/tarray_ut/CMakeLists.txt index 4b25808e..843c02a7 100644 --- a/tests/tarray_ut/CMakeLists.txt +++ b/tests/tarray_ut/CMakeLists.txt @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/tarray.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/tarray_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/tarray_ut_pch.h" ) diff --git a/tests/tcall_dispatcher_ut/CMakeLists.txt b/tests/tcall_dispatcher_ut/CMakeLists.txt index 0f78cb51..138c95c0 100644 --- a/tests/tcall_dispatcher_ut/CMakeLists.txt +++ b/tests/tcall_dispatcher_ut/CMakeLists.txt @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/tcall_dispatcher.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/tcall_dispatcher_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/tcall_dispatcher_ut_pch.h" ) \ No newline at end of file diff --git a/tests/thandle_tuple_array_ut/CMakeLists.txt b/tests/thandle_tuple_array_ut/CMakeLists.txt index 9a21fce3..a71ae73c 100644 --- a/tests/thandle_tuple_array_ut/CMakeLists.txt +++ b/tests/thandle_tuple_array_ut/CMakeLists.txt @@ -4,16 +4,16 @@ set(theseTestsName thandle_tuple_array_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files ) set(${theseTestsName}_h_files - ../../inc/c_util/thandle_tuple_array.h + ../../inc/c_util/thandle_tuple_array.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_util_reals c_pal_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/thandle_tuple_array_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals c_pal_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/thandle_tuple_array_ut_pch.h" ) \ No newline at end of file diff --git a/tests/thread_notifications_dispatcher_ut/CMakeLists.txt b/tests/thread_notifications_dispatcher_ut/CMakeLists.txt index a773092c..66248e35 100644 --- a/tests/thread_notifications_dispatcher_ut/CMakeLists.txt +++ b/tests/thread_notifications_dispatcher_ut/CMakeLists.txt @@ -14,15 +14,15 @@ set(${theseTestsName}_h_files ../../inc/c_util/thread_notifications_dispatcher.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals thread_notifications_lackey_dll - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/thread_notifications_dispatcher_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util c_util_reals thread_notifications_lackey_dll + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/thread_notifications_dispatcher_ut_pch.h" ) if("${building}" STREQUAL "exe") - copy_thread_notifications_lackey_outputs(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} $) + copy_thread_notifications_lackey_outputs(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} $) endif() if("${building}" STREQUAL "dll") - copy_thread_notifications_lackey_outputs(${theseTestsName}_dll_${CMAKE_PROJECT_NAME} $) + copy_thread_notifications_lackey_outputs(${theseTestsName}_dll_${CMAKE_PROJECT_NAME} $) endif() \ No newline at end of file diff --git a/tests/thread_notifications_dispatcher_wo_init_ut/CMakeLists.txt b/tests/thread_notifications_dispatcher_wo_init_ut/CMakeLists.txt index 314f4cff..53ad4f8e 100644 --- a/tests/thread_notifications_dispatcher_wo_init_ut/CMakeLists.txt +++ b/tests/thread_notifications_dispatcher_wo_init_ut/CMakeLists.txt @@ -14,15 +14,15 @@ set(${theseTestsName}_h_files ../../inc/c_util/thread_notifications_dispatcher.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals thread_notifications_lackey_dll - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/thread_notifications_dispatcher_wo_init_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" + ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util c_util_reals thread_notifications_lackey_dll + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/thread_notifications_dispatcher_wo_init_ut_pch.h" ) if("${building}" STREQUAL "exe") - copy_thread_notifications_lackey_outputs(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} $) + copy_thread_notifications_lackey_outputs(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} $) endif() if("${building}" STREQUAL "dll") - copy_thread_notifications_lackey_outputs(${theseTestsName}_dll_${CMAKE_PROJECT_NAME} $) + copy_thread_notifications_lackey_outputs(${theseTestsName}_dll_${CMAKE_PROJECT_NAME} $) endif() \ No newline at end of file diff --git a/tests/tp_worker_thread_ut/CMakeLists.txt b/tests/tp_worker_thread_ut/CMakeLists.txt index f5dda873..0898bdf9 100644 --- a/tests/tp_worker_thread_ut/CMakeLists.txt +++ b/tests/tp_worker_thread_ut/CMakeLists.txt @@ -15,7 +15,7 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS real_process_watchdog c_pal c_util_reals c_util_test_helpers c_pal_reals c_pal_umocktypes + ADDITIONAL_LIBS real_process_watchdog c_util_reals c_util_test_helpers c_pal_reals c_pal_umocktypes - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/tp_worker_thread_ut_pch.h" + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/tp_worker_thread_ut_pch.h" ) \ No newline at end of file diff --git a/tests/two_d_array_ut/CMakeLists.txt b/tests/two_d_array_ut/CMakeLists.txt index 772d0c95..e2dc73ce 100644 --- a/tests/two_d_array_ut/CMakeLists.txt +++ b/tests/two_d_array_ut/CMakeLists.txt @@ -13,6 +13,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/two_d_array.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_util c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/two_d_array_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/two_d_array_ut_pch.h" ) \ No newline at end of file diff --git a/tests/uuid_string_ut/CMakeLists.txt b/tests/uuid_string_ut/CMakeLists.txt index 409f8fb4..69959e70 100644 --- a/tests/uuid_string_ut/CMakeLists.txt +++ b/tests/uuid_string_ut/CMakeLists.txt @@ -4,16 +4,16 @@ set(theseTestsName uuid_string_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/uuid_string.c + ../../src/uuid_string.c ) set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal c_pal_reals c_pal_umocktypes - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/uuid_string_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_pal_umocktypes + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/uuid_string_ut_pch.h" ) diff --git a/tests/watchdog_threadpool_ut/CMakeLists.txt b/tests/watchdog_threadpool_ut/CMakeLists.txt index 7763906b..41300612 100644 --- a/tests/watchdog_threadpool_ut/CMakeLists.txt +++ b/tests/watchdog_threadpool_ut/CMakeLists.txt @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/watchdog_threadpool.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/watchdog_threadpool_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal_reals c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/watchdog_threadpool_ut_pch.h" ) \ No newline at end of file diff --git a/tests/watchdog_ut/CMakeLists.txt b/tests/watchdog_ut/CMakeLists.txt index 223b8683..1721174b 100644 --- a/tests/watchdog_ut/CMakeLists.txt +++ b/tests/watchdog_ut/CMakeLists.txt @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/watchdog.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal c_pal_reals c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/watchdog_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal_reals c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/watchdog_ut_pch.h" ) \ No newline at end of file diff --git a/tests/worker_thread_ut/CMakeLists.txt b/tests/worker_thread_ut/CMakeLists.txt index 31dc9b4a..cb8c9695 100644 --- a/tests/worker_thread_ut/CMakeLists.txt +++ b/tests/worker_thread_ut/CMakeLists.txt @@ -4,29 +4,29 @@ set(theseTestsName worker_thread_ut) set(${theseTestsName}_test_files - ${theseTestsName}.c + ${theseTestsName}.c ) set(${theseTestsName}_c_files - ../../src/worker_thread.c + ../../src/worker_thread.c ) set(${theseTestsName}_h_files - ../../inc/c_util/worker_thread.h + ../../inc/c_util/worker_thread.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog c_pal pal_interfaces c_pal_reals c_pal_reals c_util_reals - ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/worker_thread_ut_pch.h" +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS real_process_watchdog pal_interfaces c_pal_reals c_pal_reals c_util_reals + ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/worker_thread_ut_pch.h" ) if (WIN32) - if("${building}" STREQUAL "exe") - # /ignore:4217 is: "warning LNK4217: symbol 'symbol' defined in 'filename_1.obj' is imported by 'filename_2.obj' in function 'function'" - set_target_properties(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} PROPERTIES LINK_FLAGS "/ignore:4217") - endif() + if("${building}" STREQUAL "exe") + # /ignore:4217 is: "warning LNK4217: symbol 'symbol' defined in 'filename_1.obj' is imported by 'filename_2.obj' in function 'function'" + set_target_properties(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} PROPERTIES LINK_FLAGS "/ignore:4217") + endif() - if("${building}" STREQUAL "dll") - # /ignore:4217 is: "warning LNK4217: symbol 'symbol' defined in 'filename_1.obj' is imported by 'filename_2.obj' in function 'function'" - set_target_properties(${theseTestsName}_dll_${CMAKE_PROJECT_NAME} PROPERTIES LINK_FLAGS "/ignore:4217") - endif() + if("${building}" STREQUAL "dll") + # /ignore:4217 is: "warning LNK4217: symbol 'symbol' defined in 'filename_1.obj' is imported by 'filename_2.obj' in function 'function'" + set_target_properties(${theseTestsName}_dll_${CMAKE_PROJECT_NAME} PROPERTIES LINK_FLAGS "/ignore:4217") + endif() endif() \ No newline at end of file