tests/ssh_linux_malta: Run tests using a snapshot image
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sat, 19 Oct 2019 15:34:33 +0000 (17:34 +0200)
committerAleksandar Markovic <amarkovic@wavecomp.com>
Fri, 25 Oct 2019 16:37:01 +0000 (18:37 +0200)
If a test fails, it can corrupt the underlying QCow2 image,
making further tests failing.
Fix this by running each test with a snapshot.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <20191019153437.9820-8-f4bug@amsat.org>

tests/acceptance/linux_ssh_mips_malta.py

index 25a1df5098a132d3903ceb3349ec28a4368bbf09..6ecf33509c239edad2dcfd09d7db734dd232d36e 100644 (file)
@@ -102,7 +102,7 @@ class LinuxSSH(Test):
         self.vm.add_args('-no-reboot',
                          '-kernel', kernel_path,
                          '-append', kernel_command_line,
-                         '-hda', image_path,
+                         '-drive', 'file=%s,snapshot=on' % image_path,
                          '-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22',
                          '-device', 'pcnet,netdev=vnet')
         self.vm.launch()