summaryrefslogtreecommitdiffstats
path: root/tests/vm
Commit message (Collapse)AuthorAgeFilesLines
...
* tests/vm: use console_consume for netbsdGerd Hoffmann2019-11-121-1/+1
| | | | | | | | | | | Use new helper to read all pending console output, not just a single char. Unblocks installer boot. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20191031085306.28888-4-kraxel@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>
* tests/vm: add console_consume helperGerd Hoffmann2019-11-121-0/+19
| | | | | | | | | | Helper function to read all console output. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20191031085306.28888-3-kraxel@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>
* tests/vm: netbsd autoinstall, using serial consoleGerd Hoffmann2019-11-121-10/+177
| | | | | | | | | | | | | | | | | Instead of fetching the prebuilt image from patchew 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. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Kamil Rytarowski <n54@gmx.com> Tested-by: Thomas Huth <thuth@redhat.com> [ehabkost: rebased to latest qemu.git master] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20191031085306.28888-2-kraxel@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>
* tests/vm/netbsd: Disable IPv6Eduardo Habkost2019-10-251-0/+7
| | | | | | | | | Workaround for issues when the host has no IPv6 connectivity. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20191018181705.17957-4-ehabkost@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: Let subclasses disable IPv6Eduardo Habkost2019-10-251-1/+4
| | | | | | | | | | | The mechanism will be used to work around issues related to IPv6 on the netbsd image builder. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20191018181705.17957-3-ehabkost@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* Fedora images: use URLs from stable "archives.fedoraproject.org"Cleber Rosa2019-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The LinuxInitrd.test_with_2gib_file_should_work_with_linux_v4_16 test, from tests/acceptance/linux_initrd.py, is currently failing to fetch the "vmlinuz" file. The reason for the failure is that the Fedora project retires older versions from the "dl.fedoraproject.org" URL, and keeps them in "archives.fedoraproject.org". As an added note, that test uses a Fedora 28 image, because of the specific Linux kernel version requirements of the test. For the sake of stability, let's use URLs from the archived and supposedely ever stable URLs. The good news is that the currently supported versions are also hosted on the later. This change limits itself to change the URLs, while keeping the fetched files the same (as can be evidenced by the unchanged hashes). Documentation and the "vm tests" fedora definition were also updated. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Yash Mankad <ymankad@redhat.com> Message-Id: <20190904005218.12536-1-crosa@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: Take the J=x setting into account for the vm-boot-ssh targets, tooThomas Huth2019-09-051-0/+1
| | | | | | | | | 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>
* Makefile: Rename the 'vm-test' target as 'vm-help'Philippe Mathieu-Daudé2019-07-041-2/+3
| | | | | | | | | | | 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>
* tests/vm: ubuntu.i386: apt proxy setupGerd Hoffmann2019-07-041-0/+4
| | | | | | | | | | Configure apt proxy so package downloads can be cached and can pass firewalls. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190617043858.8290-12-kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: fedora autoinstall, using serial consoleGerd Hoffmann2019-07-043-2/+199
| | | | | | | | | | | | | | | | | 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>
* tests/vm: freebsd autoinstall, using serial consoleGerd Hoffmann2019-07-041-10/+172
| | | | | | | | | | | | | | | | | | | Instead of fetching the prebuilt image from patchew 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. Note that freebsd package downloads are delivered as non-cachable content, so I had to configure squid with "ignore-no-store ignore-private ignore-reload" for pkgmir.geo.freebsd.org to make the caching actually work. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20190617043858.8290-9-kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: openbsd autoinstall, using serial consoleGerd Hoffmann2019-07-041-13/+148
| | | | | | | | | | | | | | Instead of fetching the prebuilt image from patchew 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. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190617043858.8290-8-kraxel@redhat.com> [AJB: added tags] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: serial console support helpersGerd Hoffmann2019-07-041-3/+83
| | | | | | | | | | | | | | | | Add a bunch of helpers to talk to the guest using the serial console. Also drop the hard-coded -serial parameter for the vm so QEMUMachine.set_console() actually works. 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-7-kraxel@redhat.com> [AJB: added tags] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: add vm-boot-{ssh,serial}-<guest> targetsGerd Hoffmann2019-07-041-0/+19
| | | | | | | | | | | | | | | | | | 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>
* tests/vm: proper guest shutdownGerd Hoffmann2019-07-041-7/+15
| | | | | | | | | | | | | When not running in snapshot mode ask the guest to poweroff and wait for this to finish instead of simply quitting qemu, so the guest can flush pending updates to disk. 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-5-kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: run test builds on snapshotGerd Hoffmann2019-07-041-0/+1
| | | | | | | | | | | | | | | | | | 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>
* tests/vm: use ssh with pty unconditionallyGerd Hoffmann2019-07-041-9/+4Star
| | | | | | | | | | | | Allways ask ssh to run with a pseudo terminal. Not having a terminal causes problems now and then. 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-3-kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: send proxy environment variables over sshGerd Hoffmann2019-07-041-0/+9
| | | | | | | | | | | | | | | Packages are fetched via proxy that way, if configured on the host. That might be required to pass firewalls, and it allows to route package downloads through a caching proxy server. Needs AcceptEnv setup in sshd_config on the guest side to work. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190617043858.8290-2-kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: add source repos on ubuntu.i386Cleber Rosa2019-07-041-0/+1
| | | | | | | | | | | | | | | | Possibly because of different behavior on the newly update cloud-image, trying to run 'apt-get build-dep' results in: E: You must put some 'source' URIs in your sources.list This enables all source repos (even though some are not needed) for simplicity sake. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190613130718.3763-5-crosa@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: pin ubuntu.i386 imageCleber Rosa2019-07-041-1/+3
| | | | | | | | | | | | | | | | | It's a good practice to always have the same components used in tests. According to: https://cloud-images.ubuntu.com/releases/16.04/ New images are released from time to time, and the "release/" directory points to the latest release. Let's pin to the latest available version, and while at it, set a hash for verification. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190613130718.3763-4-crosa@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: avoid image presence check and removalCleber Rosa2019-07-045-10/+0Star
| | | | | | | | | | | | | Python's os.rename() will silently replace an existing file, so there's no need for the extra check and removal. Reference: https://docs.python.org/3/library/os.html#os.rename Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190613130718.3763-3-crosa@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: avoid extra compressed image copyCleber Rosa2019-07-044-8/+8
| | | | | | | | | | | | The image copy is only really needed because xz doesn't know to properly decompress a file not named properly. Instead of decompressing to stdout, and having to rely on a shell, let's just create a link instead of copying the file. Signed-off-by: Cleber Rosa <crosa@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190613130718.3763-2-crosa@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* python/qemu: split QEMUMachine out from underneath __init__.pyJohn Snow2019-07-021-1/+2
| | | | | | | | | | | | It's not obvious that something named __init__.py actually houses important code that isn't relevant to python packaging glue. Move the QEMUMachine and related error classes out into their own module. Adjust users to the new import location. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20190627212816.27298-2-jsnow@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* tests/vm: python3 fixesGerd Hoffmann2019-06-121-5/+6
| | | | | | | | | | | | Add proper unicode handling when processing strings. Also need to explicitly say we want int not float. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190520124716.30472-3-kraxel@redhat.com> [AJB: fix conflicts with tests/vm: Port basevm to Python 3] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: Add missing variables on helpWainer dos Santos Moschetta2019-06-121-2/+6
| | | | | | | | | | 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>
* tests/vm: Fix build-centos docker-based tests runWainer dos Santos Moschetta2019-06-121-3/+3
| | | | | | | | | | | `make vm-build-centos` run docker-based tests on CentOS. The created containers should have network otherwise some tests fail. Also fixed the BUILD_SCRIPT template to correctly evaluate "V=1" for verbose output. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20190329210804.22121-5-wainersm@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: Port basevm to Python 3Wainer dos Santos Moschetta2019-06-121-4/+4
| | | | | | | | | | | | | Fixed tests/vm/basevm.py to run with Python 3: - hashlib.sha1() requires an binary encoded object. - uses floor division ("//") (PEP 238). - decode bytes to unicode when needed. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190329210804.22121-3-wainersm@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* tests/vm: Use python configured on buildWainer dos Santos Moschetta2019-06-121-2/+2
| | | | | | | | | | | | | 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>
* Introduce a Python module structureCleber Rosa2019-02-221-1/+1
| | | | | | | | | | | | | | | | | | This is a simple move of Python code that wraps common QEMU functionality, and are used by a number of different tests and scripts. By treating that code as a real Python module, we can more easily: * reuse code * have a proper place for the module's own unittests * apply a more consistent style * generate documentation Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Caio Carrara <ccarrara@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20190206162901.19082-2-crosa@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>
* tests/vm: Be verbose while extracting compressed imagesPhilippe Mathieu-Daudé2019-02-114-4/+8
| | | | | | | | | | Depending of the host hardware, copying and extracting VM images can take up to few minutes. Add verbosity to avoid the user to worry about VMs hanging. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190129175403.18017-2-philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTSAlex Bennée2019-02-081-1/+9
| | | | | | | | | | | | | | 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>
* tests/vm: add --build-target optionAlex Bennée2019-02-084-3/+6
| | | | | | | | | | This allows us to invoke the build with a custom target (for the VMs that use the {target} format string specifier). Currently OpenBSD is still hardwired due to problems running check. 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>
* tests/vm: call make check directly for netbsd/freebsd/ubuntu.i386Alex Bennée2019-02-083-3/+0Star
| | | | | | | | | | | The "make check" target calls check-qtest which has the appropriate system binaries as dependencies so we shouldn't need to do two steps of make invocation. Doing it in two steps was a hangover from when our make check couldn't run tests in parallel. 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>
* tests/vm: move images to $HOME/.cache/qemu-vm/imagesGerd Hoffmann2019-02-081-5/+7
| | | | | | | | | | | 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>
* tests/vm: Do not abuse parallelism when HOST != TARGET architecturePhilippe Mathieu-Daudé2018-10-261-4/+4
| | | | | | | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20181013004034.6968-9-f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
* tests/vm: Do not use -enable-kvm if HOST != TARGET architecturePhilippe Mathieu-Daudé2018-10-261-1/+1
| | | | | | | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20181013004034.6968-8-f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
* tests/vm: Add a BaseVM::arch propertyPhilippe Mathieu-Daudé2018-10-266-1/+8
| | | | | | | | | | | The 'arch' property gives a hint on which architecture the guest image runs. This can be use to select the correct QEMU binary path. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20181013004034.6968-6-f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
* tests/vm: Display remaining seconds to wait for a VM to startPhilippe Mathieu-Daudé2018-10-261-1/+4
| | | | | | | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20181013004034.6968-5-f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
* tests/vm: Do not use the -smp option with a single cpuPhilippe Mathieu-Daudé2018-10-261-1/+1
| | | | | | | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20181013004034.6968-4-f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
* tests/vm: Do not abuse parallelism when KVM is not availablePhilippe Mathieu-Daudé2018-10-261-1/+8
| | | | | | | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20181013004034.6968-3-f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
* tests/vm: Extract the kvm_available() handy functionPhilippe Mathieu-Daudé2018-10-261-2/+2
| | | | | | | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20181013004034.6968-2-f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
* tests/vm: Use -cpu max rather than -cpu hostPeter Maydell2018-09-261-2/+1Star
| | | | | | | | | | -cpu max works with any accelerator, so we don't need to use it only conditionally if not using KVM. Just use it all the time. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20180820155554.23476-1-peter.maydell@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
* tests/vm: Increase timeout waiting for VM to boot to 5 minutesPeter Maydell2018-08-241-1/+1
| | | | | | | | | | | | The VM tests currently have a timeout of 2 minutes for trying to connect to ssh. Since the guest VM has to boot from cold to the point of accepting inbound ssh during this time, if the host machine is heavily loaded it can spuriously time out. Increase the timeout from 2 to 5 minutes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Fam Zheng <famz@redhat.com> Message-id: 20180823112153.15279-1-peter.maydell@linaro.org
* tests/vm: Clean out old working directories on buildPeter Maydell2018-08-203-0/+3
| | | | | | | | | | | | When we do a build inside one of the BSD VMs, first delete any stale old build directories from the VM's /var/tmp. This prevents the VM from running out of disk space after it has been used for a dozen or so builds. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 20180820124811.7982-1-peter.maydell@linaro.org
* tests/vm: Add vm-build-all/vm-clean-all in help textFam Zheng2018-08-151-0/+3
| | | | | | | | | 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>
* tests/vm: Use make's --output-sync optionPeter Maydell2018-08-154-8/+8
| | | | | | | | | | Use make's --output-sync option when running tests inside VMs, so that if we're building with parallelization the output doesn't get scrambled. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20180803085230.30574-6-peter.maydell@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
* tests/vm: Bump guest RAM up from 2G to 4GPeter Maydell2018-08-151-1/+1
| | | | | | | | | | | | | Currently we run the guests in a VM which is given only 2G of RAM. Since the guests are configured without any swap space, builds can fail because the system runs out of memory and kills the compiler, especially if the job count is set for a lot of parallelism. Bump the setting up from 2G to 4G to give us some more headroom. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20180803085230.30574-5-peter.maydell@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
* tests/vm: Propagate V=1 down into the make inside the VMPeter Maydell2018-08-156-8/+12
| | | | | | | | | | | 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>
* tests/vm: Pass the jobs parallelism setting to 'make check'Peter Maydell2018-08-154-4/+4
| | | | | | | | | | Our test suite works for parallel execution too, and this can noticeably speed up a test run; pass the 'jobs' setting to it as well as to the build proper. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20180803085230.30574-3-peter.maydell@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
* tests: vm: Add vm-clean-allFam Zheng2018-08-151-1/+4
| | | | | | | | | | | 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>