summaryrefslogtreecommitdiffstats
path: root/scripts/device-crash-test
Commit message (Collapse)AuthorAgeFilesLines
* tests: run 'device-crash-test' from tests/venvJohn Snow2022-06-061-4/+12
| | | | | | | | | | | | | | Remove the sys.path hacking from device-crash-test, and add in a little user-friendly message for anyone who was used to running this script directly from the source tree. Modify the GitLab job recipes to create the tests/venv first, then run device-crash-test from that venv. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220526000921.1581503-10-jsnow@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw/pxb: Allow creation of a CXL PXB (host bridge)Ben Widawsky2022-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This works like adding a typical pxb device, except the name is 'pxb-cxl' instead of 'pxb-pcie'. An example command line would be as follows: -device pxb-cxl,id=cxl.0,bus="pcie.0",bus_nr=1 A CXL PXB is backward compatible with PCIe. What this means in practice is that an operating system that is unaware of CXL should still be able to enumerate this topology as if it were PCIe. One can create multiple CXL PXB host bridges, but a host bridge can only be connected to the main root bus. Host bridges cannot appear elsewhere in the topology. Note that as of this patch, the ACPI tables needed for the host bridge (specifically, an ACPI object in _SB named ACPI0016 and the CEDT) aren't created. So while this patch internally creates it, it cannot be properly used by an operating system or other system software. Also necessary is to add an exception to scripts/device-crash-test similar to that for exiting pxb as both must created on a PCIexpress host bus. Signed-off-by: Ben Widawsky <ben.widawsky@intel.com> Signed-off-by: Jonathan.Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220429144110.25167-15-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* python: rename qemu.aqmp to qemu.qmpJohn Snow2022-04-211-2/+2
| | | | | | | | | | | | | | | | | | | | | Now that we are fully switched over to the new QMP library, move it back over the old namespace. This is being done primarily so that we may upload this package simply as "qemu.qmp" without introducing confusion over whether or not "aqmp" is a new protocol or not. The trade-off is increased confusion inside the QEMU developer tree. Sorry! Note: the 'private' member "_aqmp" in legacy.py also changes to "_qmp"; not out of necessity, but just to remove any traces of the "aqmp" name. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Beraldo Leal <bleal@redhat.com> Acked-by: Hanna Reitz <hreitz@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org> Message-id: 20220330172812.3427355-8-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
* scripts/device-crash-test: Use a QMP timeoutJohn Snow2021-11-231-1/+1
| | | | | | | | | | | | | | | | | | Despite all the previous fixes, it's still possible for device-crash-test to wedge itself in the case that QEMU terminates *so quickly* that it doesn't even begin a connection attempt to our QMP client. Python will just joyfully wait ad infinitum for a connection that will now never arrive. The real fix is to use asyncio to simultaneously poll both the health of the launched process AND the connection attempt. That's quite a bit more invasive than just setting a connection timeout, though. Do the very simplest thing for now. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20211118204620.1897674-7-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
* Revert "device-crash-test: Ignore errors about a bus not being available"Thomas Huth2021-11-171-1/+0Star
| | | | | | | | | | | | | | | This reverts commit ca89d15f8e42f2e5eac5bd200af38fdbfb32e875. There is already an entry for this kind of messages earlier in the ERROR_RULE_LIST - when I added this patch, I just got fooled by the other errors that occur due to a race between QMP connection and QEMU terminating early (which still spit out the 'No bus found' messages in their backtrace), but these other problems have now fortunately been tackled by John Snow, so we certainly don't need this duplicated entry here anymore. Message-Id: <20211112072220.108580-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* scripts/device-crash-test: hide tracebacks for QMP connect errorsJohn Snow2021-11-161-3/+18
| | | | | | | | | | | | | Generally, the traceback for a connection failure is uninteresting and all we need to know is that the connection attempt failed. Reduce the verbosity in these cases, except when debugging. Signed-off-by: John Snow <jsnow@redhat.com> Reported-by: Thomas Huth <thuth@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-id: 20211111143719.2162525-6-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
* scripts/device-crash-test: don't emit AQMP connection errors to stdoutJohn Snow2021-11-161-0/+6
| | | | | | | | | | | | These errors are expected, so they shouldn't clog up terminal output. In the event that they're *not* expected, we'll be seeing an awful lot more output concerning the nature of the failure. Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-id: 20211111143719.2162525-5-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
* scripts/device-crash-test: simplify Exception handlingJohn Snow2021-11-161-6/+2Star
| | | | | | | | | | | | | | | | We don't need to handle KeyboardInterruptError specifically; we can instead tighten the scope of the broad Exception handlers to only catch "Exception", which has the effect of allowing all BaseException classes that do not inherit from Exception to be raised through. KeyboardInterruptError and a few other important ones are BaseExceptions, so this does the same thing with less code. Signed-off-by: John Snow <jsnow@redhat.com> Reported-by: Thomas Huth <thuth@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-id: 20211111143719.2162525-4-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
* device-crash-test: Ignore errors about a bus not being availableThomas Huth2021-04-011-0/+1
| | | | | | | | | | Recent QEMU versions now sometimes exit cleanly with an error message that a bus is not available for a specified device. Don't flag those as an error in the device-crash-test script. Message-Id: <20210323164718.1393792-1-thuth@redhat.com> Acked-by: John Snow <jsnow@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* hw/scsi: remove 'scsi-disk' deviceDaniel P. Berrangé2021-03-181-1/+0Star
| | | | | | | The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* hw/ide: remove 'ide-drive' deviceDaniel P. Berrangé2021-03-181-1/+0Star
| | | | | | | The 'ide-hd' and 'ide-cd' devices provide suitable alternatives. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* device-crash-test: Remove problematic languageEduardo Habkost2021-02-191-48/+48
| | | | | | | | | | | | | | | | Replace "whitelist" in the device-crash-test script with "rule list". I'm using "rule list" instead of "allow list" or "pass list" because the list is not used only for expected/allowed errors. It also contain rules specifying which errors shouldn't be ignored and/or should be fatal. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210202191207.4103973-1-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* device-crash-test: Check if path is actually an executable fileEduardo Habkost2020-11-091-1/+3
| | | | | | | | | | | | | | | | | | After the transition to Meson, the build directory now have subdirectories named "qemu-system-*.p", and device-crash-test will try to execute them as if they were binaries. This results in errors like: PermissionError: [Errno 13] Permission denied: './qemu-system-or1k.p' When generating the default list of binaries to test, check if the path is actually a file and if it's executable. Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20201026125238.2752882-1-ehabkost@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* meson: link emulators without Makefile.targetPaolo Bonzini2020-08-211-1/+1
| | | | | | | | The binaries move to the root directory, e.g. qemu-system-i386 or qemu-arm. This requires changes to qtests, CI, etc. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* drop "from __future__ import print_function"Paolo Bonzini2020-02-071-1/+0Star
| | | | | | | | | | | | 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>
* scripts: Explicit usage of Python 3 (scripts with __main__)Philippe Mathieu-Daudé2020-02-071-1/+1
| | | | | | | | | | | | | | | | | | 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> Reviewed-by: Juan Quintela <quintela@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-6-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* python/qemu: split QEMUMachine out from underneath __init__.pyJohn Snow2019-07-021-1/+1
| | | | | | | | | | | | It's not obvious that something named __init__.py actually houses important code that isn't relevant to python packaging glue. Move the QEMUMachine and related error classes out into their own module. Adjust users to the new import location. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20190627212816.27298-2-jsnow@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* Introduce a Python module structureCleber Rosa2019-02-221-0/+2
| | | | | | | | | | | | | | | | | | This is a simple move of Python code that wraps common QEMU functionality, and are used by a number of different tests and scripts. By treating that code as a real Python module, we can more easily: * reuse code * have a proper place for the module's own unittests * apply a more consistent style * generate documentation Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Caio Carrara <ccarrara@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20190206162901.19082-2-crosa@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>
* device-crash-test: Python 3 compatibility fixNisarg Shah2019-01-251-1/+2
| | | | | | | | | | | | Restrict whitelist entry stats in debug mode to be sorted only by "count", since Python 3 does not implicitly support comparing dictionaries. Signed-off-by: Nisarg Shah <nshah@disroot.org> Message-Id: <20190116183358.30287-1-nshah@disroot.org> [ehabkost: removed 2 unnecessary hunks from patch] [ehabkost: edited commit message] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* Merge remote-tracking branch ↵Peter Maydell2019-01-181-16/+0Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/ehabkost/tags/python-next-pull-request' into staging Python queue, 2019-01-17 Fixes: * Actually test different Python versions on Travis CI * Fix qemu.py error message when qemu dies from signal Cleanups: * Track Python version on config-host.mak * Remove fixed crashes from scripts/device-crash-test * Acceptance tests: Linux initrd checking test * Fix utf-8 mangling at scripts/replay-dump.py * Remove unused python imports from multiple scripts # gpg: Signature made Thu 17 Jan 2019 20:16:41 GMT # gpg: using RSA key 2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/python-next-pull-request: scripts/replay-dump.py: fix utf-8 mangling qemu.py: Fix error message when qemu dies from signal Acceptance tests: add Linux initrd checking test check-help: visual and content improvements Travis CI: make specified Python versions usable on jobs check-venv: use recorded Python version configure: keep track of Python version scripts: Remove unused python imports scripts/device-crash-test: Remove known crashes Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * scripts: Remove unused python importsPhilippe Mathieu-Daudé2019-01-171-1/+0Star
| | | | | | | | | | | | | | Reported-by: LGTM code review Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20181108143422.15955-1-philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * scripts/device-crash-test: Remove known crashesThomas Huth2019-01-171-15/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like we've fixed them all already in the past months, e.g. with: f7d6bfcdc0fe49040aac3ac131a319cb5427957e spapr_pci: fail gracefully with non-pseries machine types 2363d5ee231bf047479422d56d3b85b7d37a7c23 hw/ppc/spapr_cpu_core: Add a proper check for spapr machine ef0e8fc768a561dd13a86420b3268f6f3d5d0621 iommu: Don't crash if machine is not PC_MACHINE 8929fc3a55f33a103adddf9cfd010bcf2b255c7d hw/block/pflash_cfi*.c: fix confusing assert fail message ... so we can remove these entries from the ERROR_WHITELIST now. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1541510826-21031-1-git-send-email-thuth@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* | hw/misc/ivshmem: Remove deprecated "ivshmem" legacy deviceThomas Huth2019-01-151-1/+0Star
|/ | | | | | | | | | | | | | | It's been marked as deprecated in QEMU v2.6.0 already, so really nobody should use the legacy "ivshmem" device anymore (but use ivshmem-plain or ivshmem-doorbell instead). Time to remove the deprecated device now. Belatedly also update a mention of the deprecated "ivshmem" in the file docs/specs/ivshmem-spec.txt to "ivshmem-doorbell". Missed in commit 5400c02b90b ("ivshmem: Split ivshmem-plain, ivshmem-doorbell off ivshmem"). Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* scripts/device-crash-test: Remove devices that are not user_creatable anymoreThomas Huth2018-10-311-17/+0Star
| | | | | | | | | | | Devices that are derived from TYPE_SYS_BUS_DEVICE are not user_creatable anymore by default, and some others have been marked as non-user_creatable manually, so we can remove these devices from the "ignore"-list in the device-crash-test script. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1538729067-7944-1-git-send-email-thuth@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* scripts/device-crash-test: Remove entries for serial devicesThomas Huth2018-10-041-5/+0Star
| | | | | | | | | | | The problem with the various serial devices has been fixed a while ago in commit 47c4f85a0c27888e12af827471cfef87deb49821 ("hw/char/serial: Allow disconnected chardevs") already, so we can remove these entries from the "ignore" list in the device-crash-test script now. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1538403190-27146-1-git-send-email-thuth@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* device-crash-test: No need for sys.path hackEduardo Habkost2018-10-041-1/+0Star
| | | | | | | | | | | | The device-crash-test script is already inside the 'scripts' directory, there's no need to add the directory manually to sys.path. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180618225131.13113-2-ehabkost@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* doc: replace x-root with rootdir for usb-mtpBandan2018-10-011-1/+1
| | | | | | Signed-off-by: Bandan <bsd@redhat.com> Message-id: 20180907220851.9658-3-bsd@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* python: futurize -f libfuturize.fixes.fix_print_with_importEduardo Habkost2018-06-081-1/+2
| | | | | | | | | | | | | | | | | | | Change all Python code to use print as a function. This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f libfuturize.fixes.fix_print_with_import $py Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Fam Zheng <famz@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-2-ehabkost@redhat.com> [ehabkost: fixup tests/docker/docker.py] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* scripts/device-crash-test: Removed fixed CAN entriesThomas Huth2018-05-071-3/+0Star
| | | | | | | | | | | The CAN device crashes have been fixed with the commit 089eac81e1d34d202471c0a023284f47f4c5f00e already. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1523900489-25950-1-git-send-email-thuth@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* device-crash-test: Remove fixed isa-fdc entryThomas Huth2018-04-091-1/+0Star
| | | | | | | Fixed by commit b3da551 ("fdc: Exit if ISA controller does not support DMA", 2018-03-16). Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* scripts/device-crash-test: Remove fixed isapc-with-iommu entryThomas Huth2018-03-261-1/+0Star
| | | | | | | | | Fixed in a0c167a18470831e359f0538c3cf67907808f13e ("x86_iommu: check if machine has PCI bus"). Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1521193892-15552-5-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw/audio: Fix crashes when devices are used on ISA bus without DMAThomas Huth2018-03-261-3/+0Star
| | | | | | | | | | | The cs4231a, gus and sb16 sound cards crash QEMU when the user tries to instantiate them on a machine with DMA-less ISA bus (for example with "qemu-system-mips64el -M mips -device sb16"). Add proper checks to the realize functions to avoid the crashes. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1521193892-15552-4-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* device-crash-test: Use 'python' binaryEduardo Habkost2018-03-121-1/+1
| | | | | | | | | | Now the script works with Python 3, so we can use the 'python' binary provided by the system. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180312185503.5746-4-ehabkost@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* device-crash-test: New known crashesEduardo Habkost2018-03-121-0/+4
| | | | | | | | | | | | | | | We are not running the script on "make check" yet, and additional bugs were introduced recently in the tree. Whitelist the new crashes while we investigate, to allow us to run device-crash-test on "make check" as soon as possible to prevent new bugs. Cc: Pavel Pisa <pisa@cmp.felk.cvut.cz> Cc: John Snow <jsnow@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180309202827.12085-5-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* scripts: Remove fixed entries from the device-crash-testThomas Huth2018-01-191-8/+0Star
| | | | | | | | | These are crashes / errors which have been fixed already in the past months. We can remove these from the device-crash-test script now. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1513613438-11017-1-git-send-email-thuth@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* hw/ppc: Remove the deprecated spapr-pci-vfio-host-bridge deviceThomas Huth2018-01-101-1/+0Star
| | | | | | | | | | It's a deprecated dummy device since QEMU v2.6.0. That should have been enough time to allow the users to update their scripts in case they still use it, so let's remove this legacy code now. Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* pci-assign: RemovePaolo Bonzini2017-11-051-2/+0Star
| | | | | | | | | | | | Legacy PCI device assignment has been removed from Linux in 4.12, and had been deprecated 2 years ago there. We can remove it from QEMU as well. The ROM loading code was shared with Xen PCI passthrough, so move it to hw/xen. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw/ppc/spapr_cpu_core: Add a proper check for spapr machineThomas Huth2017-09-081-0/+3
| | | | | | | | | | | | | | | | | | QEMU currently crashes when the user tries to add a spapr-cpu-core on a non-pseries machine: $ qemu-system-ppc64 -S -machine ppce500,accel=tcg \ -device POWER5+_v2.1-spapr-cpu-core hw/ppc/spapr_cpu_core.c:178:spapr_cpu_core_realize_child: Object 0x55cee1f55160 is not an instance of type spapr-machine Aborted (core dumped) So let's add a proper check for the correct machine time with a more friendly error message here. Reported-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* hw/arm/allwinner-a10: Mark the allwinner-a10 device with user_creatable = falseThomas Huth2017-09-071-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | QEMU currently exits unexpectedly when the user accidentially tries to do something like this: $ aarch64-softmmu/qemu-system-aarch64 -S -M integratorcp -nographic QEMU 2.9.93 monitor - type 'help' for more information (qemu) device_add allwinner-a10 Unsupported NIC model: smc91c111 Exiting just due to a "device_add" should not happen. Looking closer at the the realize and instance_init function of this device also reveals that it is using serial_hds and nd_table directly there, so this device is clearly not creatable by the user and should be marked accordingly. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Message-id: 1503416789-32080-1-git-send-email-thuth@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* device-crash-test: Fix regexp on whitelistEduardo Habkost2017-07-171-1/+1
| | | | | | | | The "||" in the whitelist entry was not escaped, making the regexp match all strings, on every single cases where QEMU aborted. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170614144939.1115-1-ehabkost@redhat.com>
* scripts: Test script to look for -device crashesEduardo Habkost2017-06-051-0/+624
Test code to check if we can crash QEMU using -device. It will test all accel/machine/device combinations by default, which may take a few hours (it's more than 90k test cases). There's a "-r" option that makes it test a random sample of combinations. The scripts contains a whitelist for: 1) known error messages that make QEMU exit cleanly; 2) known QEMU crashes. This is the behavior when the script finds a failure: * Known clean (exitcode=1) errors generate DEBUG messages (hidden by default) * Unknown clean (exitcode=1) errors will generate INFO messages (visible by default) * Known crashes generate error messages, but are not fatal (unless --strict mode is used) * Unknown crashes generate fatal error messages Having an updated whitelist of known clean errors is useful to make the script less verbose and run faster when in --quick mode, but the whitelist doesn't need to be always up to date. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170526181200.17227-4-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>