this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

test(e2e): require KVM for harness

Khue Doan 8b192f62 e358d702

+9 -9
+9 -9
tests/e2e/run.py
··· 289 289 dnsmasq_conf = workdir / "dnsmasq.conf" 290 290 make_dnsmasq_config(dnsmasq_conf, bridge) 291 291 292 - use_kvm = os.path.exists("/dev/kvm") and os.access("/dev/kvm", os.R_OK | os.W_OK) 293 - if use_kvm: 294 - log("using KVM acceleration") 295 - else: 296 - log("KVM is unavailable, falling back to software emulation") 292 + if not os.path.exists("/dev/kvm"): 293 + print("/dev/kvm is required to run the e2e harness", file=sys.stderr) 294 + return 1 295 + if not os.access("/dev/kvm", os.R_OK | os.W_OK): 296 + print("/dev/kvm is present but not accessible; fix its permissions and retry", file=sys.stderr) 297 + return 1 298 + 299 + log("using KVM acceleration") 297 300 298 301 try: 299 302 run(["ip", "link", "add", bridge, "type", "bridge"]) ··· 374 377 "-device", 375 378 f"e1000,netdev=net0,mac={machine['mac']},bootindex=1", 376 379 ] 377 - if use_kvm: 378 - cmd.extend(["-enable-kvm", "-cpu", "host"]) 379 - else: 380 - cmd.extend(["-cpu", "max"]) 380 + cmd.extend(["-enable-kvm", "-cpu", "host"]) 381 381 382 382 qemu_log = workdir / f"{machine['name']}.qemu.log" 383 383 qemu_proc, qemu_handle = start_process(machine["name"], cmd, qemu_log)