Skip to content

Commit

Permalink
Merge pull request #570 from lplewa/cov1
Browse files Browse the repository at this point in the history
fix coverity issue in multiple numa nodes test
  • Loading branch information
lplewa authored Jun 26, 2024
2 parents 4eaed40 + 56d1cf2 commit 7d0f8c4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/provider_os_memory_multiple_numa_nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,9 @@ TEST_F(testNuma, checkModeInterleave) {
// The page allocations are interleaved across the set of nodes specified in nodemask.
TEST_F(testNuma, checkModeInterleaveCustomPartSize) {
constexpr int part_num = 1024;
size_t page_size = sysconf(_SC_PAGE_SIZE);
long _page_size = sysconf(_SC_PAGE_SIZE);
ASSERT_GT(_page_size, 0);
size_t page_size = _page_size;
size_t part_size = page_size * 100;
umf_os_memory_provider_params_t os_memory_provider_params =
UMF_OS_MEMORY_PROVIDER_PARAMS_TEST;
Expand Down Expand Up @@ -538,8 +540,10 @@ INSTANTIATE_TEST_SUITE_P(checkModeSplit, testNumaSplit,

// positive test for numa mode split
TEST_P(testNumaSplit, checkModeSplit) {
auto param = GetParam();
size_t page_size = sysconf(_SC_PAGE_SIZE);
auto &param = GetParam();
long _page_size = sysconf(_SC_PAGE_SIZE);
ASSERT_GT(_page_size, 0);
size_t page_size = _page_size;
auto [required_numa_nodes, pages, in, out] = param;

umf_os_memory_provider_params_t os_memory_provider_params =
Expand Down

0 comments on commit 7d0f8c4

Please sign in to comment.