-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IPC tests (umfIpcTest) to the file provider
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
- Loading branch information
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright (C) 2024 Intel Corporation | ||
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
#include <umf/memory_provider.h> | ||
#include <umf/providers/provider_file_memory.h> | ||
#ifdef UMF_POOL_JEMALLOC_ENABLED | ||
#include <umf/pools/pool_jemalloc.h> | ||
#endif | ||
#ifdef UMF_POOL_SCALABLE_ENABLED | ||
#include <umf/pools/pool_scalable.h> | ||
#endif | ||
|
||
#include "ipcFixtures.hpp" | ||
|
||
using umf_test::test; | ||
|
||
#define FILE_PATH ((char *)"tmp_file") | ||
|
||
umf_file_memory_provider_params_t get_file_params_shared(char *path) { | ||
umf_file_memory_provider_params_t file_params = | ||
umfFileMemoryProviderParamsDefault(path); | ||
file_params.visibility = UMF_MEM_MAP_SHARED; | ||
return file_params; | ||
} | ||
|
||
umf_file_memory_provider_params_t file_params_shared = | ||
get_file_params_shared(FILE_PATH); | ||
|
||
HostMemoryAccessor hostAccessor; | ||
|
||
static std::vector<ipcTestParams> ipcManyPoolsTestParamsList = { | ||
// TODO: enable it when sizes of allocations in ipcFixtures.hpp are fixed | ||
// {umfProxyPoolOps(), nullptr, umfFileMemoryProviderOps(), | ||
// &file_params_shared, &hostAccessor, true}, | ||
#ifdef UMF_POOL_JEMALLOC_ENABLED | ||
{umfJemallocPoolOps(), nullptr, umfFileMemoryProviderOps(), | ||
&file_params_shared, &hostAccessor, false}, | ||
#endif | ||
#ifdef UMF_POOL_SCALABLE_ENABLED | ||
{umfScalablePoolOps(), nullptr, umfFileMemoryProviderOps(), | ||
&file_params_shared, &hostAccessor, false}, | ||
#endif | ||
}; | ||
|
||
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(umfIpcTest); | ||
|
||
INSTANTIATE_TEST_SUITE_P(FileProviderDifferentPoolsTest, umfIpcTest, | ||
::testing::ValuesIn(ipcManyPoolsTestParamsList)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
Conditional variable destruction false-positive | ||
drd:CondErr | ||
... | ||
fun:pthread_cond_destroy@* | ||
... | ||
} |