summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-02-17qapi: Split control.json off misc.jsonKevin Wolf
misc.json contains definitions that are related to the system emulator, so it can't be used for other tools like the storage daemon. This patch moves basic functionality that is shared between all tools (and mostly related to the monitor itself) into a new control.json, which could be used in tools as well. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200129102239.31435-3-kwolf@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-02-14Merge remote-tracking branch ↵Peter Maydell
'remotes/juanquintela/tags/pull-migration-pull-request' into staging Migration pull request # gpg: Signature made Thu 13 Feb 2020 13:04:43 GMT # gpg: using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full] # gpg: aka "Juan Quintela <quintela@trasno.org>" [full] # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * remotes/juanquintela/tags/pull-migration-pull-request: git: Make submodule check only needed modules migration-test: fix some memleaks in migration-test tests/migration: Add some slack to auto converge migration/rdma: rdma_accept_incoming_migration fix error handling migration: Optimization about wait-unplug migration state migration: Maybe VM is paused when migration is cancelled Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-14Merge remote-tracking branch ↵Peter Maydell
'remotes/pmaydell/tags/pull-target-arm-20200213' into staging target-arm queue: * i.MX: Fix inverted sense of register bits in watchdog timer * i.MX: Add support for WDT on i.MX6 * arm/virt: cleanups to ACPI tables * Implement ARMv8.1-VMID16 extension * Implement ARMv8.1-PAN * Implement ARMv8.2-UAO * Implement ARMv8.2-ATS1E1 * ast2400/2500/2600: Wire up EHCI controllers * hw/char/exynos4210_uart: Fix memleaks in exynos4210_uart_init * hw/arm/raspi: Clean up the board code # gpg: Signature made Thu 13 Feb 2020 14:40:34 GMT # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20200213: (46 commits) target/arm: Implement ARMv8.1-VMID16 extension hw/arm/raspi: Extract the cores count from the board revision hw/arm/raspi: Use a unique raspi_machine_class_init() method hw/arm/raspi: Extract the board model from the board revision hw/arm/raspi: Set default RAM size to size encoded in board revision hw/arm/raspi: Let class_init() directly call raspi_machine_init() hw/arm/raspi: Make board_rev a field of RaspiMachineClass hw/arm/raspi: Make machines children of abstract RaspiMachineClass hw/arm/raspi: Trivial code movement hw/arm/raspi: Extract the processor type from the board revision hw/arm/raspi: Extract the RAM size from the board revision hw/arm/raspi: Extract the version from the board revision hw/arm/raspi: Correct the board descriptions hw/arm/raspi: Use BCM2708 machine type with pre Device Tree kernels hw/char/exynos4210_uart: Fix memleaks in exynos4210_uart_init hw/arm: ast2600: Wire up EHCI controllers hw/arm: ast2400/ast2500: Wire up EHCI controllers target/arm: Enable ARMv8.2-UAO in -cpu max target/arm: Implement UAO semantics target/arm: Update MSR access to UAO ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-13virt/acpi: update golden masters for DSDT updateHeyi Guo
Differences between disassembled ASL files: @@ -5,13 +5,13 @@ * * Disassembling to symbolic ASL+ operators * - * Disassembly of DSDT, Thu Jan 23 16:00:04 2020 + * Disassembly of DSDT.new, Thu Jan 23 16:47:12 2020 * * Original Table Header: * Signature "DSDT" - * Length 0x0000481E (18462) + * Length 0x000014BB (5307) * Revision 0x02 - * Checksum 0x60 + * Checksum 0xD1 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) @@ -43,7 +43,6 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001) 0x00000021, } }) - Name (_ADR, 0x09000000) // _ADR: Address } Device (FLS0) @@ -668,11 +667,10 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001) Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID Name (_SEG, Zero) // _SEG: PCI Segment Name (_BBN, Zero) // _BBN: BIOS Bus Number - Name (_ADR, Zero) // _ADR: Address Name (_UID, "PCI0") // _UID: Unique ID Name (_STR, Unicode ("PCIe 0 Device")) // _STR: Description String Name (_CCA, One) // _CCA: Cache Coherency Attribute - Name (_PRT, Package (0x0400) // _PRT: PCI Routing Table + Name (_PRT, Package (0x80) // _PRT: PCI Routing Table { Package (0x04) { @@ -1696,7174 +1694,6 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001) 0x03, GSI2, Zero - }, - - Package (0x04) - { - 0x0020FFFF, - Zero, - GSI0, - Zero - }, - - *Omit the other (4 * (256 - 32) - 2) packages* - - Package (0x04) - { - 0x00FFFFFF, - 0x03, - GSI2, - Zero } }) Device (GSI0) @@ -8892,7 +1722,7 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001) Device (GSI1) { Name (_HID, "PNP0C0F" /* PCI Interrupt Link Device */) // _HID: Hardware ID - Name (_UID, Zero) // _UID: Unique ID + Name (_UID, One) // _UID: Unique ID Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings { Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) @@ -8915,7 +1745,7 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001) Device (GSI2) { Name (_HID, "PNP0C0F" /* PCI Interrupt Link Device */) // _HID: Hardware ID - Name (_UID, Zero) // _UID: Unique ID + Name (_UID, 0x02) // _UID: Unique ID Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings { Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) @@ -8938,7 +1768,7 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001) Device (GSI3) { Name (_HID, "PNP0C0F" /* PCI Interrupt Link Device */) // _HID: Hardware ID - Name (_UID, Zero) // _UID: Unique ID + Name (_UID, 0x03) // _UID: Unique ID Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings { Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) @@ -8965,37 +1795,6 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001) Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { - Name (RBUF, ResourceTemplate () - { - WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, - 0x0000, // Granularity - 0x0000, // Range Minimum - 0x00FF, // Range Maximum - 0x0000, // Translation Offset - 0x0100, // Length - ,, ) - DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, - 0x00000000, // Granularity - 0x10000000, // Range Minimum - 0x3EFEFFFF, // Range Maximum - 0x00000000, // Translation Offset - 0x2EFF0000, // Length - ,, , AddressRangeMemory, TypeStatic) - DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, - 0x00000000, // Granularity - 0x00000000, // Range Minimum - 0x0000FFFF, // Range Maximum - 0x3EFF0000, // Translation Offset - 0x00010000, // Length - ,, , TypeStatic, DenseTranslation) - QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, - 0x0000000000000000, // Granularity - 0x0000008000000000, // Range Minimum - 0x000000FFFFFFFFFF, // Range Maximum - 0x0000000000000000, // Translation Offset - 0x0000008000000000, // Length - ,, , AddressRangeMemory, TypeStatic) - }) Return (ResourceTemplate () { WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, @@ -9080,11 +1879,6 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001) }) } - Device (RP0) - { - Name (_ADR, Zero) // _ADR: Address - } - Device (RES0) { Name (_HID, "PNP0C02" /* PNP Motherboard Resources */) // _HID: Hardware ID @@ -9131,7 +1925,6 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS ", "BXPCDSDT", 0x00000001) Device (PWRB) { Name (_HID, "PNP0C0C" /* Power Button Device */) // _HID: Hardware ID - Name (_ADR, Zero) // _ADR: Address Name (_UID, Zero) // _UID: Unique ID } } The differences between the two versions of DSDT.memhp are almost the same as the above, except for total length and checksum. DSDT.numamem binary is just the same with DSDT on virt machine, so we don't show the differences again. Signed-off-by: Heyi Guo <guoheyi@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 20200204014325.16279-8-guoheyi@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-13bios-tables-test: prepare to change ARM virt ACPI DSDTHeyi Guo
We are going to change ARM virt ACPI DSDT table, which will cause make check to fail, so temporarily add related golden masters to ignore list. Signed-off-by: Heyi Guo <guoheyi@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 20200204014325.16279-2-guoheyi@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-13Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
* various small fixes and cleanups * fixes for the ucode revision patch from the previous pull request # gpg: Signature made Wed 12 Feb 2020 15:30:24 GMT # gpg: using RSA key BFFBD25F78C7AE83 # 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: enable monitor and ucode revision with -cpu max target/i386: check for availability of MSR_IA32_UCODE_REV as an emulated MSR target/i386: fix TCG UCODE_REV access build: move TARGET_GPROF to config-host.mak exec: do not define use_icount for user-mode emulation minikconf: accept alnum identifiers Remove support for CLOCK_MONOTONIC not being defined seqlock: fix seqlock_write_unlock_impl function vl: Don't mismatch g_strsplit()/g_free() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-13migration-test: fix some memleaks in migration-testPan Nengyuan
spotted by asan, 'check-qtest-aarch64' runs fail if sanitizers is enabled. Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2020-02-13tests/migration: Add some slack to auto convergeDr. David Alan Gilbert
There's an assert in autoconverge that checks that we quit the iteration when we go below the expected threshold. Philippe saw a case where this assert fired with the measured value slightly over the threshold. (about 3k out of a few million). I can think of two reasons: a) Rounding errors b) That after we make the decision to quit iteration we do one more sync and that sees a few more dirty pages. So add 1% slack to the assertion, that should cover a and most cases of b, probably all we'll see for the test. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2020-02-12build: move TARGET_GPROF to config-host.makPaolo Bonzini
TARGET_GPROF is the same for all targets, write it to config-host.mak instead. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: <20200204161104.21077-1-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-10Merge remote-tracking branch 'remotes/gkurz/tags/9p-next-2020-02-08' into ↵Peter Maydell
staging 9p patches: - some more protocol sanity checks - qtest for readdir - Christian Schoenebeck now official reviewer # gpg: Signature made Sat 08 Feb 2020 08:38:10 GMT # gpg: using RSA key B4828BAF943140CEF2A3491071D4D5E5822F73D6 # gpg: Good signature from "Greg Kurz <groug@kaod.org>" [full] # gpg: aka "Gregory Kurz <gregory.kurz@free.fr>" [full] # gpg: aka "[jpeg image of size 3330]" [full] # Primary key fingerprint: B482 8BAF 9431 40CE F2A3 4910 71D4 D5E5 822F 73D6 * remotes/gkurz/tags/9p-next-2020-02-08: MAINTAINERS: 9pfs: Add myself as reviewer tests/virtio-9p: added readdir test hw/9pfs/9p-synth: added directory for readdir test 9pfs: validate count sent by client with T_readdir 9pfs: require msize >= 4096 tests/virtio-9p: add terminating null in v9fs_string_read() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-10Merge remote-tracking branch ↵Peter Maydell
'remotes/philmd-gitlab/tags/python-next-20200207' into staging - Python 3 cleanups: . Remove text about Python 2 in qemu-deprecated (Thomas) . Remove shebang header (Paolo, Philippe) . scripts/checkpatch.pl now allows Python 3 interpreter (Philippe) . Explicit usage of Python 3 interpreter in scripts (Philippe) . Fix Python scripts permissions (Paolo, Philippe) . Drop 'from __future__ import print_function' (Paolo) . Specify minimum python requirements in ReadTheDocs configuration (Alex) - Test UNIX/EXEC transports with migration (Oksana) - Added extract_from_rpm helper, improved extract_from_deb (Liam) - Allow to use other serial consoles than default one (Philippe) - Various improvements in QEMUMonitorProtocol (Wainer) - Fix kvm_available() on ppc64le (Wainer) # gpg: Signature made Fri 07 Feb 2020 15:01:56 GMT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * remotes/philmd-gitlab/tags/python-next-20200207: (46 commits) .readthedocs.yml: specify some minimum python requirements drop "from __future__ import print_function" make all Python scripts executable scripts/signrom: remove Python 2 support, add shebang tests/qemu-iotests/check: Only check for Python 3 interpreter scripts: Explicit usage of Python 3 (scripts without __main__) tests/qemu-iotests: Explicit usage of Python3 (scripts without __main__) tests/vm: Remove shebang header tests/acceptance: Remove shebang header scripts/tracetool: Remove shebang header scripts/minikconf: Explicit usage of Python 3 scripts: Explicit usage of Python 3 (scripts with __main__) tests: Explicit usage of Python 3 tests/qemu-iotests: Explicit usage of Python 3 (scripts with __main__) tests/qemu-iotests/check: Allow use of python3 interpreter scripts/checkpatch.pl: Only allow Python 3 interpreter tests/acceptance/migration: Default to -nodefaults tests/acceptance/migration: Add the 'migration' tag tests/acceptance/migration: Test EXEC transport when migrating tests/acceptance/migration: Test UNIX transport when migrating ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-08tests/virtio-9p: added readdir testChristian Schoenebeck
The first readdir test simply checks the amount of directory entries returned by 9pfs server, according to the created amount of virtual files on 9pfs synth driver side. Then the subsequent readdir test also checks whether all directory entries have the expected file names (as created on 9pfs synth driver side), ignoring their precise order in result list though. Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Message-Id: <e0b4402722a877178f8fb6a8ad7b64bb20150613.1579567020.git.qemu_oss@crudebyte.com> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: Greg Kurz <groug@kaod.org>
2020-02-08tests/virtio-9p: add terminating null in v9fs_string_read()Christian Schoenebeck
The 9p protocol sends strings in general without null termination over the wire. However for future use of this functions it is beneficial for the delivered string to be null terminated though for being able to use the string with standard C functions which often rely on strings being null terminated. Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Reviewed-by: Greg Kurz <groug@kaod.org> Message-Id: <52c84e2ce3bcafc2a38eed13b8c8e23bc1a8ecb9.1579567019.git.qemu_oss@crudebyte.com> Signed-off-by: Greg Kurz <groug@kaod.org>
2020-02-07drop "from __future__ import print_function"Paolo Bonzini
This is only needed for Python 2, which we do not support anymore. Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200204160604.19883-1-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07make all Python scripts executablePaolo Bonzini
Scripts that have a Python shebang are meant to be executed directly from the shell; give them 755 permissions. Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200204160237.16889-1-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/qemu-iotests/check: Only check for Python 3 interpreterPhilippe Mathieu-Daudé
All the iotests Python scripts have been converted to search for the Python 3 interpreter. Update the ./check script accordingly. Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-13-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/qemu-iotests: Explicit usage of Python3 (scripts without __main__)Philippe Mathieu-Daudé
Use the program search path to find the Python 3 interpreter. Patch created mechanically by running: $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \ $(git grep -lF '#!/usr/bin/env python' \ | xargs grep -L 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-11-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/vm: Remove shebang headerPhilippe Mathieu-Daudé
Patch created mechanically by running: $ chmod 644 $(git grep -lF '#!/usr/bin/env python' \ | xargs grep -L 'if __name__.*__main__') $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" \ $(git grep -lF '#!/usr/bin/env python' \ | xargs grep -L 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-10-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance: Remove shebang headerPhilippe Mathieu-Daudé
Patch created mechanically by running: $ chmod 644 $(git grep -lF '#!/usr/bin/env python' \ | xargs grep -L 'if __name__.*__main__') $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" \ $(git grep -lF '#!/usr/bin/env python' \ | xargs grep -L 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-8-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests: Explicit usage of Python 3Philippe Mathieu-Daudé
Use the program search path to find the Python 3 interpreter. Patch created mechanically by running: $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \ $(git grep -l 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-5-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/qemu-iotests: Explicit usage of Python 3 (scripts with __main__)Philippe Mathieu-Daudé
Use the program search path to find the Python 3 interpreter. Patch created mechanically by running: $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \ $(git grep -l 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-4-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/qemu-iotests/check: Allow use of python3 interpreterPhilippe Mathieu-Daudé
As we want to enforce a unique and explicit Python 3 interpreter, we need let this script handle 'python3' too. Suggested-by: Kevin Wolf <kwolf@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-3-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/migration: Default to -nodefaultsPhilippe Mathieu-Daudé
We don't need the default options to run this test. This fixes errors when running a binary built with --without-default-devices such: ERROR: qemu-system-arm: Unsupported NIC model: virtio-net-pci Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20200129212345.20547-28-philmd@redhat.com> [PMD: Rebased] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/migration: Add the 'migration' tagPhilippe Mathieu-Daudé
By using an Avocado tag, we can run all tests described by that tag as once: $ avocado --show=app run -t migration tests/acceptance/ JOB ID : 165477737509503fcfa6d7108057a0a18f2a6559 JOB LOG : avocado/job-results/job-2020-02-04T17.29-1654777/job.log (1/3) tests/acceptance/migration.py:Migration.test_migration_with_tcp_localhost: PASS (0.38 s) (2/3) tests/acceptance/migration.py:Migration.test_migration_with_unix: PASS (0.33 s) (3/3) tests/acceptance/migration.py:Migration.test_migration_with_exec: PASS (0.07 s) RESULTS : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20200204163304.14616-1-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/migration: Test EXEC transport when migratingOksana Vohchana
Along with VM migration via TCP, we can use migration through the EXEC transport protocol Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200203111631.18796-3-ovoshcha@redhat.com> [PMD: Split patch in 2, reworded subject and description] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/migration: Test UNIX transport when migratingOksana Vohchana
Along with VM migration via TCP, we can use migration through the UNIX transport protocol Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200203111631.18796-3-ovoshcha@redhat.com> [PMD: Split patch in 2, reworded subject and description] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/migration: Factor out do_migrate()Oksana Vohchana
We are going to reuse this code when testing different transport methods, so factor it out first. Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200203111631.18796-2-ovoshcha@redhat.com> [PMD: Split patch in 2, reworded subject and description] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/migration: Factor out assert_migration()Oksana Vohchana
We are going to reuse this code when testing different transport methods, so factor it out first Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200203111631.18796-2-ovoshcha@redhat.com> [PMD: Split patch in 2, reworded subject and description] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/version: Default to -nodefaultsPhilippe Mathieu-Daudé
We don't need the default options to run this test. This fixes errors when running a binary built with --without-default-devices such: ERROR: qemu-system-arm: Unsupported NIC model: virtio-net-pci Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20200129212345.20547-29-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/boot_linux_console: Do not use VGA on Clipper machinePhilippe Mathieu-Daudé
As we only read the serial console, we don't need to force a VGA display. This fixes when running a binary built with --without-default-devices: ERROR: qemu-system-alpha: standard VGA not available We also need the '-nodefaults' argument to avoid: ERROR: qemu-system-alpha: Unsupported NIC model: e1000 Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20200129212345.20547-27-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/virtio_check_params: Disable the testPhilippe Mathieu-Daudé
This test fails on various CI: - Using QEMU 4.0: tests/acceptance/x86_cpu_model_versions.py:X86CPUModelAliases.test_none_alias: ERROR: 'alias-of' (0.45 s) - On OSX Unexpected error in object_property_find() at qom/object.c:1201: qemu-system-x86_64: -device virtio-blk-pci,id=scsi0,drive=drive0: can't apply global virtio-blk-device.scsi=true: Property '.scsi' not found - When removing unavailable machine: VirtioMaxSegSettingsCheck.test_machine_types: ERROR: list.remove(x): x not in list (0.12 s) - Using Xen: xencall: error: Could not obtain handle on privileged command interface: No such file or directory xen be core: xen be core: can't open xen interface - On PPC: TestFail: machine type pseries-2.8: No Transactional Memory support in TCG, try appending -machine cap-htm=off - On S390X configured with --without-default-devices: ERROR: qemu-system-s390x: -device virtio-scsi-pci,id=scsi0: 'virtio-scsi-pci' is not a valid device model name Disable it for now. Cc: Denis Plotnikov <dplotnikov@virtuozzo.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <20200206171715.25041-1-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/virtio_check_params: Default to -nodefaultsPhilippe Mathieu-Daudé
We don't need the default options to run this test. This fixes errors when running a binary built with --without-default-devices such: ERROR: qemu-system-s390x: Unknown device 'virtio-net-ccw' for bus 'virtual-css-bus' Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20200129212345.20547-25-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/virtio_check_params: List machine being testedPhilippe Mathieu-Daudé
Add logging for easier debugging of failures: $ avocado --show=machine run tests/acceptance/virtio_check_params.py (1/1) tests/acceptance/virtio_check_params.py:VirtioMaxSegSettingsCheck.test_machine_types: machine: {'name': 'pc-i440fx-2.12', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'} machine: {'name': 'pc-i440fx-2.0', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'} machine: {'name': 'pc-q35-4.2', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'} machine: {'name': 'pc-i440fx-2.5', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'} machine: {'name': 'pc-i440fx-4.2', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'} ... Reviewed-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <20200129212345.20547-19-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance/virtio_check_params: Improve exception loggingPhilippe Mathieu-Daudé
Message-Id: <20200129212345.20547-18-philmd@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests: rename virtio_seg_max_adjust to virtio_check_paramsDenis Plotnikov
Since, virtio_seg_max_adjust checks not only seg_max, but also virtqueue_size parameter, let's make the test more general and add new parameters to be checked there in the future. Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com> Message-Id: <20200129140702.5411-5-dplotnikov@virtuozzo.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/acceptance: Add boot tests for some of the QEMU advent calendar imagesThomas Huth
The 2018 edition of the QEMU advent calendar 2018 featured Linux images for various non-x86 machines. We can use them for a boot tests in our acceptance test suite. Let's also make sure that we build the corresponding machines in Travis. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20200124170325.30072-1-thuth@redhat.com> [PMD: Rebased, --python=python3 parameter dropped in commit 5311cb12e] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/boot_linux_console: Tag Emcraft Smartfusion2 as running 'u-boot'Philippe Mathieu-Daudé
Avocado tags are handy to automatically select tests matching the tags. Since this test also runs U-Boot, tag it. We can run all the tests using U-Boot as once with: $ avocado --show=app run -t u-boot tests/acceptance/ JOB LOG : avocado/job-results/job-2020-01-21T00.16-ee9344e/job.log (1/3) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2: PASS (16.59 s) (2/3) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_raspi2_uboot: PASS (0.47 s) (3/3) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_aarch64_raspi3_uboot: PASS (2.43 s) RESULTS : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB TIME : 19.78 s Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20200120235159.18510-8-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/boot_linux_console: fix extract_from_deb() commentLiam Merwick
The second param in extract_from_deb() is 'path' not 'file' Signed-off-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1580142994-1836-4-git-send-email-liam.merwick@oracle.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/boot_linux_console: use os.path for filesystem pathsLiam Merwick
Change extract_from_deb() to use os.path routines to manipulate the filesystem path returned when extracting a file. Suggested-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Signed-off-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1580914565-19675-7-git-send-email-liam.merwick@oracle.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07tests/boot_linux_console: add extract_from_rpm methodLiam Merwick
Add a method to extract a specified file from an RPM to the test's working directory and return the path to the extracted file. Signed-off-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1580914565-19675-5-git-send-email-liam.merwick@oracle.com> [PMD: Rebased] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07Acceptance tests: Add interrupt_interactive_console_until_pattern()Philippe Mathieu-Daudé
We need a function to interrupt interactive consoles. Example: Interrupt U-Boot to set different environment values. Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Tested-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20200120235159.18510-4-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-07Acceptance tests: Extract _console_interaction()Philippe Mathieu-Daudé
Since we are going to re-use the code shared between wait_for_console_pattern() and exec_command_and_wait_for_pattern(), extract the common part into a local function. Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Tested-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20200120235159.18510-3-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-06Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2020-02-06' into ↵Peter Maydell
staging nbd patches for 2020-02-06 - Allow setting NBD description from QMP for parity with qemu-nbd - Remove deprecated 'qemu-nbd --partition' # gpg: Signature made Thu 06 Feb 2020 12:50:46 GMT # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-nbd-2020-02-06: qemu-nbd: Removed deprecated --partition option docs: Fix typo in qemu-nbd -P replacement nbd: Allow description when creating NBD blockdev Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-06iotests: add test for backup-top failure on permission activationVladimir Sementsov-Ogievskiy
This test checks that bug is really fixed by previous commit. Cc: qemu-stable@nongnu.org # v4.2.0 Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20200121142802.21467-3-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06iotests: Enable more tests in the 'auto' group to improve test coverageThomas Huth
According to Kevin, tests 030, 040 and 041 are among the most valuable tests that we have, so we should always run them if possible, even if they take a little bit longer. According to Max, it would be good to have a test for iothreads and migration. 127 and 256 seem to be good candidates for iothreads. For migration, let's enable 181 and 203 (which also tests iothreads). (091 would be a good candidate for migration, too, but Alex Bennée reported that this test fails on ZFS file systems, so it can't be included yet) Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 20200121095205.26323-7-thuth@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06iotests: Skip Python-based tests if QEMU does not support virtio-blkThomas Huth
We are going to enable some of the python-based tests in the "auto" group, and these tests require virtio-blk to work properly. Running iotests without virtio-blk likely does not make too much sense anyway, so instead of adding a check for the availability of virtio-blk to each and every test (which does not sound very appealing), let's rather add a check for this a central spot in the "check" script instead (so that it is still possible to run "make check" for qemu-system-tricore for example). Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 20200121095205.26323-6-thuth@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06iotests: Check for the availability of the required devices in 267 and 127Thomas Huth
We are going to enable 127 in the "auto" group, but it only works if virtio-scsi and scsi-hd are available - which is not the case with QEMU binaries like qemu-system-tricore for example, so we need a proper check for the availability of these devices here. A very similar problem exists in iotest 267 - it has been added to the "auto" group already, but requires virtio-blk and thus currently fails with qemu-system-tricore for example. Let's also add aproper check there. Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 20200121095205.26323-5-thuth@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06iotests: Test 183 does not work on macOS and OpenBSDThomas Huth
In the long run, we might want to add test 183 to the "auto" group (but it still fails occasionally, so we cannot do that yet). However, when running 183 in Cirrus-CI on macOS, or with our vm-build-openbsd target, it currently always fails with an "Timeout waiting for return on handle 0" error. Let's mark it as supported only on systems where the test is working most of the time (i.e. Linux, FreeBSD and NetBSD). Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 20200121095205.26323-4-thuth@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06iotests: Test 041 only works on certain systemsThomas Huth
041 works fine on Linux, FreeBSD, NetBSD and OpenBSD, but fails on macOS. Let's mark it as only supported on the systems where we know that it is working fine. Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 20200121095205.26323-3-thuth@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06iotests: remove 'linux' from default supported platformsJohn Snow
verify_platform will check an explicit whitelist and blacklist instead. The default will now be assumed to be allowed to run anywhere. For tests that do not specify their platforms explicitly, this has the effect of enabling these tests on non-linux platforms. For tests that always specified linux explicitly, there is no change. For Python tests on FreeBSD at least; only seven python tests fail: 045 147 149 169 194 199 211 045 and 149 appear to be misconfigurations, 147 and 194 are the AF_UNIX path too long error, 169 and 199 are bitmap migration bugs, and 211 is a bug that shows up on Linux platforms, too. This is at least good evidence that these tests are not Linux-only. If they aren't suitable for other platforms, they should be disabled on a per-platform basis as appropriate. Therefore, let's switch these on and deal with the failures. Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20200121095205.26323-2-thuth@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>