diff options
Diffstat (limited to 'runtime/contrib/heap_trace/tests')
5 files changed, 19 insertions, 19 deletions
diff --git a/runtime/contrib/heap_trace/tests/src/cl_release_mem_object_interception_test.cc b/runtime/contrib/heap_trace/tests/src/cl_release_mem_object_interception_test.cc index 49b8fd994..a5700b28d 100644 --- a/runtime/contrib/heap_trace/tests/src/cl_release_mem_object_interception_test.cc +++ b/runtime/contrib/heap_trace/tests/src/cl_release_mem_object_interception_test.cc @@ -94,9 +94,9 @@ TEST_F(ClReleaseMemObjectStub, must_log_deallocation_event_only_if_reference_cou clReleaseMemObject(mem); GlobalTrace.reset(); ASSERT_STREQ( - getContentOfFile("./cl_release_mem_object_interception_test.log").c_str(), - "On CPU - Peak heap usage: 0 B, Total allocated: 0 B, Total deallocated: 0 B\nOn " - "GPU - Peak mem usage: 1024 B, Total allocated: 1024 B, Total deallocated: 1024 B\n"); + getContentOfFile("./cl_release_mem_object_interception_test.log").c_str(), + "On CPU - Peak heap usage: 0 B, Total allocated: 0 B, Total deallocated: 0 B\nOn " + "GPU - Peak mem usage: 1024 B, Total allocated: 1024 B, Total deallocated: 1024 B\n"); } TEST_F(ClReleaseMemObjectStub, must_not_log_deallocation_event_if_original_function_failed) diff --git a/runtime/contrib/heap_trace/tests/src/malloc_interception_test.cc b/runtime/contrib/heap_trace/tests/src/malloc_interception_test.cc index ea3eb8256..182f52c21 100644 --- a/runtime/contrib/heap_trace/tests/src/malloc_interception_test.cc +++ b/runtime/contrib/heap_trace/tests/src/malloc_interception_test.cc @@ -87,8 +87,8 @@ TEST_F(MallocStub, should_allocate_memory_from_pool_for_symbol_searcher_internal } TEST_F( - MallocStub, - should_not_influence_on_trace_results_even_if_orignal_function_return_any_not_null_ptr_when_incoming_size_is_zero) + MallocStub, + should_not_influence_on_trace_results_even_if_orignal_function_return_any_not_null_ptr_when_incoming_size_is_zero) { void *p = malloc(0); free(p); diff --git a/runtime/contrib/heap_trace/tests/src/realloc_interception_test.cc b/runtime/contrib/heap_trace/tests/src/realloc_interception_test.cc index 59660fad4..e81c5dc22 100644 --- a/runtime/contrib/heap_trace/tests/src/realloc_interception_test.cc +++ b/runtime/contrib/heap_trace/tests/src/realloc_interception_test.cc @@ -86,16 +86,16 @@ TEST_F(ReallocStub, should_work_as_malloc_when_incoming_ptr_is_equal_to_nullptr) ASSERT_TRUE(p); ASSERT_STREQ( - getContentOfFile("./realloc_interception_test.log").c_str(), - "On CPU - Peak heap usage: 1024 B, Total allocated: 1024 B, Total deallocated: 0 B\nOn " - "GPU - Peak mem usage: 0 B, Total allocated: 0 B, Total deallocated: 0 B\n"); + getContentOfFile("./realloc_interception_test.log").c_str(), + "On CPU - Peak heap usage: 1024 B, Total allocated: 1024 B, Total deallocated: 0 B\nOn " + "GPU - Peak mem usage: 0 B, Total allocated: 0 B, Total deallocated: 0 B\n"); free(p); } TEST_F( - ReallocStub, - should_not_influence_on_trace_results_even_if_orignal_function_return_any_not_null_ptr_when_incoming_size_is_zero_and_ptr_is_null) + ReallocStub, + should_not_influence_on_trace_results_even_if_orignal_function_return_any_not_null_ptr_when_incoming_size_is_zero_and_ptr_is_null) { void *p = realloc(nullptr, 0); free(p); diff --git a/runtime/contrib/heap_trace/tests/src/symbol_searcher_test.cc b/runtime/contrib/heap_trace/tests/src/symbol_searcher_test.cc index 59fdeedc9..9ed933119 100644 --- a/runtime/contrib/heap_trace/tests/src/symbol_searcher_test.cc +++ b/runtime/contrib/heap_trace/tests/src/symbol_searcher_test.cc @@ -70,7 +70,7 @@ TEST_F(SymbolSearcher, fs::path pathToTestSample2 = exePath() / "libtest_sample2.so"; void *test_sample2_handle = dlopen(pathToTestSample2.c_str(), RTLD_NOW); void *func_addr_in_test_sample2 = - dlsym(test_sample2_handle, "funcWhichCallFuncDefinedInTestSample3"); + dlsym(test_sample2_handle, "funcWhichCallFuncDefinedInTestSample3"); ASSERT_TRUE(test_sample2_handle); ASSERT_TRUE((void *)funcDefinedInTestSample3_ButWrappedInTestSample1 != diff --git a/runtime/contrib/heap_trace/tests/src/trace_test.cc b/runtime/contrib/heap_trace/tests/src/trace_test.cc index 1cf4c530b..4f359bb6d 100644 --- a/runtime/contrib/heap_trace/tests/src/trace_test.cc +++ b/runtime/contrib/heap_trace/tests/src/trace_test.cc @@ -114,15 +114,15 @@ TEST_F(Trace, should_work_correctly_in_multithreaded_environment) GlobalTrace.reset(); string thisShouldBeInLogFile = - "Total allocated: " + - to_string(numberOfThreads / 2 * numberOfEmulations * numberOfBytesPerOneEmulation) + - " B, Total deallocated: " + - to_string(numberOfThreads / 2 * numberOfEmulations * numberOfBytesPerOneEmulation) + " B\n"; + "Total allocated: " + + to_string(numberOfThreads / 2 * numberOfEmulations * numberOfBytesPerOneEmulation) + + " B, Total deallocated: " + + to_string(numberOfThreads / 2 * numberOfEmulations * numberOfBytesPerOneEmulation) + " B\n"; string andThisToo = - "Total allocated: " + - to_string(numberOfThreads / 2 * numberOfEmulations * numberOfBytesPerOneEmulation) + - " B, Total deallocated: " + - to_string(numberOfThreads / 2 * numberOfEmulations * numberOfBytesPerOneEmulation) + " B\n"; + "Total allocated: " + + to_string(numberOfThreads / 2 * numberOfEmulations * numberOfBytesPerOneEmulation) + + " B, Total deallocated: " + + to_string(numberOfThreads / 2 * numberOfEmulations * numberOfBytesPerOneEmulation) + " B\n"; ASSERT_TRUE(getContentOfFile("./trace_test.log").find(thisShouldBeInLogFile) != string::npos); ASSERT_TRUE(getContentOfFile("./trace_test.log").find(andThisToo) != string::npos); } |