From a0bcdd207ed7e820b3a0c6d60da96a89826c6bfb Mon Sep 17 00:00:00 2001 From: Haotong Chen Date: Fri, 15 Jun 2018 16:12:56 +0800 Subject: [PATCH] Python 3: fix a process issue porcess.system_output needs to set ignore_status=True and decode the return value for later usage. Signed-off-by: Haotong Chen --- qemu/tests/vhost_with_cgroup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qemu/tests/vhost_with_cgroup.py b/qemu/tests/vhost_with_cgroup.py index 4c60c197..c08eb371 100644 --- a/qemu/tests/vhost_with_cgroup.py +++ b/qemu/tests/vhost_with_cgroup.py @@ -54,9 +54,10 @@ def run(test, params, env): assign_vm_into_cgroup(vm, cgroup, 0) vhost_pids = process.system_output("pidof vhost-%s" % vm.get_pid(), - shell=True) + shell=True, + ignore_status=True).decode() if not vhost_pids: - test.error("Vhost process not exise") + test.error("Vhost process does not exist") logging.info("Vhost have started with pid %s" % vhost_pids) for vhost_pid in vhost_pids.strip().split(): cgroup.set_cgroup(int(vhost_pid)) -- GitLab