Skip to content

Coverity fixes #573

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 2 commits into from
Jun 27, 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
8 changes: 4 additions & 4 deletions test/provider_os_memory_multiple_numa_nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,15 +558,15 @@ TEST_P(testNumaSplit, checkModeSplit) {
ASSERT_EQ(out.size(), pages)
<< "Wrong test input - out array size doesn't match page count";

auto v = numa_nodes;
// If input partitions are not defined then partitions are created based on numa_list order.
// Do not shuffle them in this case, as this test require deterministic binds
if (in.size() != 0) {
std::mt19937 g(0);
std::shuffle(v.begin(), v.begin() + required_numa_nodes, g);
std::shuffle(numa_nodes.begin(),
numa_nodes.begin() + required_numa_nodes, g);
}

os_memory_provider_params.numa_list = v.data();
os_memory_provider_params.numa_list = numa_nodes.data();
os_memory_provider_params.numa_list_len = required_numa_nodes;
os_memory_provider_params.numa_mode = UMF_NUMA_MODE_SPLIT;

Expand All @@ -586,7 +586,7 @@ TEST_P(testNumaSplit, checkModeSplit) {
memset(ptr, 0xFF, size);
// Test where each page will be allocated.
size_t index = 0;
for (auto x : out) {
for (const auto &x : out) {
numa_bitmask_clearall(nodemask);

// Query the memory policy for the specific address
Expand Down