diff --git a/libvirt/tests/src/numa/guest_numa_node_tuning/memory_binding_setting.py b/libvirt/tests/src/numa/guest_numa_node_tuning/memory_binding_setting.py index ec21281ef02..26ee63fd1c5 100644 --- a/libvirt/tests/src/numa/guest_numa_node_tuning/memory_binding_setting.py +++ b/libvirt/tests/src/numa/guest_numa_node_tuning/memory_binding_setting.py @@ -165,8 +165,9 @@ def verify_cgroup(test_obj): mem_mode = test_obj.params.get('mem_mode') 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') + cg = libvirt_cgroup.CgroupTest(vm_pid) + 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']: