summaryrefslogtreecommitdiff
path: root/tests/vm/Makefile.include
AgeCommit message (Collapse)Author
2020-07-11tests/vm: Add workaround to consume consoleRobert Foley
This adds support to basevm.py so that we always drain the console chars. This makes use of support added in an earlier commit that allows QEMUMachine to use the ConsoleSocket. This is a workaround we found was needed since there is a known issue where QEMU will hang waiting for console characters to be consumed. We also added the option of logging the console to a file. LOG_CONSOLE=1 will now log the output to a file. Signed-off-by: Robert Foley <robert.foley@linaro.org> Reviewed-by: Peter Puhov <peter.puhov@linaro.org> Acked-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200601211421.1277-10-robert.foley@linaro.org> Message-Id: <20200701135652.1366-14-alex.bennee@linaro.org>
2020-07-11tests/vm: Added a new script for centos.aarch64.Robert Foley
centos.aarch64 creates a CentOS 8 image. Also added a new kickstart script used to build the centos.aarch64 image. Signed-off-by: Robert Foley <robert.foley@linaro.org> Reviewed-by: Peter Puhov <peter.puhov@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200601211421.1277-7-robert.foley@linaro.org> Message-Id: <20200701135652.1366-11-alex.bennee@linaro.org>
2020-07-11tests/vm: Added a new script for ubuntu.aarch64.Robert Foley
ubuntu.aarch64 provides a script to create an Ubuntu 18.04 VM. Another new file is also added aarch64vm.py, which is a module with common methods used by aarch64 VMs, such as how to create the flash images. Signed-off-by: Robert Foley <robert.foley@linaro.org> Reviewed-by: Peter Puhov <peter.puhov@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200601211421.1277-6-robert.foley@linaro.org> Message-Id: <20200701135652.1366-10-alex.bennee@linaro.org>
2020-07-11tests/vm: Added configuration file supportRobert Foley
Changes to tests/vm/basevm.py to allow accepting a configuration file as a parameter. Allows for specifying VM options such as cpu, machine, memory, and arbitrary qemu arguments for specifying options such as NUMA configuration. Also added an example conf_example_aarch64.yml and conf_example_x86.yml. Signed-off-by: Robert Foley <robert.foley@linaro.org> Reviewed-by: Peter Puhov <peter.puhov@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200601211421.1277-4-robert.foley@linaro.org> Message-Id: <20200701135652.1366-8-alex.bennee@linaro.org>
2020-05-31tests/vm: Add ability to select QEMU from current buildRobert Foley
Added a new special variable QEMU_LOCAL=1, which will indicate to take the QEMU binary from the current build. Signed-off-by: Robert Foley <robert.foley@linaro.org> Reviewed-by: Peter Puhov <peter.puhov@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200529203458.1038-6-robert.foley@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-31tests/vm: Pass --debug through for vm-boot-sshRobert Foley
This helps debug issues that occur during the boot sequence. Signed-off-by: Robert Foley <robert.foley@linaro.org> Reviewed-by: Peter Puhov <peter.puhov@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200529203458.1038-5-robert.foley@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-05-27tests/vm: pass --genisoimage to basevm scriptAlex Bennée
If we have an alternative to genisoimage we really need to tell the script about it as well so it can use it. It will still default to genisoimage in case it is run outside our build machinery. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Robert Foley <robert.foley@linaro.org> Message-Id: <20200519132259.405-3-robert.foley@linaro.org>
2020-03-04configure: detect and report genisoimageAlex Bennée
This is used for some of the vm-build tests so lets detect it and behave sanely when it is not installed. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200303150622.20133-8-alex.bennee@linaro.org>
2020-03-04tests/vm: use $(PYTHON) consistentlyRobert Foley
Change Makefile.include to use $(PYTHON) so for vm-boot-ssh to be consistent with other cases like vm-build. Signed-off-by: Robert Foley <robert.foley@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Puhov <peter.puhov@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200219163537.22098-2-robert.foley@linaro.org> Message-Id: <20200303150622.20133-2-alex.bennee@linaro.org>
2019-12-18tests/vm: Allow to set qemu-img pathWainer dos Santos Moschetta
By default VM build test use qemu-img from system's PATH to create the image disk. Due the lack of qemu-img on the system or the desire to simply use a version built with QEMU, it would be nice to allow one to set its path. So this patch makes that possible by reading the path to qemu-img from QEMU_IMG if set, otherwise it fallback to default behavior. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20191114134246.12073-2-wainersm@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-05tests/vm: Take the J=x setting into account for the vm-boot-ssh targets, tooThomas Huth
For testing whether the VMs can deal with multiple CPUs correctly, it is useful to be able to use the "J=<cpus>" setting for the vm-boot-ssh targets, too. Message-Id: <20190726100207.19112-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-07-04Makefile: Rename the 'vm-test' target as 'vm-help'Philippe Mathieu-Daudé
We already have 'make check-help', use the 'make vm-help' form to display helps about VM testing. Keep the old target to not bother old customs. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20190531064341.29730-1-philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-04tests/vm: fedora autoinstall, using serial consoleGerd Hoffmann
Download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Yes, we have docker images for fedora. But for trouble-shooting it might be helpful to have a vm too. When vm builds fail you can use it to figure whenever the vm setup or the guest os is the problem. 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> Message-Id: <20190617043858.8290-11-kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-04tests/vm: add vm-boot-{ssh,serial}-<guest> targetsGerd Hoffmann
For testing/troubleshooting convenience. make vm-boot-serial-<guest> Boot guest, with the serial console on stdio. make vm-boot-ssh-<guest> Boot guest, login via ssh. 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> Message-Id: <20190617043858.8290-6-kraxel@redhat.com> [AJB: added tags] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-04tests/vm: run test builds on snapshotGerd Hoffmann
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> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190617043858.8290-4-kraxel@redhat.com> [AJB: added tags] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-06-12tests/vm: Add missing variables on helpWainer dos Santos Moschetta
Added description of variables missing on vm-test help. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20190329210804.22121-6-wainersm@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-06-12tests/vm: Use python configured on buildWainer dos Santos Moschetta
Changed the vm-test makefile to execute python scripts with the interpreter configured on build. This allows to run vm-test targets properly in Linux distros with Python 3 only support. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20190329210804.22121-2-wainersm@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-02-08tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTSAlex Bennée
Now the underlying basevm support passes these along we can expose some additional variables to our Makefile to allow more customised tweaking of the build. For example: make vm-build-freebsd TARGET_LIST=aarch64-softmmu \ EXTRA_CONFIGURE_OPTS="--disable-tools --disable-docs" \ BUILD_TARGET=check-softfloat Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-02-08tests/vm: move images to $HOME/.cache/qemu-vm/imagesGerd Hoffmann
It's easier to move around the images then, by replacing the subdirectory with a symlink. Allows to share the images between multiple qemu checkouts for example. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2018-08-15tests/vm: Add vm-build-all/vm-clean-all in help textFam Zheng
Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20180727083445.21436-1-famz@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2018-08-15tests/vm: Propagate V=1 down into the make inside the VMPeter Maydell
Invoking 'make vm-build-freebsd' and friends with V=1 should propagate that verbosity setting down into the build run inside the VM. Make sure we do that. This brings it into line with how the container tests handle V=1. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20180803085230.30574-4-peter.maydell@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2018-08-15tests: vm: Add vm-clean-allFam Zheng
The images are big. Add a rule to clean up easily. Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20180716020008.31468-1-famz@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2018-08-15tests: Add centos VM testingFam Zheng
This one does docker testing in the VM. It is intended to replace the native docker testing on patchew testers. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20180712012829.20231-5-famz@redhat.com> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-09-22Makefile: Add rules to run vm testsFam Zheng
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>