Merge pull request #2392 from GNS3/bugfix/2385

Forbid unsafe Qemu additional options
This commit is contained in:
Jeremy Grossmann authored and GitHub committed 2024-07-06 17:18:59 +02:00
commit 90dce03da2
3 files changed
+27 -1

No files matched your search

+8
View File
@@ -774,6 +774,14 @@ async def test_build_command_with_invalid_options(vm):
await vm._build_command()
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows")
async def test_build_command_with_forbidden_options(vm):
vm.options = "-blockdev"
with pytest.raises(QemuError):
await vm._build_command()
def test_hda_disk_image(vm, images_dir):
open(os.path.join(images_dir, "test1"), "w+").close()