Skip to content

Commit

Permalink
Merge pull request #5003 from dzhengfy/fix_cgroup_v1_matching
Browse files Browse the repository at this point in the history
memory_binding_setting: fix cgroup v1 checking
  • Loading branch information
Yingshun authored Jul 3, 2023
2 parents 62bf1b9 + 404319e commit 0620b8c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ def verify_cgroup(test_obj):
nodeset = numa_base.convert_to_string_with_dash(test_obj.params.get('nodeset'))
vm_pid = test_obj.vm.get_pid()
cg = libvirt_cgroup.CgroupTest(vm_pid)
cpuset_mems_cgroup_path = os.path.join(cg.get_cgroup_path(), 'emulator/cpuset.mems')
surfix = 'emulator/cpuset.mems' if cg.is_cgroup_v2_enabled() else 'cpuset.mems'
cpuset_mems_cgroup_path = os.path.join(cg.get_cgroup_path(controller='cpuset'), surfix)
cmd = 'cat %s' % re.escape(cpuset_mems_cgroup_path)
cpuset_mems = process.run(cmd, shell=True).stdout_text.strip()
if mem_mode in ['strict', 'restrictive']:
Expand Down

0 comments on commit 0620b8c

Please sign in to comment.