Skip to content

Commit

Permalink
Merge pull request #4249 from mcasquer/numa_hmat_updates_qemu_version…
Browse files Browse the repository at this point in the history
…_function

numa_hmat: replaces the get qemu_version function
  • Loading branch information
YongxueHong authored Jan 16, 2025
2 parents 3accaae + 2e0797e commit bd33da7
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions qemu/tests/numa_hmat.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import os
import re

from virttest import env_process, utils_misc
from virttest import env_process, utils_misc, utils_qemu
from virttest.utils_version import VersionInterval


Expand All @@ -14,10 +11,8 @@ def run(test, params, env):
:param env: Dictionary with test environment.
"""
qemu_path = utils_misc.get_qemu_binary(params)
qemu_version = env_process._get_qemu_version(qemu_path)
version_pattern = r"%s-(\d+\.\d+\.\d+)" % os.path.basename(qemu_path)
host_qemu = re.findall(version_pattern, qemu_version)[0]
if host_qemu in VersionInterval("[,5.2.0)"):
qemu_version = utils_qemu.get_qemu_version(qemu_path)[0]
if qemu_version in VersionInterval("[,5.2.0)"):
params["numa_hmat_caches_size_hmat_cache1"] = "50K"
params["numa_hmat_caches_size_hmat_cache2"] = "40K"
params["numa_hmat_caches_size_hmat_cache3"] = "80K"
Expand Down

0 comments on commit bd33da7

Please sign in to comment.