Skip to content

Commit 1b0aaca

Browse files
committed
contest: vm: let user add qemu options
Setting QEMU options via virtme_opts is hard, because QEMU opts may contain , which virtme_opts treat as separator. Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9f49004 commit 1b0aaca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contest/remote/lib/vm.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
configs=relative/path/config,another/config
3838
init_prompt=expected_on-boot#
3939
virtme_opt=--opt,--another one
40+
qemu_opt=--opt,this is --same one
4041
default_timeout=15
4142
boot_timeout=45
4243
slowdown=2.5 # mark the machine as slow and multiply the ksft timeout by 2.5
@@ -181,6 +182,9 @@ def start(self, cwd=None):
181182
opts = self.config.get('vm', 'virtme_opt', fallback="")
182183
cmd += opts.split(',') if opts else []
183184

185+
opts = self.config.get('vm', 'qemu_opt', fallback="")
186+
cmd += ["-o", " " + opts] if opts else []
187+
184188
cpus = self.config.get('vm', 'cpus', fallback="")
185189
if cpus:
186190
cmd += ["--cpus", cpus]

0 commit comments

Comments
 (0)