Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/reusable_qemu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
if: ${{ inputs.short_run == true }}
run: |
echo "SHORT_RUN=true" >> $GITHUB_ENV
declare -a short_configs=("default.xml" "sock_2_var3.xml" "sock_4_var1_hmat.xml")
declare -a short_configs=("default.xml" "sock_2_var3.xml" "sock_8_var1_hmat.xml")
echo "CONFIG_OPTIONS=${short_configs[@]}" >> $GITHUB_ENV

- name: Set vars if long run
Expand Down
17 changes: 14 additions & 3 deletions test/memspaces/memspace_numa.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023-2024 Intel Corporation
// Copyright (C) 2023-2025 Intel Corporation
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Expand Down Expand Up @@ -252,8 +252,8 @@ TEST_F(numaNodesCapacityTest, CapacityFilter) {
ret = umfMemspaceFilterByCapacity(hMemspace, filter_size);
ASSERT_EQ(ret, UMF_RESULT_SUCCESS);

ASSERT_EQ(umfMemspaceMemtargetNum(hMemspace), (capacities.size() + 1) / 2);
for (size_t i = 0; i < umfMemspaceMemtargetNum(hMemspace); i++) {
size_t num_filtered = umfMemspaceMemtargetNum(hMemspace);
for (size_t i = 0; i < num_filtered; i++) {
auto hTarget = umfMemspaceMemtargetGet(hMemspace, i);
ASSERT_NE(hTarget, nullptr);
size_t capacity;
Expand All @@ -266,6 +266,17 @@ TEST_F(numaNodesCapacityTest, CapacityFilter) {
capacities.erase(it);
}
}

// Number of filtered targets and remaining targets should match the total
// number of targets in the memspace
size_t num_all = umfMemspaceMemtargetNum(umfMemspaceHostAllGet());
ASSERT_EQ(num_filtered + capacities.size(), num_all);

// check that remaining capacities are less than filter_size
for (const auto &capacity : capacities) {
ASSERT_LT(capacity, filter_size);
}

umfMemspaceDestroy(hMemspace);
}

Expand Down
Loading