Skip to content

Commit d3b25a8

Browse files
committed
Add IPC tests (umfIpcTest) for the devdax provider
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
1 parent f75e915 commit d3b25a8

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

test/provider_devdax_memory.cpp

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
#include "cpp_helpers.hpp"
1515
#include "test_helpers.h"
1616

17+
#define UMF_TEST_PROVIDER_FREE_NOT_SUPPORTED 1
18+
#include "ipcFixtures.hpp"
19+
#undef UMF_TEST_PROVIDER_FREE_NOT_SUPPORTED
20+
1721
#include <umf/memory_provider.h>
1822
#include <umf/providers/provider_devdax_memory.h>
1923

@@ -179,14 +183,15 @@ TEST_F(test, test_if_mapped_with_MAP_SYNC) {
179183

180184
// positive tests using test_alloc_free_success
181185

182-
auto defaultParams = umfDevDaxMemoryProviderParamsDefault(
186+
auto defaultDevDaxParams = umfDevDaxMemoryProviderParamsDefault(
183187
getenv("UMF_TESTS_DEVDAX_PATH"),
184188
atol(getenv("UMF_TESTS_DEVDAX_SIZE") ? getenv("UMF_TESTS_DEVDAX_SIZE")
185189
: "0"));
186190

187191
INSTANTIATE_TEST_SUITE_P(devdaxProviderTest, umfProviderTest,
188192
::testing::Values(providerCreateExtParams{
189-
umfDevDaxMemoryProviderOps(), &defaultParams}));
193+
umfDevDaxMemoryProviderOps(),
194+
&defaultDevDaxParams}));
190195

191196
TEST_P(umfProviderTest, create_destroy) {}
192197

@@ -343,3 +348,15 @@ TEST_F(test, create_wrong_size_0) {
343348
EXPECT_EQ(ret, UMF_RESULT_ERROR_INVALID_ARGUMENT);
344349
EXPECT_EQ(hProvider, nullptr);
345350
}
351+
352+
HostMemoryAccessor hostAccessor;
353+
354+
static std::vector<ipcTestParams> ipcProxyPoolTestParamsList = {
355+
{umfProxyPoolOps(), nullptr, umfDevDaxMemoryProviderOps(),
356+
&defaultDevDaxParams, &hostAccessor},
357+
};
358+
359+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(umfIpcTest);
360+
361+
INSTANTIATE_TEST_SUITE_P(DevDaxProviderProxyPoolTest, umfIpcTest,
362+
::testing::ValuesIn(ipcProxyPoolTestParamsList));

0 commit comments

Comments
 (0)