Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/clds_hash_table_int/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ set(${theseTestsName}_c_files
set(${theseTestsName}_h_files
)

build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS clds)
build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS c_pal clds)
7 changes: 4 additions & 3 deletions tests/clds_hash_table_int/clds_hash_table_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "c_util/cancellation_token.h"
#include "c_pal/tqueue.h"
#include "c_pal/timed_test_suite.h"

#include "clds/clds_hazard_pointers.h"
#include "clds/clds_hash_table.h"
Expand Down Expand Up @@ -567,12 +568,12 @@ MU_DEFINE_ENUM_STRINGS_WITHOUT_INVALID(CHAOS_TEST_ACTION, CHAOS_TEST_ACTION_VALU

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(suite_init)
TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
gballoc_hl_init(NULL, NULL);
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
gballoc_hl_deinit();
}
Expand Down Expand Up @@ -2458,4 +2459,4 @@ TEST_FUNCTION(clds_hash_table_chaos_knight_test_with_get_snapshot)
clds_hazard_pointers_destroy(hazard_pointers);
}

END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
2 changes: 1 addition & 1 deletion tests/clds_hash_table_snapshot_perf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(${theseTestsName}_c_files
set(${theseTestsName}_h_files
)

build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS clds)
build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS c_pal clds)

if("${building}" STREQUAL "exe")
copy_thread_notifications_lackey_outputs(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} "$<TARGET_FILE_DIR:${theseTestsName}_exe_${CMAKE_PROJECT_NAME}>")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ TEST_DEFINE_ENUM_TYPE(CLDS_HASH_TABLE_SNAPSHOT_RESULT, CLDS_HASH_TABLE_SNAPSHOT_

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(suite_init)
TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
gballoc_hl_init(NULL, NULL);
ASSERT_ARE_EQUAL(int, 0, thread_notifications_dispatcher_init());
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
thread_notifications_dispatcher_deinit();
gballoc_hl_deinit();
Expand Down
4 changes: 2 additions & 2 deletions tests/clds_hash_table_ut/clds_hash_table_ut.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ DECLARE_HASH_TABLE_NODE_TYPE(TEST_ITEM)

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));

Expand Down Expand Up @@ -128,7 +128,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();
Expand Down
4 changes: 3 additions & 1 deletion tests/clds_hash_table_ut/clds_hash_table_ut_pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,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"
Expand All @@ -45,4 +47,4 @@

#include "clds/clds_hash_table.h"

#endif // CLDS_HASH_TABLE_UT_PCH_H
#endif // CLDS_HASH_TABLE_UT_PCH_H
2 changes: 1 addition & 1 deletion tests/clds_hash_table_with_memory_limit_int/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ set(${theseTestsName}_c_files
set(${theseTestsName}_h_files
)

build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS clds)
build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS c_pal clds)
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "c_pal/gballoc_hl_redirect.h"
#include "c_pal/thandle.h"
#include "c_pal/job_object_helper.h"
#include "c_pal/timed_test_suite.h"

#include "clds/clds_hazard_pointers.h"
#include "clds/clds_hash_table.h"
Expand Down Expand Up @@ -68,12 +69,12 @@ static void test_skipped_seq_no_ignore(void* context, int64_t skipped_sequence_n

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(suite_init)
TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
gballoc_hl_init(NULL, NULL);
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
gballoc_hl_deinit();
}
Expand Down Expand Up @@ -164,4 +165,4 @@ TEST_FUNCTION(clds_hash_table_insert_same_block_again_does_not_leak_item_count)
THANDLE_ASSIGN(JOB_OBJECT_HELPER)(&job_object_helper, NULL);
}

END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(${theseTestsName}_c_files
set(${theseTestsName}_h_files
)

build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS clds)
build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS c_pal clds)

if("${building}" STREQUAL "exe")
copy_thread_notifications_lackey_outputs(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} "$<TARGET_FILE_DIR:${theseTestsName}_exe_${CMAKE_PROJECT_NAME}>")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ TEST_DEFINE_ENUM_TYPE(INTERLOCKED_HL_RESULT, INTERLOCKED_HL_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)
{
gballoc_hl_init(NULL, NULL);
ASSERT_ARE_EQUAL(int, 0, thread_notifications_dispatcher_init());
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
thread_notifications_dispatcher_deinit();
gballoc_hl_deinit();
Expand Down
4 changes: 2 additions & 2 deletions tests/clds_hazard_pointers_thread_helper_ut/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Copyright (c) Microsoft. All rights reserved.
#Copyright (c) Microsoft. All rights reserved.

set(theseTestsName clds_hazard_pointers_thread_helper_ut)

Expand All @@ -14,5 +14,5 @@ set(${theseTestsName}_h_files
../../inc/clds/clds_hazard_pointers_thread_helper.h
)

build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS c_pal_reals c_pal_umocktypes thread_notifications_lackey_dll clds_reals
build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS c_pal c_pal_reals c_pal_umocktypes thread_notifications_lackey_dll clds_reals
ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/clds_hazard_pointers_thread_helper_ut_pch.h")
Original file line number Diff line number Diff line change
@@ -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 "clds_hazard_pointers_thread_helper_ut_pch.h"
Expand Down Expand Up @@ -99,7 +99,7 @@ static TCALL_DISPATCHER(THREAD_NOTIFICATION_CALL) hook_thread_notifications_disp

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));

Expand Down Expand Up @@ -129,7 +129,7 @@ TEST_SUITE_INITIALIZE(suite_init)
REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(mocked_TlsAlloc, mocked_TlsFree);
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
TCALL_DISPATCHER_ASSIGN(real_THREAD_NOTIFICATION_CALL)(&g.thread_notification_call_dispatcher, NULL);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -38,4 +40,4 @@

