aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2019-08-06iotests: Test unaligned blocking mirror writeMax Reitz2-2/+27
Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190805113526.20319-1-mreitz@redhat.com Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-08-06iotests: Test incremental backup after truncationMax Reitz2-6/+36
Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190805152840.32190-1-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-08-06iotests: Test backup job with two guest writesMax Reitz2-2/+41
Perform two guest writes to not yet backed up areas of an image, where the former touches an inner area of the latter. Before HEAD^, copy offloading broke this in two ways: (1) The target image differs from the reference image (what the source was when the backup started). (2) But you will not see that in the failing output, because the job offset is reported as being greater than the job length. This is because one cluster is copied twice, and thus accounted for twice, but of course the job length does not increase. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190801173900.23851-3-mreitz@redhat.com Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Tested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-07-30iotests/118: Test inserting a read-only mediumKevin Wolf2-3/+7
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
2019-07-30Fixes: add read-zeroes to 051.outAndrey Shinkevich1-5/+5
The patch "iotests: Set read-zeroes on in null block driver for Valgrind" with the commit ID a6862418fec4072 needs the change in 051.out when compared against on the s390 system. Fixes: a6862418fec40727b392c86dc13d9ec980efcb15 Reported-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-07-30tests/multiboot: Fix load address of test kernelsKevin Wolf1-3/+3
While older toolchains produced binaries where the physical load address of ELF segments was the same as the virtual address, newer versions seem to choose a different physical address if it isn't specified explicitly. The means that the test kernel doesn't use the right addresses to access e.g. format strings any more and the whole output disappears, causing all test cases to fail. Fix this by specifying the physical load address of sections explicitly. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-07-23tests/docker: Refresh APT cache before installing new packages on DebianPhilippe Mathieu-Daudé28-101/+133
Since docker caches the different layers, updating the package list does not invalidate the previous "apt-get update" layer, and it is likely "apt-get install" hits an outdated repository. See commit beac6a98f6eb and https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190723141528.18023-1-philmd@redhat.com> [AJB: manually applies and fixed up] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-23tests/qemu-iotests: Don't use 'seq' in the iotestsThomas Huth7-8/+8
The 'seq' command is not available by default on OpenBSD, so these iotests are currently failing there. It could be installed as 'gseq' from the coreutils package - but since it is using a different name there and we are running the iotests with the "bash" shell anyway, let's simply use the built-in double parentheses for the for-loops instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20190723111201.1926-1-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-23tests/qemu-iotests/group: Remove some more tests from the "auto" groupThomas Huth1-59/+61
Remove some more tests from the "auto" group that either have issues in certain environments (like macOS or FreeBSD, or on certain file systems like ZFS or tmpfs), do not work with the qcow2 format, or that are simply taking too much time. Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20190717111947.30356-3-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-23tests/qemu-iotests/check: Allow tests without groupsThomas Huth1-2/+2
The regular expressions in the "check" script currently expect that there is always a space after the test number in the group file, so you can't have a test in there without a group unless the line still ends with a space - which is quite error prone since some editors might remove spaces at the end of lines automatically. Thus let's fix the regular expressions so that it is also possible to have lines with one test number only in the group file. Suggested-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20190717111947.30356-2-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-23tests/docker: invoke the DEBUG shell with --noprofile/--norcAlex Bennée1-2/+2
It's very confusing when things work in the debug shell because the environment is different from what the test is running. Fix this by ensuring we only have the inherited environment from the run shell. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-07-23tests/docker: Let the test-mingw test generate a NSIS installerPhilippe Mathieu-Daudé1-1/+3
The NSIS installer generates an executable suitable to install QEMU on Windows. Suggested-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190715174817.18981-9-philmd@redhat.com> [AJB: also --enable-docs in configure step] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-23tests/docker: Install texinfo in the Fedora imagePhilippe Mathieu-Daudé1-0/+1
The 'makeinfo' is required to generate the documentation from the 'html' Makefile rule (called by 'install-doc'). The NSIS installer uses these files. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190715174817.18981-6-philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-23tests/docker: Set the correct cross-PKG_CONFIG_PATH in the MXE imagesPhilippe Mathieu-Daudé2-0/+6
This silents a bunch of warnings while compiling the Slirp objects: $ make [...] CC slirp/src/tftp.o Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found CC slirp/src/udp6.o Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found [...] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190715174817.18981-5-philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-23tests/docker: Install the NSIS tools in the MinGW capable imagesPhilippe Mathieu-Daudé3-0/+7
This fixes: $ make installer (cd /tmp/qemu-nsis; \ for i in qemu-system-*.exe; do \ arch=${i%.exe}; \ arch=${arch#qemu-system-}; \ echo Section \"$arch\" Section_$arch; \ echo SetOutPath \"\$INSTDIR\"; \ echo File \"\${BINDIR}\\$i\"; \ echo SectionEnd; \ done \ ) >/tmp/qemu-nsis/system-emulations.nsh makensis -V2 -NOCD \ -DCONFIG_DOCUMENTATION="y" \ \ -DBINDIR="/tmp/qemu-nsis" \ \ -DSRCDIR="/home/phil/source/qemu" \ -DOUTFILE="qemu-setup-4.0.90.exe" \ -DDISPLAYVERSION="4.0.90" \ /home/phil/source/qemu/qemu.nsi /bin/sh: 1: makensis: not found Makefile:1077: recipe for target 'qemu-setup-4.0.90.exe' failed make: *** [qemu-setup-4.0.90.exe] Error 127 Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190715174817.18981-4-philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-23tests/docker: Install Sphinx in the Debian imagesPhilippe Mathieu-Daudé2-0/+2
Since commit 5f71eac06e the Sphinx tool is required to build the rST documentation. This fixes: $ ./configure --enable-docs ERROR: User requested feature docs configure was not able to find it. Install texinfo, Perl/perl-podlators and python-sphinx Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190715174817.18981-3-philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-23tests/dockerfiles: update the win cross builds to stretchAlex Bennée4-11/+14
While fixing up pkg.mxe.cc they move the URLs around a bit and dropped Jessie support in favour of Stretch. We also need to update the keys used to verify the packages. 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-07-23tests/migration-test: don't spam the logs when we failAlex Bennée1-7/+12
Quite often the information about which test failed is hidden by the wall of repeated failures for each page. Stop outputting the error after 10 bad pages and just summarise the total damage at the end. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
2019-07-23tests/docker: Install Ubuntu images noninteractivelyPhilippe Mathieu-Daudé2-2/+2
We correctly use the DEBIAN_FRONTEND environment variable on the Debian images, but forgot the Ubuntu ones are based on it. Since building docker images is not interactive, we need to inform the APT tools about it using the DEBIAN_FRONTEND environment variable (we already use it on our Debian images). This fixes: $ make docker-image-ubuntu V=1 [...] Setting up tzdata (2019b-0ubuntu0.19.04) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline Configuring tzdata ------------------ Please select the geographic area in which you live. Subsequent configuration questions will narrow this down by presenting a list of cities, representing the time zones in which they are located. 1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc 2. America 5. Arctic 8. Europe 11. SystemV 3. Antarctica 6. Asia 9. Indian 12. US Geographic area: 12 [HANG] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20190711124805.26476-1-philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-23tests/docker: Install Sphinx in the Fedora imagePhilippe Mathieu-Daudé1-0/+2
Since commit 5f71eac06e the Sphinx tool is required to build the rST documentation. This fixes: $ ./configure --enable-docs ERROR: User requested feature docs configure was not able to find it. Install texinfo, Perl/perl-podlators and python-sphinx Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20190711102710.2263-1-philmd@redhat.com> [AJB: also add /usr/libexec/python3-sphinx/ to PATH] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-23tests/docker: Install Sphinx in the Ubuntu imagesPhilippe Mathieu-Daudé2-0/+2
Since commit 5f71eac06e the Sphinx tool is required to build the rST documentation. This fixes: $ ./configure --enable-docs ERROR: User requested feature docs configure was not able to find it. Install texinfo, Perl/perl-podlators and python-sphinx Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190711120609.12773-1-philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
2019-07-23tests/docker: add test-misc for building tools & docsAlex Bennée1-0/+22
Add yet another test type so we cna quickly exercise the miscellaneous build products of the build system under various docer configurations. 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-07-22Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell1-0/+55
Mostly bugfixes, plus a patch to mark accelerator MemoryRegions in "info mtree" that has been lingering for too long. # gpg: Signature made Fri 19 Jul 2019 22:45:46 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: target/i386: sev: fix failed message typos i386: indicate that 'pconfig' feature was removed intentionally build-sys: do no support modules on Windows qmp: don't emit the RESET event on wakeup hmp: Print if memory section is registered with an accelerator test-bitmap: add test for bitmap_set scsi-generic: Check sense key before request snooping and patching vhost-user-scsi: Call virtio_scsi_common_unrealize() when device realize failed vhost-scsi: Call virtio_scsi_common_unrealize() when device realize failed virtio-scsi: remove unused argument to virtio_scsi_common_realize target/i386: skip KVM_GET/SET_NESTED_STATE if VMX disabled, or for SVM target/i386: kvm: Demand nested migration kernel capabilities only when vCPU may have enabled VMX Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-07-19test-bitmap: add test for bitmap_setWei Yang1-0/+55
Add a test for bitmap_set. There are three cases: * Both start and end is BITS_PER_LONG aligned * Only start is BITS_PER_LONG aligned * Only end is BITS_PER_LONG aligned Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Message-Id: <20190718010456.4234-3-richardw.yang@linux.intel.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-07-19iotests: Test quitting with job on throttled nodeMax Reitz2-2/+57
When qemu quits, all throttling should be ignored. That means, if there is a mirror job running from a throttled node, it should be cancelled immediately and qemu close without blocking. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-07-19iotests: Test commit with a filter on the chainMax Reitz2-3/+41
Before the previous patches, the first case resulted in a failed assertion (which is noted as qemu receiving a SIGABRT in the test output), and the second usually triggered a segmentation fault. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-07-19iotests: Add @has_quit to vm.shutdown()Max Reitz1-1/+1
If a test has issued a quit command already (which may be useful to do explicitly because the test wants to show its effects), QEMUMachine.shutdown() should not do so again. Otherwise, the VM may well return an ECONNRESET which will lead QEMUMachine.shutdown() to killing it, which then turns into a "qemu received signal 9" line. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-07-19tests: Extend commit by drained_end testMax Reitz1-4/+32
Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-07-19tests: Lock AioContexts in test-block-iothreadMax Reitz1-14/+26
When changing a node's AioContext, the caller must acquire the old AioContext (unless it currently runs in that old context). Therefore, unless the node currently is in the main context, we always have to acquire the old context around calls that may change a node's AioContext. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-07-19tests: Add job commit by drained_end testMax Reitz1-0/+119
Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-07-19iotests: Set read-zeroes on in null block driver for ValgrindAndrey Shinkevich10-109/+111
The Valgrind tool reports about the uninitialised buffer 'buf' instantiated on the stack of the function guess_disk_lchs(). Pass 'read-zeroes=on' to the null block driver to make it deterministic. The output of the tests 051, 186 and 227 now includes the parameter 'read-zeroes'. So, the benchmark output files are being changed too. Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-07-15Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-07-15' ↵Peter Maydell3-36/+136
into staging Block patches for 4.1-rc1: - Fixes for the NVMe block driver, the gluster block driver, and for running multiple block jobs concurrently on a single chain # gpg: Signature made Mon 15 Jul 2019 14:51:43 BST # gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40 # gpg: issuer "mreitz@redhat.com" # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full] # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2019-07-15: gluster: fix .bdrv_reopen_prepare when backing file is a JSON object iotests: Add read-only test case to 030 iotests: Add new case to 030 iotests: Add @use_log to VM.run_job() iotests: Compare error messages in 030 iotests: Fix throttling in 030 block: Deep-clear inherits_from block/stream: Swap backing file change order block/stream: Fix error path block: Add BDS.never_freeze nvme: Set number of queues later in nvme_init() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-07-15iotests: Add read-only test case to 030Max Reitz2-3/+30
This tests that the stream job exits cleanly (without abort) when the top node is read-only and cannot be reopened read/write. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190703172813.6868-12-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-07-15iotests: Add new case to 030Max Reitz2-2/+27
We recently removed the dependency of the stream job on its base node. That makes it OK to use a commit filter node there. Test that. Signed-off-by: Max Reitz <mreitz@redhat.com> Tested-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-id: 20190703172813.6868-11-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-07-15iotests: Add @use_log to VM.run_job()Max Reitz1-5/+13
unittest-style tests generally do not use the log file, but VM.run_job() can still be useful to them. Add a parameter to it that hides its output from the log file. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190703172813.6868-10-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-07-15iotests: Compare error messages in 030Max Reitz1-24/+42
Currently, 030 just compares the error class, which does not say anything. Before HEAD^ added throttling to test_overlapping_4, that test actually usually failed because node2 was already gone, not because it was the commit and stream job were not allowed to overlap. Prevent such problems in the future by comparing the error description instead. Signed-off-by: Max Reitz <mreitz@redhat.com> Tested-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-id: 20190703172813.6868-9-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-07-15iotests: Fix throttling in 030Max Reitz1-5/+27
Currently, TestParallelOps in 030 creates images that are too small for job throttling to be effective. This is reflected by the fact that it never undoes the throttling. Increase the image size and undo the throttling when the job should be completed. Also, add throttling in test_overlapping_4, or the jobs may not be so overlapping after all. In fact, the error usually emitted here is that node2 simply does not exist, not that overlapping jobs are not allowed -- the fact that this job ignores the exact error messages and just checks the error class is something that should be fixed in a follow-up patch. Signed-off-by: Max Reitz <mreitz@redhat.com> Tested-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-id: 20190703172813.6868-8-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-07-15bitmap: Add bitmap_copy_with_{src|dst}_offset()Peter Xu2-0/+74
These helpers copy the source bitmap to destination bitmap with a shift either on the src or dst bitmap. Meanwhile, we never have bitmap tests but we should. This patch also introduces the initial test cases for utils/bitmap.c but it only tests the newly introduced functions. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20190603065056.25211-5-peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> --- Bitmap test used sizeof(unsigned long) instead of BITS_PER_LONG.
2019-07-15migration-test: rename parameter to parameter_intJuan Quintela1-27/+28
We would need _str ones on the next patch. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Wei Yang <richardw.yang@linux.intel.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2019-07-12Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell1-6/+17
virtio, pc, pci: fixes, cleanups, tests A bunch of fixes all over the place. ACPI tests will now run on more systems: might introduce new failure reports but that's for the best, isn't it? Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Fri 12 Jul 2019 15:57:40 BST # gpg: using RSA key 281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: virtio pmem: remove transitional names virtio pmem: remove memdev null check virtio pmem: fix wrong mem region condition tests: acpi: do not skip tests when IASL is not installed tests: acpi: do not require IASL for dumping AML blobs virtio-balloon: fix QEMU 4.0 config size migration incompatibility pcie: consistent names for function args xio3130_downstream: typo fix Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-07-12tests: acpi: do not skip tests when IASL is not installedIgor Mammedov1-1/+14
tests do binary comparision so we can check tables without IASL. Move IASL condition right before decompilation step and skip it if IASL is not installed. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190708092410.11167-3-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-07-12tests: acpi: do not require IASL for dumping AML blobsIgor Mammedov1-6/+4
IASL isn't needed when dumping ACPI tables from guest for rebuild purposes. So move this part out from IASL branch. Makes rebuild-expected-aml.sh work without IASL installed on host. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Message-Id: <20190708092410.11167-2-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-07-12iotests: Update 082 expected outputEric Blake1-27/+27
A recent tweak to the '-o help' output for qemu-img needs to be reflected into the iotests expected outputs. Fixes: f7077c98 Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-07-10tests/tcg: fix diff-out pass to properly report failureAlex Bennée1-1/+5
A side effect of piping the output to head is squash the exit status of the diff command. Fix this by only doing the pipe if the diff failed and then ensuring the status is non-zero. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-10tests/tcg: fix up test-i386-fprem.ref generationAlex Bennée1-2/+2
We never shipped the reference data in the source tree because it's quite big (64M). As a result the only option is to generate it locally. Although we have a rule to generate the reference file we missed the dependency and location changes, probably because it's only run for SLOW test runs. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2019-07-08tests/migration-test: Fix read off end of aarch64_kernel arrayPeter Maydell1-15/+7
The test aarch64 kernel is in an array defined with unsigned char aarch64_kernel[] = { [...] } which means it could be any size; currently it's quite small. However we write it to a file using init_bootfile(), which writes exactly 512 bytes to the file. This will break if we ever end up with a kernel larger than that, and will read garbage off the end of the array in the current setup where the kernel is smaller. Make init_bootfile() take an argument giving the length of the data to write. This allows us to use it for all architectures (previously s390 had a special-purpose init_bootfile_s390x which hardcoded the file to write so it could write the correct length). We assert that the x86 bootfile really is exactly 512 bytes as it should be (and as we were previously just assuming it was). This was detected by the clang-7 asan: ==15607==ERROR: AddressSanitizer: global-buffer-overflow on address 0x55a796f51d20 at pc 0x55a796b89c2f bp 0x7ffc58e89160 sp 0x7ffc58e88908 READ of size 512 at 0x55a796f51d20 thread T0 #0 0x55a796b89c2e in fwrite (/home/petmay01/linaro/qemu-from-laptop/qemu/build/sanitizers/tests/migration-test+0xb0c2e) #1 0x55a796c46492 in init_bootfile /home/petmay01/linaro/qemu-from-laptop/qemu/tests/migration-test.c:99:5 #2 0x55a796c46492 in test_migrate_start /home/petmay01/linaro/qemu-from-laptop/qemu/tests/migration-test.c:593 #3 0x55a796c44101 in test_baddest /home/petmay01/linaro/qemu-from-laptop/qemu/tests/migration-test.c:854:9 #4 0x7f906ffd3cc9 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72cc9) #5 0x7f906ffd3bfa (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72bfa) #6 0x7f906ffd3bfa (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72bfa) #7 0x7f906ffd3ea1 in g_test_run_suite (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72ea1) #8 0x7f906ffd3ec0 in g_test_run (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72ec0) #9 0x55a796c43707 in main /home/petmay01/linaro/qemu-from-laptop/qemu/tests/migration-test.c:1187:11 #10 0x7f906e9abb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #11 0x55a796b6c2d9 in _start (/home/petmay01/linaro/qemu-from-laptop/qemu/build/sanitizers/tests/migration-test+0x932d9) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190702150311.20467-1-peter.maydell@linaro.org
2019-07-05tests: use -numa memdev option in tests instead of legacy 'mem' optionIgor Mammedov1-12/+28
it will test preferred memdev option more extensively and remove undesired deprecation warnings during 'make check' Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20190702140745.27767-3-imammedo@redhat.com> [ehabkost: remove numa-test.c changes] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-07-05i386: Add Cascadelake-Server-v2 CPU modelEduardo Habkost1-0/+73
Add new version of Cascadelake-Server CPU model, setting stepping=5 and enabling the IA32_ARCH_CAPABILITIES MSR with some flags. The new feature will introduce a new host software requirement, breaking our CPU model runnability promises. This means we can't enable the new CPU model version by default in QEMU 4.1, because management software isn't ready yet to resolve CPU model aliases. This is why "pc-*-4.1" will keep returning Cascadelake-Server-v1 if "-cpu Cascadelake-Server" is specified. Includes a test case to ensure the right combinations of machine-type + CPU model + command-line feature flags will work as expected. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190628002844.24894-10-ehabkost@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20190703221723.8161-1-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-07-05i386: Make unversioned CPU models be aliasesEduardo Habkost1-0/+126
This will make unversioned CPU models behavior depend on the machine type: * "pc-*-4.0" and older will not report them as aliases. This is done to keep compatibility with older QEMU versions after management software starts translating aliases. * "pc-*-4.1" will translate unversioned CPU models to -v1. This is done to keep compatibility with existing management software, that still relies on CPU model runnability promises. * "none" will translate unversioned CPU models to their latest version. This is planned become the default in future machine types (probably in pc-*-4.3). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190628002844.24894-8-ehabkost@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-07-05i386: Register versioned CPU modelsEduardo Habkost1-0/+105
Add support for registration of multiple versions of CPU models. The existing CPU models will be registered with a "-v1" suffix. The -noTSX, -IBRS, and -IBPB CPU model variants will become versions of the original models in a separate patch, so make sure we register no versions for them. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190628002844.24894-5-ehabkost@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>