Skip to content

Commit

Permalink
Merge pull request autotest#5650 from QianJianhua1/hugepage1
Browse files Browse the repository at this point in the history
numa: use dynamic expected value for different architectures
  • Loading branch information
dzhengfy authored Jun 12, 2024
2 parents 69d614e + ddfefdf commit 0eac816
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import os
import re
import platform

from avocado.utils import memory
from avocado.utils import process
Expand Down Expand Up @@ -154,15 +153,12 @@ def _check_values(expect_huge, expect_N0, expect_N1, expect_sum=None):
mem_mode == 'prefered' and
not single_host_node) or \
(mem_mode in ['interleave', 'preferred'] and single_host_node):
if platform.machine() == 'aarch64':
_check_values(True, 3, 1)
else:
_check_values(True, 512, 500)
hpc = test_setup.HugePageConfig(test_obj.params)
N0_expect = hpc.get_node_num_huge_pages(all_nodes[0], expected_hugepage_size)
_check_values(True, N0_expect, int(mem_size/psize)-N0_expect)
elif not single_host_node and mem_mode == 'interleave':
if platform.machine() == 'aarch64':
_check_values(True, 2, 2)
else:
_check_values(True, 506, 506)
avg_value = int(mem_size/psize/2)
_check_values(True, avg_value, avg_value)
elif not single_host_node and mem_mode in ['strict', 'restrictive']:
_check_values(True, 0, 0, int(mem_size/psize))
test_obj.test.log.debug("Step: verify host numa node memory allocation PASS")
Expand Down

0 comments on commit 0eac816

Please sign in to comment.