#include "clds/clds_hazard_pointers_thread_helper.h"

#endif // CLDS_HAZARD_POINTERS_THREAD_HELPER_UT_PCH_H
#endif // CLDS_HAZARD_POINTERS_THREAD_HELPER_UT_PCH_H
6 changes: 3 additions & 3 deletions tests/clds_hazard_pointers_ut/clds_hazard_pointers_ut.c
Original file line number Diff line number Diff line change
@@ -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 "clds_hazard_pointers_ut_pch.h"
Expand Down Expand Up @@ -27,7 +27,7 @@ static WORKER_THREAD_HANDLE test_worker_thread = (WORKER_THREAD_HANDLE)0x4242;

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));

Expand All @@ -47,7 +47,7 @@ TEST_SUITE_INITIALIZE(suite_init)
REGISTER_UMOCK_ALIAS_TYPE(WORKER_THREAD_HANDLE, void*);
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
umock_c_deinit();

Expand Down
4 changes: 3 additions & 1 deletion tests/clds_hazard_pointers_ut/clds_hazard_pointers_ut_pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#include "clds/clds_hazard_pointers.h"

#include "c_pal/timed_test_suite.h"

#include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS

#include "c_pal/gballoc_hl.h"
Expand All @@ -34,4 +36,4 @@
#include "real_gballoc_hl.h"
#include "real_inactive_hp_thread_queue.h"

#endif // CLDS_HAZARD_POINTERS_UT_PCH_H
#endif // CLDS_HAZARD_POINTERS_UT_PCH_H
2 changes: 1 addition & 1 deletion tests/clds_singly_linked_list_int/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ set(${theseTestsName}_c_files
set(${theseTestsName}_h_files
)

build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS clds)
build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS c_pal clds)
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "c_pal/gballoc_hl_redirect.h"
#include "c_pal/interlocked.h"
#include "c_pal/threadapi.h"
#include "c_pal/timed_test_suite.h"

#include "clds/clds_hazard_pointers.h"

Expand Down Expand Up @@ -91,12 +92,12 @@ MU_DEFINE_ENUM_WITHOUT_INVALID(CHAOS_TEST_ACTION, CHAOS_TEST_ACTION_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();
}
Expand Down Expand Up @@ -319,4 +320,4 @@ TEST_FUNCTION(clds_singly_linked_list_chaos_knight_test)
}
#endif

END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
6 changes: 3 additions & 3 deletions tests/clds_singly_linked_list_ut/clds_singly_linked_list_ut.c
Original file line number Diff line number Diff line change
@@ -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 "clds_singly_linked_list_ut_pch.h"
Expand Down Expand Up @@ -57,7 +57,7 @@ DECLARE_SINGLY_LINKED_LIST_NODE_TYPE(TEST_ITEM)

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;

Expand All @@ -83,7 +83,7 @@ TEST_SUITE_INITIALIZE(suite_init)
REGISTER_UMOCK_ALIAS_TYPE(CLDS_ST_HASH_SET_KEY_COMPARE_FUNC, void*);
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
umock_c_deinit();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include "umock_c/umock_c.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"
Expand All @@ -31,4 +33,4 @@

#include "clds/clds_singly_linked_list.h"

#endif // CLDS_SINGLY_LINKED_LIST_UT_PCH_H
#endif // CLDS_SINGLY_LINKED_LIST_UT_PCH_H
2 changes: 1 addition & 1 deletion tests/clds_sorted_list_int/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ set(${theseTestsName}_c_files
set(${theseTestsName}_h_files
)

build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS clds)
build_test_artifacts(${theseTestsName} "tests/clds" ADDITIONAL_LIBS c_pal clds)
7 changes: 4 additions & 3 deletions tests/clds_sorted_list_int/clds_sorted_list_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "c_pal/uuid.h"

#include "c_pal/interlocked_hl.h"
#include "c_pal/timed_test_suite.h"
#include "c_util/uuid_string.h"

#include "clds/clds_hazard_pointers.h"
Expand Down Expand Up @@ -201,12 +202,12 @@ MU_DEFINE_ENUM_WITHOUT_INVALID(CHAOS_TEST_ACTION, CHAOS_TEST_ACTION_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();
}
Expand Down Expand Up @@ -1877,4 +1878,4 @@ TEST_FUNCTION(clds_sorted_list_chaos_knight_test)
clds_hazard_pointers_destroy(hazard_pointers);
}

END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
4 changes: 2 additions & 2 deletions tests/clds_sorted_list_ut/clds_sorted_list_ut.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static int test_key_compare(void* context, void* key1, void* key2)

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;

Expand Down Expand Up @@ -113,7 +113,7 @@ TEST_SUITE_INITIALIZE(suite_init)
REGISTER_UMOCK_ALIAS_TYPE(CLDS_ST_HASH_SET_KEY_COMPARE_FUNC, void*);
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
umock_c_deinit();

Expand Down
4 changes: 3 additions & 1 deletion tests/clds_sorted_list_ut/clds_sorted_list_ut_pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#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 "c_pal/gballoc_hl.h"
Expand All @@ -33,4 +35,4 @@
#include "../reals/real_clds_st_hash_set.h"
#include "../reals/real_clds_hazard_pointers.h"

#endif // CLDS_SORTED_LIST_UT_PCH_H
#endif // CLDS_SORTED_LIST_UT_PCH_H
Loading
Loading