Skip to content
Open
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
4 changes: 3 additions & 1 deletion libvirt/tests/src/virsh_cmd/domain/virsh_emulatorpin.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ def check_allowed_list(test, check_list):
:raises: test.fail if get unexpected emulatorpin value
:return: None
"""
pid = process.run('pidof qemu-kvm', shell=True).stdout_text.strip()
# Generic command to get top process id for qemu-kvm or qemu-system-*
pid_cmd = "pgrep -x \"$(ps -eo comm | grep -E \'^(qemu-system-|qemu-kvm)\' | head -n1)\""
pid = process.run(pid_cmd, shell=True).stdout_text.strip()
res = cpuutils.cpu_allowed_list_by_task(pid, pid)
if res == check_list:
logging.info("Get expected emulatorpin value.")
Expand Down