Skip to content

fix coverity issue in multiple numa nodes test #570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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