From: Xiaoqing Wei <[email protected]> maxcpus is a sub-option of -smp, so need a Regrex to match
Signed-off-by: Xiaoqing Wei <[email protected]> --- virttest/qemu_vm.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/virttest/qemu_vm.py b/virttest/qemu_vm.py index 3c5bf9a..c076106 100644 --- a/virttest/qemu_vm.py +++ b/virttest/qemu_vm.py @@ -455,7 +455,8 @@ class VM(virt_vm.BaseVM): def add_smp(help_text): smp_str = " -smp %d" % self.cpuinfo.smp - if has_option(help_text, "maxcpus=cpus"): + smp_pattern = "smp n\[,maxcpus=cpus\].*" + if has_option(help, smp_pattern): smp_str += ",maxcpus=%d" % self.cpuinfo.maxcpus smp_str += ",cores=%d" % self.cpuinfo.cores smp_str += ",threads=%d" % self.cpuinfo.threads -- 1.7.1 _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
