summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | tests/docker: Update the Fedora image to Fedora 30Philippe Mathieu-Daudé2019-06-121-1/+1
|/ | | | | | | | | | | | | Fedora 30 got released: https://fedoramagazine.org/announcing-fedora-30/ Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20190528153304.27157-1-philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2019-06-11-v3' ↵Peter Maydell2019-06-1284-20/+132
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging Miscellaneous patches for 2019-06-11 # gpg: Signature made Wed 12 Jun 2019 12:20:41 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-misc-2019-06-11-v3: MAINTAINERS: Polish headline decorations MAINTAINERS: Improve section headlines MAINTAINERS: Remove duplicate entries of qemu-devel@nongnu.org Clean up a header guard symbols (again) Supply missing header guards Clean up a few header guard symbols scripts/clean-header-guards: Fix handling of trailing comments Normalize position of header guard Include qemu-common.h exactly where needed Include qemu/module.h where needed, drop it from qemu-common.h qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h qemu-common: Move tcg_enabled() etc. to sysemu/tcg.h Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * Supply missing header guardsMarkus Armbruster2019-06-1210-1/+50
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190604181618.19980-5-armbru@redhat.com>
| * Clean up a few header guard symbolsMarkus Armbruster2019-06-122-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 58ea30f5145 "Clean up header guards that don't match their file name" messed up contrib/elf2dmp/qemu_elf.h and tests/migration/migration-test.h. It missed target/cris/opcode-cris.h and tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h due to the scripts/clean-header-guards.pl bug fixed in the previous commit. Commit a8b991b52dc "Clean up ill-advised or unusual header guards" missed include/hw/xen/io/ring.h for the same reason. Commit 3979fca4b69 "disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h" neglected to update the guard symbol for the rename. Commit a331c6d7741 "semihosting: implement a semihosting console" created include/hw/semihosting/console.h with an ill-advised guard symbol. Clean them up. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190604181618.19980-4-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
| * Normalize position of header guardMarkus Armbruster2019-06-121-5/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the common header guard idiom: /* * File comment */ #ifndef GUARD_SYMBOL_H #define GUARD_SYMBOL_H ... actual contents ... #endif A few of our headers have some #include before the guard. target/tilegx/spr_def_64.h has #ifndef __DOXYGEN__ outside the guard. A few more have the #define elsewhere. Change them to match the common idiom. For spr_def_64.h, that means dropping #ifndef __DOXYGEN__. While there, rename guard symbols to make scripts/clean-header-guards.pl happy. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190604181618.19980-2-armbru@redhat.com> [Rebased with conflicts resolved automatically]
| * Include qemu-common.h exactly where neededMarkus Armbruster2019-06-126-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No header includes qemu-common.h after this commit, as prescribed by qemu-common.h's file comment. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-5-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and net/tap-bsd.c fixed up]
| * Include qemu/module.h where needed, drop it from qemu-common.hMarkus Armbruster2019-06-1267-7/+68
| | | | | | | | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-4-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for hw/usb/dev-hub.c hw/misc/exynos4210_rng.c hw/misc/bcm2835_rng.c hw/misc/aspeed_scu.c hw/display/virtio-vga.c hw/arm/stm32f205_soc.c; ui/cocoa.m fixed up]
| * qemu-common: Move qemu_isalnum() etc. to qemu/ctype.hMarkus Armbruster2019-06-112-1/+2
| | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-3-armbru@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
* | BootLinuxConsoleTest: Run kerneltests BusyBox on MaltaPhilippe Mathieu-Daudé2019-06-111-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tests boots a Linux kernel on a Malta machine up to a busybox shell on the serial console. Few commands are executed before halting the machine (via reboot). We use the initrd cpio image from the kerneltests project: https://kerneltests.org/ If MIPS is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:mips" tags. Alternatively, this test can be run using: $ avocado --show=console run -t arch:mips tests/acceptance/boot_linux_console.py [...] console: Boot successful. [...] console: / # uname -a console: Linux buildroot 4.5.0-2-4kc-malta #1 Debian 4.5.5-1 (2016-05-29) mips GNU/Linux console: / # reboot console: / # reboot: Restarting system Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20190520231910.12184-4-f4bug@amsat.org> Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* | BootLinuxConsoleTest: Test nanoMIPS kernels on the I7200 CPUPhilippe Mathieu-Daudé2019-06-111-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the x86_64/pc test, it boots a Linux kernel on a Malta machine and verify the serial is working. Use the documentation added in commit f7d257cb4a17 to test nanoMIPS kernels and the I7200 CPU. This test can be run using: $ avocado --show=console run -t arch:mipsel tests/acceptance/boot_linux_console.py console: [ 0.000000] Linux version 4.15.18-00432-gb2eb9a8b (emubuild@mipscs563) (gcc version 6.3.0 (Codescape GNU Tools 2018.04-02 for nanoMIPS Linux)) #1 SMP Wed Jun 27 11:10:08 PDT 2018 console: [ 0.000000] GCRs appear to have been moved (expected them at 0x1fbf8000)! console: [ 0.000000] GCRs appear to have been moved (expected them at 0x1fbf8000)! console: [ 0.000000] CPU0 revision is: 00010000 (MIPS GENERIC QEMU) console: [ 0.000000] MIPS: machine is mti,malta console: [ 0.000000] Determined physical RAM map: console: [ 0.000000] memory: 08000000 @ 00000000 (usable) console: [ 0.000000] earlycon: ns16550a0 at I/O port 0x3f8 (options '38400n8') console: [ 0.000000] bootconsole [ns16550a0] enabled console: [ 0.000000] User-defined physical RAM map: console: [ 0.000000] memory: 10000000 @ 00000000 (usable) console: [ 0.000000] Initrd not found or empty - disabling initrd console: [ 0.000000] MIPS CPS SMP unable to proceed without a CM console: [ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. console: [ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes console: [ 0.000000] This processor doesn't support highmem. -262144k highmem ignored console: [ 0.000000] Zone ranges: console: [ 0.000000] Normal [mem 0x0000000000000000-0x000000000fffffff] console: [ 0.000000] HighMem empty console: [ 0.000000] Movable zone start for each node console: [ 0.000000] Early memory node ranges console: [ 0.000000] node 0: [mem 0x0000000000000000-0x000000000fffffff] console: [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff] console: [ 0.000000] random: get_random_bytes called from start_kernel+0x60/0x2f0 with crng_init=0 console: [ 0.000000] percpu: Embedded 16 pages/cpu @(ptrval) s36620 r8192 d20724 u65536 console: [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960 console: [ 0.000000] Kernel command line: printk.time=0 mem=256m@@0x0 console=ttyS0 earlycon Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20190520231910.12184-3-f4bug@amsat.org> Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* | BootLinuxConsoleTest: Test the SmartFusion2 boardPhilippe Mathieu-Daudé2019-06-111-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the x86_64/pc test, it boots a Linux kernel on an Emcraft board and verify the serial is working. If ARM is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:arm" tags. Alternatively, this test can be run using: $ avocado run -t arch:arm tests/acceptance $ avocado run -t machine:emcraft_sf2 tests/acceptance Based on the recommended test setup from Subbaraya Sundeep: https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg03810.html Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20190520220635.10961-3-f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* | BootLinuxConsoleTest: Do not log empty linesPhilippe Mathieu-Daudé2019-06-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Avoid to log empty lines in console debug logs. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20190520220635.10961-2-f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* | tests/boot_linux_console: Let extract_from_deb handle various compressionsPhilippe Mathieu-Daudé2019-06-111-2/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Debian binary package format supports various compressions. Per man deb(5): NAME deb - Debian binary package format FORMAT ... The third, last required member is named data.tar. It contains the filesystem as a tar archive, either not compressed (supported since dpkg 1.10.24), or compressed with gzip (with .gz extension), xz (with .xz extension, supported since dpkg 1.15.6), bzip2 (with .bz2 extension, supported since dpkg 1.10.24) or lzma (with .lzma extension, supported since dpkg 1.13.25). List the archive files to have the 3rd name with the correct extension. The function avocado.utils.archive.extract() will handle the different compression format for us. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190312234541.2887-2-philmd@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* tests/tcg: target/mips: Add README for MSA testsAleksandar Markovic2019-06-073-0/+904
| | | | | | | | | Add README for MSA tests. This is just to explain how to run tests even without Makefile. Makefile will be provided later on. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1559838440-9866-11-git-send-email-aleksandar.markovic@rt-rk.com>
* tests/tcg: target/mips: Add tests for MSA FP max/min instructionsAleksandar Markovic2019-06-078-0/+1240
| | | | | | | | | | | | | | | | | | Add tests for MSA FP max/min instructions. This includes following instructions: * FMAX.W - float maximum (words) * FMAX.D - float maximum (doublewords) * FMAX_A.W - float maximum absolute (words) * FMAX_A.D - float maximum absolute (doublewords) * FMIN.W - float minimum (words) * FMIN.D - float minimum (doublewords) * FMIN_A.W - float minimum absolute (words) * FMIN_A.D - float minimum absolute (doublewords) Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1559838440-9866-10-git-send-email-aleksandar.markovic@rt-rk.com>
* tests/tcg: target/mips: Add utility function reset_msa_registers()Aleksandar Markovic2019-06-07227-4/+504
| | | | | | | | | | | | Add function reset_msa_registers() and utilize it in each MSA test. This is needed to ensure independency of test results on the state of MSA registers before test execution. This also allows for correction of tests for VSHF* instructions, that are now independent on the previous state of MSA registers. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1559838440-9866-9-git-send-email-aleksandar.markovic@rt-rk.com>
* tests/tcg: target/mips: Move four tests to a better locationAleksandar Markovic2019-06-074-0/+0
| | | | | | | | | | Move tests for <MUL|MULR>_Q.<H|B> from "integer multiply" directory to "fixed-point multiply" directory, since they do not operate on integers, but on fixed point numbers. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1559838440-9866-8-git-send-email-aleksandar.markovic@rt-rk.com>
* tests/tcg: target/mips: Add tests for MSA shift instructionsAleksandar Markovic2019-06-0720-0/+3060
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests for MSA shift instructions. This includes following instructions: * SLL.B - shift left logical (bytes) * SLL.H - shift left logical (halfwords) * SLL.W - shift left logical (words) * SLL.D - shift left logical (doublewords) * SRA.B - shift right arithmetic (bytes) * SRA.H - shift right arithmetic (halfwords) * SRA.W - shift right arithmetic (words) * SRA.D - shift right arithmetic (doublewords) * SRAR.B - shift right arithmetic rounded (bytes) * SRAR.H - shift right arithmetic rounded (halfwords) * SRAR.W - shift right arithmetic rounded (words) * SRAR.D - shift right arithmetic rounded (doublewords) * SRL.B - shift right logical (bytes) * SRL.H - shift right logical (halfwords) * SRL.W - shift right logical (words) * SRL.D - shift right logical (doublewords) * SRLR.B - shift right logical rounded (bytes) * SRLR.H - shift right logical rounded (halfwords) * SRLR.W - shift right logical rounded (words) * SRLR.D - shift right logical rounded (doublewords) Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1559838440-9866-7-git-send-email-aleksandar.markovic@rt-rk.com>
* tests/tcg: target/mips: Amend and rearrange MSA wrappersAleksandar Markovic2019-06-071-160/+300
| | | | | | | | | Amend and rearrange MSA wrappers to follow the same organization as in MSA tests. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1559838440-9866-6-git-send-email-aleksandar.markovic@rt-rk.com>
* Merge remote-tracking branch ↵Peter Maydell2019-06-061-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/vivier2/tags/trivial-branch-pull-request' into staging Trivial fixes 06/06/2019 # gpg: Signature made Thu 06 Jun 2019 12:05:50 BST # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/trivial-branch-pull-request: hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev hw/scsi: Use the QOM BUS() macro to access BusState.qbus hw/sd: Use the QOM BUS() macro to access BusState.qbus hw/audio/ac97: Use the QOM DEVICE() macro to access DeviceState.qdev hw/vfio/pci: Use the QOM DEVICE() macro to access DeviceState.qdev hw/usb-storage: Use the QOM DEVICE() macro to access DeviceState.qdev hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev hw/s390x/event-facility: Use the QOM BUS() macro to access BusState.qbus hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly docs/devel/build-system: Update an example test: Fix make target check-report.tap util: Adjust qemu_guest_getrandom_nofail for Coverity vhost: fix incorrect print type migration: fix a typo hw/rdma: Delete unused headers inclusion Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * test: Fix make target check-report.tapMarkus Armbruster2019-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix a fat-fingered invocation of tap-merge.pl in the recipe of target check-report.tap. Fixes: 9df43317b82 "test: replace gtester with a TAP driver" Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190604080010.23186-1-armbru@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
* | Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell2019-06-0610-3/+57
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | virtio, pci, pc: cleanups, features stricter rules for acpi tables: we now fail on any difference that isn't whitelisted. vhost-scsi migration. some cleanups all over the place Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Wed 05 Jun 2019 20:55:04 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: bios-tables-test: ignore identical binaries tests: acpi: add simple arm/virt testcase tests: add expected ACPI tables for arm/virt board bios-tables-test: list all tables that differ vhost-scsi: Allow user to enable migration vhost-scsi: Add VMState descriptor vhost-scsi: The vhost backend should be stopped when the VM is not running bios-tables-test: add diff allowed list vhost: fix memory leak in vhost_user_scsi_realize vhost: fix incorrect print type vhost: remove the dead code docs: smbios: remove family=x from type2 entry description pci: Fold pci_get_bus_devfn() into its sole caller pci: Make is_bridge a bool pcie: Simplify pci_adjust_config_limit() acpi: pci: use build_append_foo() API to construct MCFG hw/acpi: Consolidate build_mcfg to pci.c Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | bios-tables-test: ignore identical binariesMichael S. Tsirkin2019-06-051-2/+14
| | | | | | | | | | | | | | | | | | | | | when binary of the tables is identical, there is no need to run iasl to check that they are functionally equivalent. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | tests: acpi: add simple arm/virt testcaseIgor Mammedov2019-06-033-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adds simple arm/virt test case that starts guest with bios-tables-test.aarch64.iso.qcow2 boot image which initializes UefiTestSupport* structure in RAM once guest is booted. * see commit: tests: acpi: add acpi_find_rsdp_address_uefi() helper Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1559560929-260254-3-git-send-email-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | tests: add expected ACPI tables for arm/virt boardIgor Mammedov2019-06-036-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1559560929-260254-2-git-send-email-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | bios-tables-test: list all tables that differMichael S. Tsirkin2019-06-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Fail after comparing all tables: this way user gets the full list of tables that need to be updated or whitelisted. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | bios-tables-test: add diff allowed listMichael S. Tsirkin2019-05-302-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expected table change is then handled like this: 1. add table to diff allowed list 2. change generating code (can be combined with 1) 3. maintainer runs a script to update expected + blows away allowed diff list Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | | migration-test: Add a test for fd protocolYury Kotov2019-06-053-5/+227
| |/ |/| | | | | | | | | | | Signed-off-by: Yury Kotov <yury-kotov@yandex-team.ru> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* | iotests: Fix duplicated diff output on failureKevin Wolf2019-06-041-1/+0Star
| | | | | | | | | | | | | | | | | | | | Commit 70ff5b07 wanted to move the diff between actual and reference output to the end after printing the test result line. It really only copied it, though, so the diff is now displayed twice. Remove the old one. Fixes: 70ff5b07fcdd378180ad2d5cc0b0d5e67e7ef325 Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | iotests: test big qcow2 shrinkVladimir Sementsov-Ogievskiy2019-06-043-0/+95
| | | | | | | | | | | | | | | | This test checks bug in qcow2_process_discards, fixed by previous commit. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | test-bdrv-drain: Use bdrv_try_set_aio_context()Kevin Wolf2019-06-041-3/+3
| | | | | | | | | | | | | | No reason to use the unchecked version in tests, even more so when these are the last callers of bdrv_set_aio_context() outside of block.c. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | iotests: Attach new devices to node in non-default iothreadKevin Wolf2019-06-043-0/+54
| | | | | | | | | | | | | | | | This tests that devices refuse to be attached to a node that has already been moved to a different iothread if they can't be or aren't configured to work in the same iothread. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | virtio-scsi-test: Test attaching new overlay with iothreadsKevin Wolf2019-06-043-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This tests that blockdev-add can correctly add a qcow2 overlay to an image used by a virtio-scsi disk in an iothread. The interesting point here is whether the newly added node gets correctly moved into the iothread AioContext. If it isn't, we get an assertion failure in virtio-scsi while processing the next request: virtio_scsi_ctx_check: Assertion `blk_get_aio_context(d->conf.blk) == s->ctx' failed. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | block: Move node without parents to main AioContextKevin Wolf2019-06-042-3/+2Star
| | | | | | | | | | | | | | | | A node should only be in a non-default AioContext if a user is attached to it that requires this. When the last parent of a node is gone, it can move back to the main AioContext. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | test-block-iothread: BlockBackend AioContext across root node changeKevin Wolf2019-06-041-0/+33
| | | | | | | | | | | | | | | | Test that BlockBackends preserve their assigned AioContext even when the root node goes away. Inserting a new root node will move it to the right AioContext. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | test-block-iothread: Test adding parent to iothread nodeKevin Wolf2019-06-041-0/+33
| | | | | | | | | | | | | | | | Opening a new parent node for a node that has already been moved into a different AioContext must cause the new parent to move into the same context. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | block: Adjust AioContexts when attaching nodesKevin Wolf2019-06-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | So far, we only made sure that updating the AioContext of a node affected the whole subtree. However, if a node is newly attached to a new parent, we also need to make sure that both the subtree of the node and the parent are in the same AioContext. This tries to move the new child node to the parent AioContext and returns an error if this isn't possible. BlockBackends now actually apply their AioContext to their root node. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | scsi-disk: Use qdev_prop_drive_iothreadKevin Wolf2019-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes use of qdev_prop_drive_iothread for scsi-disk so that the disk can be attached to a node that is already in the target AioContext. We need to check that the HBA actually supports iothreads, otherwise scsi-disk must make sure that the node is already in the main AioContext. This changes the error message for conflicting iothread settings. Previously, virtio-scsi produced the error message, now it comes from blk_set_aio_context(). Update a test case accordingly. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | block: Add BlockBackend.ctxKevin Wolf2019-06-046-28/+31
| | | | | | | | | | | | | | | | | | | | | | | | This adds a new parameter to blk_new() which requires its callers to declare from which AioContext this BlockBackend is going to be used (or the locks of which AioContext need to be taken anyway). The given context is only stored and kept up to date when changing AioContexts. Actually applying the stored AioContext to the root node is saved for another commit. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | block: Add Error to blk_set_aio_context()Kevin Wolf2019-06-042-15/+15
| | | | | | | | | | | | | | | | Add an Error parameter to blk_set_aio_context() and use bdrv_child_try_set_aio_context() internally to check whether all involved nodes can actually support the AioContext switch. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | nbd-server: Call blk_set_allow_aio_context_change()Kevin Wolf2019-06-042-0/+34
| | | | | | | | | | | | | | | | | | | | | | The NBD server uses an AioContext notifier, so it can tolerate that its BlockBackend is switched to a different AioContext. Before we start actually calling bdrv_try_set_aio_context(), which checks for consistency, outside of test cases, we need to make sure that the NBD server actually allows this. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* | test-block-iothread: Check filter node in test_propagate_mirrorKevin Wolf2019-06-041-1/+6
| | | | | | | | | | | | | | Just make the test cover the AioContext of the filter node as well. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* | iotests: Test cancelling a job and closing the VMMax Reitz2019-06-042-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a test where we cancel a throttled mirror job and immediately close the VM before it can be cancelled. Doing so will invoke bdrv_drain_all() while the mirror job tries to drain the throttled node. When bdrv_drain_all_end() tries to lift its drain on the throttle node, the job will exit and replace the current root node of the BB drive0 (which is the job's filter node) by the throttle node. Before the previous patch, this replacement did not increase drive0's quiesce_counter by a sufficient amount, so when bdrv_parent_drained_end() (invoked by bdrv_do_drained_end(), invoked by bdrv_drain_all_end()) tried to end the drain on all of the throttle node's parents, it decreased drive0's quiesce_counter below 0 -- which fails an assertion. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | block: avoid recursive block_status call if possibleVladimir Sementsov-Ogievskiy2019-06-044-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drv_co_block_status digs bs->file for additional, more accurate search for hole inside region, reported as DATA by bs since 5daa74a6ebc. This accuracy is not free: assume we have qcow2 disk. Actually, qcow2 knows, where are holes and where is data. But every block_status request calls lseek additionally. Assume a big disk, full of data, in any iterative copying block job (or img convert) we'll call lseek(HOLE) on every iteration, and each of these lseeks will have to iterate through all metadata up to the end of file. It's obviously ineffective behavior. And for many scenarios we don't need this lseek at all. However, lseek is needed when we have metadata-preallocated image. So, let's detect metadata-preallocation case and don't dig qcow2's protocol file in other cases. The idea is to compare allocation size in POV of filesystem with allocations size in POV of Qcow2 (by refcounts). If allocation in fs is significantly lower, consider it as metadata-preallocation case. 102 iotest changed, as our detector can't detect shrinked file as metadata-preallocation, which don't seem to be wrong, as with metadata preallocation we always have valid file length. Two other iotests have a slight change in their QMP output sequence: Active 'block-commit' returns earlier because the job coroutine yields earlier on a blocking operation. This operation is loading the refcount blocks in qcow2_detect_metadata_preallocation(). Suggested-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | tests/perf: Test lseek influence on qcow2 block-statusVladimir Sementsov-Ogievskiy2019-06-041-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | Block layer may recursively check block_status in file child of qcow2, if qcow2 driver returned DATA. There are several test cases to check influence of lseek on block_status performance. To see real difference run on tmpfs. Tests originally created by Kevin, I just refactored and put them together into one executable file with simple output. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | iotests: Test commit job start with concurrent I/OKevin Wolf2019-06-044-1/+109
| | | | | | | | | | | | | | | | | | This tests that concurrent requests are correctly drained before making graph modifications instead of running into assertions in bdrv_replace_node(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* | libqos: i2c: move address into QI2CDevicePaolo Bonzini2019-06-035-75/+82
| | | | | | | | | | | | | | | | | | | | | | | | This removes the hardcoded I2C address from the tests. The address is passed via QOSGraphEdgeOptions to i2c_device_create and stored in the QI2CDevice. The i2c_send and i2c_recv functions, along with their wrappers, therefore, can be changed to take a QI2CDevice rather than an adapter/address pair. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | tests: convert ds1338-test to qtestPaolo Bonzini2019-06-034-50/+17Star
| | | | | | | | | | | | | | This way, ds1338-test will run for every machine that exposes an i2c-bus. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | tests: convert OMAP i2c tests to qgraphPaolo Bonzini2019-06-035-74/+34Star
| | | | | | | | | | | | | | This way, pca9952-test and tmp105-test will run for every machine that exposes an i2c-bus. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | libqos: add ARM imx25-pdk machine objectPaolo Bonzini2019-06-032-0/+93
| | | | | | | | | | | | This is used to test imx_i2c. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>