- Oct 18, 2023
-
-
Paolo Bonzini authored
Unify HAVE_GDB_BIN (currently in config-host.mak) and HOST_GDB_SUPPORTS_ARCH into a single GDB variable in config-target.mak. Reviewed-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
test-aes, sha1-vector and sha512-vector need not be conditional on $(CROSS_CC_HAS_SVE), reorganize the "if"s to move them outside. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 17, 2023
-
-
Paolo Bonzini authored
Make all items of config-host.h consistent. To keep the --disable-coroutine-pool code visible to the compiler, mutuate the IS_ENABLED() macro from Linux. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This is an error in Python 3.12; fix it by using a raw string literal or by double-escaping the backslash. Cc: qemu-stable@nongnu.org Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This is an error in Python 3.12; fix it by using a raw string literal. Cc: qemu-stable@nongnu.org Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This is an error in Python 3.12; fix it by using a raw string literal. Cc: qemu-stable@nongnu.org Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Install dtc as it is now a mandatory external dependency in order to build QEMU. Co-developed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
John Snow authored
Whichever python is used to run iotest 297 should be the one used to actually run the linters. Signed-off-by:
John Snow <jsnow@redhat.com> Message-ID: <20230621002121.1609612-5-jsnow@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
John Snow authored
Resolve the build_root before we append more items onto it so that the environment output is more concise with less parent directory confetti in it. Signed-off-by:
John Snow <jsnow@redhat.com> Message-ID: <20230621002121.1609612-4-jsnow@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Fabiano Rosas authored
Add basic tests for file-based migration. Note that we cannot use test_precopy_common because that routine expects it to be possible to run the migration live. With the file transport there is no live migration because we must wait for the source to finish writing the migration data to the file before the destination can start reading. Add a new migration function specifically to handle the file migration. Reviewed-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Fabiano Rosas <farosas@suse.de> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20230712190742.22294-7-farosas@suse.de>
-
Fabiano Rosas authored
Add a smoke test that migrates to a file and gives it to the script. It should catch the most annoying errors such as changes in the ram flags. After code has been merged it becomes way harder to figure out what is causing the script to fail, the person making the change is the most likely to know right away what the problem is. Signed-off-by:
Fabiano Rosas <farosas@suse.de> Acked-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20231009184326.15777-7-farosas@suse.de>
-
- Oct 13, 2023
-
-
Jeuk Kim authored
Fixed four ufs-related coverity issues. The coverity issues and fixes are as follows 1. CID 1519042: Security issue with the rand() function Changed to use a fixed value (0xab) instead of rand() as the value for testing 2. CID 1519043: Dereference after null check Removed useless (redundant) null checks 3. CID 1519050: Out-of-bounds access issue Fix to pass an array type variable to find_first_bit and find_next_bit using DECLARE_BITMAP() 4. CID 1519051: Out-of-bounds read issue Fix incorrect range check for lun Fix coverity CID: 1519042 1519043 1519050 1519051 Signed-off-by:
Jeuk Kim <jeuk20.kim@samsung.com>
-
Song Gao authored
The system test shutdown uses the 'loongarch_virt_pm' region. We can use the write AcpiFadtData.sleep_clt register to realize the shutdown. Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Song Gao <gaosong@loongson.cn> Message-ID: <20231012072351.1409344-1-gaosong@loongson.cn> Signed-off-by:
Song Gao <gaosong@loongson.cn>
-
- Oct 12, 2023
-
-
Vladimir Sementsov-Ogievskiy authored
In many cases we just want an effect of qmp command and want to raise on failure. Use vm.cmd() method which does exactly this. The commit is generated by command git grep -l '\.qmp(' | xargs ./scripts/python_qmp_updater.py And then, fix self.assertRaises to expect ExecuteError exception in tests/qemu-iotests/124 Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-16-vsementsov@yandex-team.ru Signed-off-by:
John Snow <jsnow@redhat.com>
-
Vladimir Sementsov-Ogievskiy authored
We don't expect failure here and need 'result' object. cmd() is better in this case. Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-14-vsementsov@yandex-team.ru Signed-off-by:
John Snow <jsnow@redhat.com>
-
Vladimir Sementsov-Ogievskiy authored
The returned value is unused. It's simple to check by command git grep -B 3 '\.pause_job(' Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-13-vsementsov@yandex-team.ru Signed-off-by:
John Snow <jsnow@redhat.com>
-
Vladimir Sementsov-Ogievskiy authored
qmp() method supports passing dict (if it doesn't need substituting '_' to '-' in keys). So, drop some extra '**' operators. Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-12-vsementsov@yandex-team.ru Signed-off-by:
John Snow <jsnow@redhat.com>
-
Vladimir Sementsov-Ogievskiy authored
Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-11-vsementsov@yandex-team.ru Signed-off-by:
John Snow <jsnow@redhat.com>
-
Vladimir Sementsov-Ogievskiy authored
To simplify further conversion. Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-10-vsementsov@yandex-team.ru Signed-off-by:
John Snow <jsnow@redhat.com>
-
Vladimir Sementsov-Ogievskiy authored
Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-9-vsementsov@yandex-team.ru Signed-off-by:
John Snow <jsnow@redhat.com>
-
Vladimir Sementsov-Ogievskiy authored
Add similar method for consistency. Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-8-vsementsov@yandex-team.ru Signed-off-by:
John Snow <jsnow@redhat.com>
-
Vladimir Sementsov-Ogievskiy authored
Use a shorter name. We are going to move in iotests from qmp() to command() where possible. But command() is longer than qmp() and don't look better. Let's rename. You can simply grep for '\.command(' and for 'def command(' to check that everything is updated (command() in tests/docker/docker.py is unrelated). Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
Juan Quintela <quintela@redhat.com> Message-id: 20231006154125.1068348-6-vsementsov@yandex-team.ru [vsementsov: also update three occurrences in tests/avocado/machine_aspeed.py and keep r-b] Signed-off-by:
John Snow <jsnow@redhat.com>
-
Vladimir Sementsov-Ogievskiy authored
Having cmd() and command() methods in one class doesn't look good. Rename cmd() to cmd_raw(), to show its meaning better. We also want to rename command() to cmd() in future, so this commit is a necessary step. Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20231006154125.1068348-5-vsementsov@yandex-team.ru Signed-off-by:
John Snow <jsnow@redhat.com>
-
Kevin Wolf authored
Almost all functions that access the child links already take the graph lock now. Add locking to the remaining users and finally annotate the struct field itself as protected by the graph lock. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-ID: <20230929145157.45443-22-kwolf@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Almost all functions that access the parent link already take the graph lock now. Add locking to the remaining user in a test case and finally annotate the struct field itself as protected by the graph lock. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-ID: <20230929145157.45443-21-kwolf@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Emanuele Giuseppe Esposito authored
Draining recursively traverses the graph, therefore we need to make sure that also such accesses to the graph are protected by the graph rdlock. There are 3 different drain callers to consider: 1. drain in the main loop: no issue at all, rdlock is nop. 2. drain in an iothread: rdlock only works in main loop or coroutines, so disallow it. 3. drain in a coroutine (regardless of AioContext): the drain mechanism takes care of scheduling a BH in the bs->aio_context that will then take care of perform the actual draining. This is wrong, because as pointed in (2) if bs->aio_context is an iothread then rdlock won't work. Therefore change bdrv_co_yield_to_drain to schedule the BH in the main loop. Caller (2) also implies that we need to modify test-bdrv-drain.c to disallow draining in the iothreads. For some places, we know that they will hold the lock, but we don't have the GRAPH_RDLOCK annotations yet. In this case, add assume_graph_lock() with a FIXME comment. These places will be removed once everything is properly annotated. Signed-off-by:
Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-ID: <20230929145157.45443-6-kwolf@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_first_blk() and bdrv_is_root_node() need to hold a reader lock for the graph. These functions are the only functions in block-backend.c that access the parent list of a node. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-ID: <20230929145157.45443-5-kwolf@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
AIO callbacks are effectively coroutine_mixed_fn. If AIO requests don't return immediately, their callback is called from the request coroutine. This means that in AIO callbacks, we can't call no_coroutine_fns such as bdrv_graph_wrlock(). Unfortunately test-bdrv-drain does so. Change the test to use a BH to drop out of coroutine context, and add coroutine_mixed_fn and no_coroutine_fn markers to clarify the context each function runs in. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-ID: <20230929145157.45443-2-kwolf@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Chris Rauer authored
npcm7xx_timer-test occasionally fails due to the state of the timers from the previous test iteration. Advancing the clock step after the reset resolves this issue. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1897 Signed-off-by:
Chris Rauer <crauer@google.com> Message-ID: <20230929000831.691559-1-crauer@google.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Daniel Henrique Barboza authored
Add smoke tests to ensure that we'll not break the 'max' CPU type when adding new frozen/ratified RISC-V extensions. Signed-off-by:
Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by:
Alistair Francis <alistair.francis@wdc.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20230912132423.268494-12-dbarboza@ventanamicro.com> Signed-off-by:
Alistair Francis <alistair.francis@wdc.com>
-
- Oct 11, 2023
-
-
John Snow authored
Python 3.12 has released, so update the test infrastructure to test against this version. Update the configure script to look for it when an explicit Python interpreter isn't chosen. Signed-off-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-id: 20231006195243.3131140-5-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
The test bails gracefully if this module isn't installed, but linters need a little help understanding that. It's enough to just declare the type in this case. (Fixes pylint complaining about use of an uninitialized variable because it isn't wise enough to understand the notrun call is noreturn.) Signed-off-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-id: 20231006195243.3131140-2-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
By using a socketpair for all of the sockets managed by the VM class and its extensions, we don't need the sock_dir argument anymore, so remove it. We only added this argument so that we could specify a second, shorter temporary directory for cases where the temp/log dirs were "too long" as a socket name on macOS. We don't need it for this class now. In one case, avocado testing takes over responsibility for creating an appropriate sockdir. Signed-off-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-id: 20230928044943.849073-7-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
Fabiano Rosas authored
There is currently no way to write a test for errors that happened in qmp_migrate before the migration has started. Add a version of qmp_migrate that ensures an error happens. To make use of it a test needs to set MigrateCommon.result as MIG_TEST_QMP_ERROR. Reviewed-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Fabiano Rosas <farosas@suse.de> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20230712190742.22294-6-farosas@suse.de>
-
Fabiano Rosas authored
Use the new migrate_incoming_qmp helper in the places that currently open-code calling migrate-incoming. Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Fabiano Rosas <farosas@suse.de> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20230712190742.22294-4-farosas@suse.de>
-
Fabiano Rosas authored
file-based migration requires the target to initiate its migration after the source has finished writing out the data in the file. Currently there's no easy way to initiate 'migrate-incoming', allow this by introducing migrate_incoming_qmp helper, similarly to migrate_qmp. Also make sure migration events are enabled and wait for the incoming migration to start before returning. This avoid a race when querying the migration status too soon after issuing the command. Reviewed-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Fabiano Rosas <farosas@suse.de> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20230712190742.22294-3-farosas@suse.de>
-
Fabiano Rosas authored
The following patch will make use of this function from within migrate-helpers.c, so move it there. Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Fabiano Rosas <farosas@suse.de> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20230712190742.22294-2-farosas@suse.de>
-
Alex Bennée authored
Since 0b1a6490 (tests/docker: use direct RUNC call to build containers) we ended up with the potential for the remaining docker.py script calls to deviate from the direct RUNC calls. Fix this by dropping the use of ENGINE in the makefile and rely entirely on what we detect at configure time. We also tweak the RUNC detection so podman users can still run things from the source tree. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Alistair Francis <alistair.francis@wdc.com> Message-Id: <20231009164104.369749-6-alex.bennee@linaro.org>
-
Alex Bennée authored
We need this to test some TPM stuff. Reviewed-by:
"Daniel P. Berrangé" <berrange@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20231009164104.369749-4-alex.bennee@linaro.org>
-
Alex Bennée authored
After testing locally I decided to revert a5754847 (tests/avocado: Disable the test_sbsaref_edk2_firmware by default) as the test seems pretty stable: env QEMU_TEST_FLAKY_TESTS=1 retry.py -n 50 -c -- \ ./tests/venv/bin/avocado run \ ./tests/avocado/machine_aarch64_sbsaref.py:Aarch64SbsarefMachine.test_sbsaref_edk2_firmware yields: Results summary: 0: 50 times (100.00%), avg time 2.064 (0.04 varience/0.19 deviation) Ran command 50 times, 50 passes Maybe f0ec14c7 (tests/avocado: Fix console data loss) has made it more reliable? Cc: Thomas Huth <thuth@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20231009164104.369749-3-alex.bennee@linaro.org>
-