diff mbox series

[v3,05/14] tests/vm: run test builds on snapshot

Message ID 20190520124716.30472-6-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series tests/vm: serial console autoinstall, misc fixes. | expand

Commit Message

Gerd Hoffmann May 20, 2019, 12:47 p.m. UTC
The build script doesn't shutdown the guest VMs properly,
which results in filesystem corruption and guest boot
failures sooner or later.

Use the --snapshot to run builds on a snapshot,
That way killing the VM doesn't corrupt the base image.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
---
 tests/vm/Makefile.include | 1 +
 1 file changed, 1 insertion(+)

Comments

Philippe Mathieu-Daudé May 20, 2019, 6:03 p.m. UTC | #1
On 5/20/19 2:47 PM, Gerd Hoffmann wrote:
> The build script doesn't shutdown the guest VMs properly,
> which results in filesystem corruption and guest boot
> failures sooner or later.
> 
> Use the --snapshot to run builds on a snapshot,
> That way killing the VM doesn't corrupt the base image.

Yes!

> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> Tested-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  tests/vm/Makefile.include | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
> index 992d823f6bd2..d628e0a986f6 100644
> --- a/tests/vm/Makefile.include
> +++ b/tests/vm/Makefile.include
> @@ -53,6 +53,7 @@ vm-build-%: $(IMAGES_DIR)/%.img
>  		$(if $(V),--verbose) \
>  		--image "$<" \
>  		$(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \
> +		--snapshot \
>  		--build-qemu $(SRC_PATH) -- \
>  		$(if $(TARGET_LIST),--target-list=$(TARGET_LIST)) \
>  		$(if $(EXTRA_CONFIGURE_OPTS),$(EXTRA_CONFIGURE_OPTS)), \
>
Ed Maste May 24, 2019, 8:15 a.m. UTC | #2
On Mon, 20 May 2019 at 08:47, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> The build script doesn't shutdown the guest VMs properly,
> which results in filesystem corruption and guest boot
> failures sooner or later.
>
> Use the --snapshot to run builds on a snapshot,
> That way killing the VM doesn't corrupt the base image.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> Tested-by: Thomas Huth <thuth@redhat.com>

Acked-by: Ed Maste <emaste@freebsd.org>
diff mbox series

Patch

diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index 992d823f6bd2..d628e0a986f6 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -53,6 +53,7 @@  vm-build-%: $(IMAGES_DIR)/%.img
 		$(if $(V),--verbose) \
 		--image "$<" \
 		$(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \
+		--snapshot \
 		--build-qemu $(SRC_PATH) -- \
 		$(if $(TARGET_LIST),--target-list=$(TARGET_LIST)) \
 		$(if $(EXTRA_CONFIGURE_OPTS),$(EXTRA_CONFIGURE_OPTS)), \