diff --git a/test/provider_file_memory_ipc.cpp b/test/provider_file_memory_ipc.cpp index 619c13b05..c96ede66f 100644 --- a/test/provider_file_memory_ipc.cpp +++ b/test/provider_file_memory_ipc.cpp @@ -27,6 +27,17 @@ umf_file_memory_provider_params_t get_file_params_shared(char *path) { umf_file_memory_provider_params_t file_params_shared = get_file_params_shared(FILE_PATH); +umf_file_memory_provider_params_t get_file_params_fsdax(char *path) { + umf_file_memory_provider_params_t file_params = + umfFileMemoryProviderParamsDefault(path); + file_params.visibility = UMF_MEM_MAP_SYNC; + file_params.is_fsdax = true; + return file_params; +} + +umf_file_memory_provider_params_t file_params_fsdax = + get_file_params_fsdax(getenv("UMF_TESTS_FSDAX_PATH")); + HostMemoryAccessor hostAccessor; static std::vector ipcManyPoolsTestParamsList = { @@ -43,7 +54,36 @@ static std::vector ipcManyPoolsTestParamsList = { #endif }; +static std::vector getIpcFsDaxTestParamsList(void) { + std::vector ipcFsDaxTestParamsList = {}; + + char *path = getenv("UMF_TESTS_FSDAX_PATH"); + if (path == nullptr || path[0] == 0) { + // skipping the test, UMF_TESTS_FSDAX_PATH is not set + return ipcFsDaxTestParamsList; + } + + ipcFsDaxTestParamsList = { +// TODO: enable it when sizes of allocations in ipcFixtures.hpp are fixed +// {umfProxyPoolOps(), nullptr, umfFileMemoryProviderOps(), +// &file_params_fsdax, &hostAccessor, true}, +#ifdef UMF_POOL_JEMALLOC_ENABLED + {umfJemallocPoolOps(), nullptr, umfFileMemoryProviderOps(), + &file_params_fsdax, &hostAccessor, false}, +#endif +#ifdef UMF_POOL_SCALABLE_ENABLED + {umfScalablePoolOps(), nullptr, umfFileMemoryProviderOps(), + &file_params_fsdax, &hostAccessor, false}, +#endif + }; + + return ipcFsDaxTestParamsList; +} + GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(umfIpcTest); INSTANTIATE_TEST_SUITE_P(FileProviderDifferentPoolsTest, umfIpcTest, ::testing::ValuesIn(ipcManyPoolsTestParamsList)); + +INSTANTIATE_TEST_SUITE_P(FileProviderDifferentPoolsFSDAXTest, umfIpcTest, + ::testing::ValuesIn(getIpcFsDaxTestParamsList())); diff --git a/test/supp/helgrind-umf_test-ipc.supp b/test/supp/helgrind-umf_test-ipc.supp new file mode 100644 index 000000000..e46140c19 --- /dev/null +++ b/test/supp/helgrind-umf_test-ipc.supp @@ -0,0 +1,16 @@ +{ + False-positive race in critnib_insert (lack of instrumentation) + Helgrind:Race + fun:store + fun:critnib_insert + ... +} + +{ + False-positive race in critnib_find (lack of instrumentation) + Helgrind:Race + fun:find_predecessor + fun:find_le + fun:critnib_find + ... +} diff --git a/test/supp/helgrind-umf_test-provider_file_memory_ipc.supp b/test/supp/helgrind-umf_test-provider_file_memory_ipc.supp new file mode 100644 index 000000000..e46140c19 --- /dev/null +++ b/test/supp/helgrind-umf_test-provider_file_memory_ipc.supp @@ -0,0 +1,16 @@ +{ + False-positive race in critnib_insert (lack of instrumentation) + Helgrind:Race + fun:store + fun:critnib_insert + ... +} + +{ + False-positive race in critnib_find (lack of instrumentation) + Helgrind:Race + fun:find_predecessor + fun:find_le + fun:critnib_find + ... +}