From 8debc6bb5899ad23b3e49928559cb348870f09e7 Mon Sep 17 00:00:00 2001 From: Xu Han Date: Fri, 20 Apr 2018 14:12:44 +0800 Subject: [PATCH] timedrift: Fix the issue of set_cpu_affinity Signed-off-by: Xu Han --- qemu/tests/timedrift.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qemu/tests/timedrift.py b/qemu/tests/timedrift.py index 821b8b29..cba4060d 100644 --- a/qemu/tests/timedrift.py +++ b/qemu/tests/timedrift.py @@ -38,7 +38,7 @@ def run(test, params, env): :return: A dict containing the previous mask for each thread. """ tids = process.system_output("ps -L --pid=%s -o lwp=" % pid, - verbose=False).split() + verbose=False, ignore_status=True).split() prev_masks = {} for tid in tids: prev_mask = process.system_output("taskset -p %s" % tid, @@ -46,7 +46,8 @@ def run(test, params, env): prev_masks[tid] = prev_mask process.system("taskset -p %s %s" % (mask, tid), verbose=False) children = process.system_output("ps --ppid=%s -o pid=" % pid, - verbose=False).split() + verbose=False, + ignore_status=True).split() for child in children: prev_masks.update(set_cpu_affinity(child, mask)) return prev_masks -- GitLab