@@ -27,6 +27,17 @@ umf_file_memory_provider_params_t get_file_params_shared(char *path) {
2727umf_file_memory_provider_params_t file_params_shared =
2828 get_file_params_shared (FILE_PATH);
2929
30+ umf_file_memory_provider_params_t get_file_params_fsdax (char *path) {
31+ umf_file_memory_provider_params_t file_params =
32+ umfFileMemoryProviderParamsDefault (path);
33+ file_params.visibility = UMF_MEM_MAP_SYNC;
34+ file_params.is_fsdax = true ;
35+ return file_params;
36+ }
37+
38+ umf_file_memory_provider_params_t file_params_fsdax =
39+ get_file_params_fsdax (getenv(" UMF_TESTS_FSDAX_PATH" ));
40+
3041HostMemoryAccessor hostAccessor;
3142
3243static std::vector<ipcTestParams> ipcManyPoolsTestParamsList = {
@@ -43,7 +54,36 @@ static std::vector<ipcTestParams> ipcManyPoolsTestParamsList = {
4354#endif
4455};
4556
57+ static std::vector<ipcTestParams> getIpcFsDaxTestParamsList (void ) {
58+ std::vector<ipcTestParams> ipcFsDaxTestParamsList = {};
59+
60+ char *path = getenv (" UMF_TESTS_FSDAX_PATH" );
61+ if (path == nullptr || path[0 ] == 0 ) {
62+ // skipping the test, UMF_TESTS_FSDAX_PATH is not set
63+ return ipcFsDaxTestParamsList;
64+ }
65+
66+ ipcFsDaxTestParamsList = {
67+ // TODO: enable it when sizes of allocations in ipcFixtures.hpp are fixed
68+ // {umfProxyPoolOps(), nullptr, umfFileMemoryProviderOps(),
69+ // &file_params_fsdax, &hostAccessor, true},
70+ #ifdef UMF_POOL_JEMALLOC_ENABLED
71+ {umfJemallocPoolOps (), nullptr , umfFileMemoryProviderOps (),
72+ &file_params_fsdax, &hostAccessor, false },
73+ #endif
74+ #ifdef UMF_POOL_SCALABLE_ENABLED
75+ {umfScalablePoolOps (), nullptr , umfFileMemoryProviderOps (),
76+ &file_params_fsdax, &hostAccessor, false },
77+ #endif
78+ };
79+
80+ return ipcFsDaxTestParamsList;
81+ }
82+
4683GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST (umfIpcTest);
4784
4885INSTANTIATE_TEST_SUITE_P (FileProviderDifferentPoolsTest, umfIpcTest,
4986 ::testing::ValuesIn (ipcManyPoolsTestParamsList));
87+
88+ INSTANTIATE_TEST_SUITE_P (FileProviderDifferentPoolsFSDAXTest, umfIpcTest,
89+ ::testing::ValuesIn (getIpcFsDaxTestParamsList()));
0 commit comments