aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2021-02-16tests/tcg/aarch64: Add mte smoke testsRichard Henderson
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210212184902.1251044-32-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-02-16target/arm: Use the proper TBI settings for linux-userRichard Henderson
We were fudging TBI1 enabled to speed up the generated code. Now that we've improved the code generation, remove this. Also, tidy the comment to reflect the current code. The pauth test was testing a kernel address (-1) and making incorrect assumptions about TBI1; stick to userland addresses. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210212184902.1251044-23-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-02-15tests/qemu-iotests: Remove test 259 from the "auto" groupThomas Huth
Tests in the "auto" group should support qcow2 so that they can be run during "make check-block". Test 259 only supports "raw", so it currently always gets skipped when running "make check-block". Let's skip this unnecessary step and remove it from the auto group. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210215103835.1129145-1-thuth@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2021-02-15iotests: Consistent $IMGOPTS boundary matchingMax Reitz
To disallow certain refcount_bits values, some _unsupported_imgopts invocations look like "refcount_bits=1[^0-9]", i.e. they match an integer boundary with [^0-9]. This expression does not match the end of the string, though, so it breaks down when refcount_bits is the last option (which it tends to be after the rewrite of the check script in Python). Those invocations could use \b or \> instead, but those are not portable. They could use something like \([^0-9]\|$\), but that would be cumbersome. To make it simple and keep the existing invocations working, just let _unsupported_imgopts match the regex against $IMGOPTS plus a trailing space. Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20210210095128.22732-1-mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2021-02-15tests/tcg: fix silent skipping of softmmu gdb testsAlex Bennée
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210211122750.22645-16-alex.bennee@linaro.org>
2021-02-15tests/docker: remove travis containerDaniel P. Berrangé
The travis container that we have no longer matches what travis currently uses. As all x86 jobs are being moved to GitLab CI too, there is no compelling reason to update the travis container. It is simpler to just remove it. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210209135011.1224992-2-berrange@redhat.com> Message-Id: <20210211122750.22645-9-alex.bennee@linaro.org>
2021-02-15travis.yml: Move gprof/gcov test across to gitlabPhilippe Mathieu-Daudé
Similarly to commit 8cdb2cef3f1, move the gprof/gcov test to GitLab. The coverage-summary.sh script is not Travis-CI specific, make it generic. [thuth: Add gcovr and bsdmainutils which are required for the coverage-summary.sh script to the ubuntu docker file, and use 'check' as test target] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20201108204535.2319870-10-philmd@redhat.com> Message-Id: <20210211045455.456371-2-thuth@redhat.com> Message-Id: <20210211122750.22645-2-alex.bennee@linaro.org>
2021-02-13Merge remote-tracking branch 'remotes/ericb/tags/pull-bitmaps-2021-02-12' ↵Peter Maydell
into staging bitmaps patches for 2021-02-12 - add 'transform' member to manipulate bitmaps across migration - work towards better error handling during bdrv_open # gpg: Signature made Fri 12 Feb 2021 23:19:39 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-bitmaps-2021-02-12: block: use return status of bdrv_append() block: return status from bdrv_append and friends qemu-iotests: 300: Add test case for modifying persistence of bitmap migration: dirty-bitmap: Allow control of bitmap persistence migration: dirty-bitmap: Use struct for alias map inner members Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-02-12block: use return status of bdrv_append()Vladimir Sementsov-Ogievskiy
Now bdrv_append returns status and we can drop all the local_err things around it. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-Id: <20210202124956.63146-3-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2021-02-12qemu-iotests: 300: Add test case for modifying persistence of bitmapPeter Krempa
Verify that the modification of the bitmap persistence over migration which is controlled via BitmapMigrationBitmapAliasTransform works properly. Based on TestCrossAliasMigration Signed-off-by: Peter Krempa <pkrempa@redhat.com> Message-Id: <d9c8e9827e9b6001b2dd1b92e64aab858e6d2a86.1613150869.git.pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [eblake: Adjust test for explicit read_zeroes=False] Signed-off-by: Eric Blake <eblake@redhat.com>
2021-02-12iotests/264: add backup-cancel test-caseVladimir Sementsov-Ogievskiy
Check that cancel doesn't wait for 10s of nbd reconnect timeout. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210205163720.887197-11-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2021-02-12iotests/264: add mirror-cancel test-caseVladimir Sementsov-Ogievskiy
Check that cancel doesn't wait for 10s of nbd reconnect timeout. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210205163720.887197-9-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2021-02-12iotests.py: qemu_nbd_popen: remove pid file after useVladimir Sementsov-Ogievskiy
To not interfere with other qemu_nbd_popen() calls in same test. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210205163720.887197-8-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2021-02-12iotests/264: move to python unittestVladimir Sementsov-Ogievskiy
We are going to add more test cases, so use the library supporting test cases. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210205163720.887197-7-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2021-02-12iotests/210: Fix reference outputMax Reitz
Commit 69b55e03f has changed an error message, adjust the reference output to account for it. Fixes: 69b55e03f7e65a36eb954d0b7d4698b258df2708 ("block: refactor bdrv_check_request: add errp") Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20210209181923.497688-1-mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2021-02-09Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into ↵Peter Maydell
staging * Fuzzing improvements (Qiuhao, Alexander) * i386: Fix BMI decoding for instructions with the 0x66 prefix (David) * initial attempt at fixing event_notifier emulation (Maxim) * i386: PKS emulation, fix for "qemu-system-i386 -cpu host" (myself) * meson: RBD test fixes (myself) * meson: TCI warnings (Philippe) * Leaner build for --disable-guest-agent, --disable-system and --disable-tools (Philippe, Stefan) * --enable-tcg-interpreter fix (Richard) * i386: SVM feature bits (Wei) * KVM bugfix (Thomas H.) * Add missing MemoryRegionOps callbacks (PJP) # gpg: Signature made Mon 08 Feb 2021 14:15:35 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: (46 commits) target/i386: Expose VMX entry/exit load pkrs control bits target/i386: Add support for save/load IA32_PKRS MSR imx7-ccm: add digprog mmio write method tz-ppc: add dummy read/write methods spapr_pci: add spapr msi read method nvram: add nrf51_soc flash read method prep: add ppc-parity write method vfio: add quirk device write method pci-host: designware: add pcie-msi read method hw/pci-host: add pci-intack write method cpu-throttle: Remove timer_mod() from cpu_throttle_set() replay: rng-builtin support pc-bios/descriptors: fix paths in json files replay: fix replay of the interrupts accel/kvm/kvm-all: Fix wrong return code handling in dirty log code qapi/meson: Restrict UI module to system emulation and tools qapi/meson: Restrict system-mode specific modules qapi/meson: Remove QMP from user-mode emulation qapi/meson: Restrict qdev code to system-mode emulation meson: Restrict emulation code ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-02-08Merge remote-tracking branch ↵Peter Maydell
'remotes/philmd-gitlab/tags/integration-testing-20210208' into staging Integration testing patches Tests added: - Armbian 20.08 on Orange Pi PC (Philippe) - MPC8544ds machine (Thomas) - Virtex-ml507 ppc machine (Thomas) - Re-enable the microblaze test (Thomas) Various fixes and documentation improvements from Cleber. # gpg: Signature made Mon 08 Feb 2021 20:19:12 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/integration-testing-20210208: Acceptance Tests: remove unnecessary tag from documentation example Acceptance tests: clarify ssh connection failure reason tests/acceptance/virtiofs_submounts: required space between IP and port tests/acceptance/virtiofs_submounts: standardize port as integer tests/acceptance/virtiofs_submounts: use a virtio-net device instead tests/acceptance/virtiofs_submounts: do not ask for ssh key password tests/acceptance/virtiofs_submounts: use workdir property tests/acceptance/boot_linux: rename misleading cloudinit method tests/acceptance/boot_linux: fix typo on cloudinit error message tests/acceptance: Re-enable the microblaze test tests/acceptance: Add a test for the virtex-ml507 ppc machine tests/acceptance: Test the mpc8544ds machine tests/acceptance: Move the pseries test to a separate file tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() method tests/acceptance: Introduce tesseract_ocr() helper tests/acceptance: Extract tesseract_available() helper in new namespace Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-02-08Merge remote-tracking branch ↵Peter Maydell
'remotes/dgilbert/tags/pull-migration-20210208a' into staging Migration pull 2021-02-08 v2 Dropped vmstate: Fix memory leak in vmstate_handle_alloc Broke on Power Added migration: only check page size match if RAM postcopy is enabled # gpg: Signature made Mon 08 Feb 2021 11:28:14 GMT # gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full] # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-migration-20210208a: (27 commits) migration: only check page size match if RAM postcopy is enabled migration: introduce snapshot-{save, load, delete} QMP commands iotests: fix loading of common.config from tests/ subdir iotests: add support for capturing and matching QMP events migration: introduce a delete_snapshot wrapper migration: wire up support for snapshot device selection migration: control whether snapshots are ovewritten block: rename and alter bdrv_all_find_snapshot semantics block: allow specifying name of block device for vmstate storage block: add ability to specify list of blockdevs during snapshot migration: stop returning errno from load_snapshot() migration: Make save_snapshot() return bool, not 0/-1 block: push error reporting into bdrv_all_*_snapshot functions migration: Display the migration blockers migration: Add blocker information migration: Fix a few absurdly defective error messages migration: Fix cache_init()'s "Failed to allocate" error messages migration: Clean up signed vs. unsigned XBZRLE cache-size migration: Fix migrate-set-parameters argument validation migration: introduce 'userfaultfd-wrlat.py' script ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-02-08Acceptance tests: clarify ssh connection failure reasonCleber Rosa
If the connection to the ssh server fails, it may indeed be a "sshd" issue, but it may also not be that. Let's state what we know: the establishment of the connection from the client side was not possible. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210203172357.1422425-13-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance/virtiofs_submounts: required space between IP and portCleber Rosa
AFAICT, there should not be a situation where IP and port do not have at least one whitespace character separating them. This may be true for other '\s*' patterns in the same regex too. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210203172357.1422425-10-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance/virtiofs_submounts: standardize port as integerCleber Rosa
Instead of having to cast it whenever it's going to be used, let's standardize it as an integer, which is the data type that will be used most often. Given that the regex will only match digits, it's safe that we'll end up getting a integer, but, it could as well be a zero. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Beraldo Leal <bleal@redhat.com> Message-Id: <20210203172357.1422425-9-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance/virtiofs_submounts: use a virtio-net device insteadCleber Rosa
In a virtiofs based tests, it seems safe to assume that the guest will be capable of a virtio-net device. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210203172357.1422425-7-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance/virtiofs_submounts: do not ask for ssh key passwordCleber Rosa
Tests are supposed to be non-interactive, and ssh-keygen is asking for a passphrase when creating a key. Let's set an empty passphrase to avoid the prompt. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Beraldo Leal <bleal@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210203172357.1422425-6-crosa@redhat.com> [PMD: Reword description per Alex Bennée comment] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance/virtiofs_submounts: use workdir propertyCleber Rosa
For Avocado Instrumented based tests, it's a better idea to just use the property. The environment variable is a fall back for tests not written using that Python API. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Beraldo Leal <bleal@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reference: https://avocado-framework.readthedocs.io/en/84.0/api/test/avocado.html#avocado.Test.workdir Message-Id: <20210203172357.1422425-5-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance/boot_linux: rename misleading cloudinit methodCleber Rosa
There's no downloading happening on that method, so let's call it "prepare" instead. While at it, and because of it, the current "prepare_boot" and "prepare_cloudinit" are also renamed. The reasoning here is that "prepare_" methods will just work on the images, while "set_up_" will make them effective to the VM that will be launched. Inspiration comes from the "virtiofs_submounts.py" tests, which this expects to converge more into. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Beraldo Leal <bleal@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210203172357.1422425-3-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance/boot_linux: fix typo on cloudinit error messageCleber Rosa
Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Beraldo Leal <bleal@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210203172357.1422425-2-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance: Re-enable the microblaze testThomas Huth
The microblaze kernel sometimes gets stuck during boot (ca. 1 out of 200 times), so we disabled the corresponding acceptance tests some months ago. However, it's likely better to check that the kernel is still starting than to not testing it at all anymore. Move the test to a separate file, enable it again and check for an earlier console message that should always appear. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210128152815.585478-1-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-02-08' into ↵Peter Maydell
staging QAPI patches patches for 2021-02-08 # gpg: Signature made Mon 08 Feb 2021 13:54:26 GMT # 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-qapi-2021-02-08: qapi: enable strict-optional checks qapi: type 'info' as Optional[QAPISourceInfo] qapi/gen: Drop support for QAPIGen without a file name qapi/commands: Simplify command registry generation qapi/gen: Support switching to another module temporarily qapi/gen: write _genc/_genh access shims qapi: centralize the built-in module name definition qapi/gen: Combine ._add_[user|system]_module qapi: use './builtin' as the built-in module name qapi: use explicitly internal module names qapi/gen: Replace ._begin_system_module() qapi: centralize is_[user|system|builtin]_module methods qapi/gen: inline _wrap_ifcond into end_if() qapi/main: handle theoretical None-return from re.match() qapi/events: fix visit_event typing qapi/commands: assert arg_type is not None Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-02-08qapi/meson: Remove QMP from user-mode emulationPhilippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20210122204441.2145197-11-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-08tests/meson: Only build softfloat objects if TCG is selectedPhilippe Mathieu-Daudé
Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210122204441.2145197-3-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-08fuzz: add virtio-9p configurations for fuzzingAlexander Bulekov
virtio-9p devices are often used to expose a virtual-filesystem to the guest. There have been some bugs reported in this device, such as CVE-2018-19364, and CVE-2021-20181. We should fuzz this device This patch adds two virtio-9p configurations: * One with the widely used -fsdev local driver. This driver leaks some state in the form of files/directories created in the shared dir. * One with the synth driver. While it is not used in the real world, this driver won't leak leak state between fuzz inputs. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Message-Id: <20210117230924.449676-4-alxndr@bu.edu>
2021-02-08fuzz: enable dynamic args for generic-fuzz configsAlexander Bulekov
For some device configurations, it is useful to configure some resources, and adjust QEMU arguments at runtime, prior to fuzzing. This patch adds an "argfunc" to generic the generic_fuzz_config. When specified, it is responsible for configuring the resources and returning a string containing the corresponding QEMU arguments. This can be useful for targets that rely on e.g.: * a temporary qcow2 image * a temporary directory * an unused TCP port used to bind the VNC server Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210117230924.449676-2-alxndr@bu.edu>
2021-02-08fuzz: log the arguments used to initialize QEMUAlexander Bulekov
This is useful for building reproducers. Instead checking the code or the QEMU_FUZZ_ARGS, the arguments are at the top of the crash log. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210117201014.271610-3-alxndr@bu.edu>
2021-02-08fuzz: refine the ide/ahci fuzzer configsAlexander Bulekov
Disks work differently depending on the x86 machine type (SATA vs PATA). Additionally, we should fuzz the atapi code paths, which might contain vulnerabilities such as CVE-2020-29443. This patch adds hard-disk and cdrom generic-fuzzer configs for both the pc (PATA) and q35 (SATA) machine types. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Acked-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Message-Id: <20210120152211.109782-1-alxndr@bu.edu>
2021-02-08fuzz: ignore address_space_map is_write flagAlexander Bulekov
We passed an is_write flag to the fuzz_dma_read_cb function to differentiate between the mapped DMA regions that need to be populated with fuzzed data, and those that don't. We simply passed through the address_space_map is_write parameter. The goal was to cut down on unnecessarily populating mapped DMA regions, when they are not read from. Unfortunately, nothing precludes code from reading from regions mapped with is_write=true. For example, see: https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg04729.html This patch removes the is_write parameter to fuzz_dma_read_cb. As a result, we will fill all mapped DMA regions with fuzzed data, ignoring the specified transfer direction. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Message-Id: <20210120060255.558535-1-alxndr@bu.edu>
2021-02-08qapi: use './builtin' as the built-in module nameJohn Snow
Use './builtin' as the built-in module name instead of None. Clarify the typing that this is now always a string. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20210201193747.2169670-9-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-02-08tests/acceptance: Add a test for the virtex-ml507 ppc machineThomas Huth
The "And a hippo new year" image from the QEMU advent calendar 2020 can be used to test the virtex-ml507 ppc machine. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20210112164045.98565-4-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance: Test the mpc8544ds machineThomas Huth
We can use the "Stupid creek" image to test the mpc8544ds ppc machine. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20210112164045.98565-3-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance: Move the pseries test to a separate fileThomas Huth
Let's gather the POWER-related tests in a separate file. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20210112164045.98565-2-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PCPhilippe Mathieu-Daudé
Test U-Boot and Linux on the recent Armbian release 20.08. Suggested-by: Cleber Rosa <crosa@redhat.com> Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com> Tested-by: Bin Meng <bin.meng@windriver.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201023131808.3198005-5-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() methodPhilippe Mathieu-Daudé
As we want to reuse the same U-Boot test for multiple Armbian releases, extract the common part as do_test_arm_orangepi_armbian_uboot(). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Bin Meng <bin.meng@windriver.com> Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com> Message-Id: <20201023131808.3198005-4-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance: Introduce tesseract_ocr() helperPhilippe Mathieu-Daudé
We are going to reuse the tesseract OCR code. Create a new tesseract_ocr() helper and use it. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201021105035.2477784-5-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08tests/acceptance: Extract tesseract_available() helper in new namespacePhilippe Mathieu-Daudé
We are going to reuse tesseract_available(). Extract it to a new 'tesseract_utils' namespace. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20201021105035.2477784-4-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-02-08iotests: fix loading of common.config from tests/ subdirDaniel P. Berrangé
common.rc assumes it is being sourced from the same directory and so also tries to source common.config from the current working directory. With the ability to now have named tests in the tests/ subdir we need to check two locations for common.config. Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20210204124834.774401-12-berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2021-02-08iotests: add support for capturing and matching QMP eventsDaniel P. Berrangé
When using the _launch_qemu and _send_qemu_cmd functions from common.qemu, any QMP events get mixed in with the output from the commands and responses. This makes it difficult to write a test case as the ordering of events in the output is not stable. This introduces a variable 'capture_events' which can be set to a list of event names. Any events listed in this variable will not be printed, instead collected in the $QEMU_EVENTS environment variable. A new '_wait_event' function can be invoked to collect events at a fixed point in time. The function will first pull events cached in $QEMU_EVENTS variable, and if none are found, will then read more from QMP. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20210204124834.774401-11-berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2021-02-08block: allow specifying name of block device for vmstate storageDaniel P. Berrangé
Currently the vmstate will be stored in the first block device that supports snapshots. Historically this would have usually been the root device, but with UEFI it might be the variable store. There needs to be a way to override the choice of block device to store the state in. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20210204124834.774401-6-berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2021-02-08block: push error reporting into bdrv_all_*_snapshot functionsDaniel P. Berrangé
The bdrv_all_*_snapshot functions return a BlockDriverState pointer for the invalid backend, which the callers then use to report an error message. In some cases multiple callers are reporting the same error message, but with slightly different text. In the future there will be more error scenarios for some of these methods, which will benefit from fine grained error message reporting. So it is helpful to push error reporting down a level. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> [PMD: Initialize variables] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210204124834.774401-2-berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2021-02-08tests/Makefile.include: don't use TARGET_DIRS for check-tcgAlex Bennée
TARGET_DIRS reflects what we wanted to configure which in the normal case is all our targets. However once meson has pared-down our target list due to missing features we need to check the final list of ninja-targets. This prevents check-tcg barfing on a --disable-tcg build. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20210202134001.25738-14-alex.bennee@linaro.org>
2021-02-08scripts/mtest2make.py: export all-%s-targets variable and use itAlex Bennée
There are some places where the conditional makefile support is the simplest solution. Now we don't expose CONFIG_TCG as a variable create a new one that can be checked for the check-help output. As check-tcg is a PHONY target we re-use check-softfloat to gate that as well. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20210202134001.25738-13-alex.bennee@linaro.org>
2021-02-08tests/tcg: Replace /bin/true by true (required on macOS)Stefan Weil
/bin/true is missing on macOS, but simply "true" is available as a shell builtin. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210128135627.2067003-1-sw@weilnetz.de> Message-Id: <20210202134001.25738-12-alex.bennee@linaro.org>