#
aabb2a5b |
| 13-Feb-2025 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest/migration: Introduce migration_test_add_suffix
Introduce a new migration_test_add_suffix to allow programmatic creation of tests based on a suffix. Pass the test name into the test so it
tests/qtest/migration: Introduce migration_test_add_suffix
Introduce a new migration_test_add_suffix to allow programmatic creation of tests based on a suffix. Pass the test name into the test so it can know which variant to run.
Reviewed-by: Peter Xu <peterx@redhat.com> Message-ID: <20250213175927.19642-8-farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
show more ...
|
#
2fa72ba7 |
| 27-Nov-2024 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest/migration: Move kvm_dirty_ring_supported to utils
Move kvm_dirty_ring_supported() to migration-util.c. Similarly to ufd_version_check(), this function is used during test definition so p
tests/qtest/migration: Move kvm_dirty_ring_supported to utils
Move kvm_dirty_ring_supported() to migration-util.c. Similarly to ufd_version_check(), this function is used during test definition so put it in the utils file.
Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
show more ...
|
#
124a3c58 |
| 27-Nov-2024 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest/migration: Move ufd_version_check to utils
Move ufd_version_check() to migration-util.c file. This is a helper function that is used during tests definition so it should be available out
tests/qtest/migration: Move ufd_version_check to utils
Move ufd_version_check() to migration-util.c file. This is a helper function that is used during tests definition so it should be available outside of migration-test.c
Since the function is moving to another file, change it to stop accessing the global uffd_feature_thread_id and take it as argument instead.
Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
show more ...
|
#
b7d7f723 |
| 27-Nov-2024 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest/migration: Rename migration-helpers.c
Rename migration-helpers.c to migration-util.c to make its purpose more explicit and avoid the "helper" terminology.
Move the file to the qtest/mig
tests/qtest/migration: Rename migration-helpers.c
Rename migration-helpers.c to migration-util.c to make its purpose more explicit and avoid the "helper" terminology.
Move the file to the qtest/migration/ directory along with the rest of the migration files.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
show more ...
|
#
e6c57040 |
| 27-Nov-2024 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest/migration: Move qmp helpers to a separate file
We current have a bunch of non-test functions in migration-test.c and some others in migration-helpers.c. In order to split migration-test.
tests/qtest/migration: Move qmp helpers to a separate file
We current have a bunch of non-test functions in migration-test.c and some others in migration-helpers.c. In order to split migration-test.c into separate test binaries, these helpers need to go somewhere else.
To avoid making migration-helpers even larger, move all QMP-related functions into a new migration-qmp.c file and put it under the qtest/migration/ directory.
The new file holds everything that has as its main responsibility to call into QMP.
Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
show more ...
|
#
d444e567 |
| 19-Jun-2024 |
Peter Xu <peterx@redhat.com> |
tests/migration-tests: migration_event_wait()
Introduce a small helper to wait for a migration event, generalized from the incoming migration path. Make the helper easier to use by allowing it to k
tests/migration-tests: migration_event_wait()
Introduce a small helper to wait for a migration event, generalized from the incoming migration path. Make the helper easier to use by allowing it to keep waiting until the expected event is received.
Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
show more ...
|
#
408d295d |
| 17-Jun-2024 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest/migration: Add tests for file migration with direct-io
The tests are only allowed to run in systems that know about the O_DIRECT flag and in filesystems which support it.
Note: this als
tests/qtest/migration: Add tests for file migration with direct-io
The tests are only allowed to run in systems that know about the O_DIRECT flag and in filesystems which support it.
Note: this also brings back migrate_set_parameter_bool() which went away when we removed the compression tests. I copied it verbatim.
Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
show more ...
|
#
d5ee387d |
| 12-Mar-2024 |
Het Gala <het.gala@nutanix.com> |
tests/qtest/migration: Add channels parameter in migrate_qmp
Alter migrate_qmp() to allow use of channels parameter, but only fill the uri with correct port number if there are no channels. Here we
tests/qtest/migration: Add channels parameter in migrate_qmp
Alter migrate_qmp() to allow use of channels parameter, but only fill the uri with correct port number if there are no channels. Here we don't want to allow the wrong cases of having both or none (ex: migrate_qmp_fail).
Signed-off-by: Het Gala <het.gala@nutanix.com> Suggested-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20240312202634.63349-7-het.gala@nutanix.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
387dc407 |
| 12-Mar-2024 |
Het Gala <het.gala@nutanix.com> |
tests/qtest/migration: Add channels parameter in migrate_qmp_fail
Alter migrate_qmp_fail() to allow both uri and channels independently. For channels, convert string to a Dict. No dealing with migra
tests/qtest/migration: Add channels parameter in migrate_qmp_fail
Alter migrate_qmp_fail() to allow both uri and channels independently. For channels, convert string to a Dict. No dealing with migrate_get_socket_address() here because we will fail before starting the migration anyway.
Signed-off-by: Het Gala <het.gala@nutanix.com> Suggested-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20240312202634.63349-5-het.gala@nutanix.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
8c47168c |
| 12-Mar-2024 |
Het Gala <het.gala@nutanix.com> |
tests/qtest/migration: Add 'to' object into migrate_qmp()
Add the 'to' object into migrate_qmp(), so we can use migrate_get_socket_address() inside migrate_qmp() to get the port value. This is not a
tests/qtest/migration: Add 'to' object into migrate_qmp()
Add the 'to' object into migrate_qmp(), so we can use migrate_get_socket_address() inside migrate_qmp() to get the port value. This is not applied to other migrate_qmp* because they don't need the port.
Signed-off-by: Het Gala <het.gala@nutanix.com> Suggested-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20240312202634.63349-2-het.gala@nutanix.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
e33b6712 |
| 04-Jan-2024 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest/migration: Add a wrapper to print test names
Our usage of gtest results in us losing the very basic functionality of "knowing which test failed". The issue is that gtest only prints test
tests/qtest/migration: Add a wrapper to print test names
Our usage of gtest results in us losing the very basic functionality of "knowing which test failed". The issue is that gtest only prints test names ("paths" in gtest parlance) once the test has finished, but we use asserts in the tests and crash gtest itself before it can print anything. We also use a final abort when the result of g_test_run is not 0.
Depending on how the test failed/broke we can see the function that trigged the abort, which may be representative of the test, but it could also just be some generic function.
We have been relying on the primitive method of looking at the name of the previous successful test and then looking at the code to figure out which test should have come next.
Add a wrapper to the test registration that does the job of printing the test name before running.
Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/20240104142144.9680-7-farosas@suse.de Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
b1fdd21e |
| 03-Jan-2024 |
Steve Sistare <steven.sistare@oracle.com> |
tests/qtest: precopy migration with suspend
Add a test case to verify that the suspended state is handled correctly during live migration precopy. The test suspends the src, migrates, then wakes th
tests/qtest: precopy migration with suspend
Add a test case to verify that the suspended state is handled correctly during live migration precopy. The test suspends the src, migrates, then wakes the dest.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/1704312341-66640-12-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
f0649758 |
| 03-Jan-2024 |
Steve Sistare <steven.sistare@oracle.com> |
tests/qtest: migration events
Define a state object to capture events seen by migration tests, to allow more events to be captured in a subsequent patch, and simplify event checking in wait_for_migr
tests/qtest: migration events
Define a state object to capture events seen by migration tests, to allow more events to be captured in a subsequent patch, and simplify event checking in wait_for_migration_pass. No functional change.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com> Link: https://lore.kernel.org/r/1704312341-66640-10-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
6c6d2330 |
| 18-Oct-2023 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest/migration: Allow user to specify a machine type
Accept the QTEST_QEMU_MACHINE_TYPE environment variable to take a machine type to use in the tests.
The full machine type is recognized (
tests/qtest/migration: Allow user to specify a machine type
Accept the QTEST_QEMU_MACHINE_TYPE environment variable to take a machine type to use in the tests.
The full machine type is recognized (e.g. pc-q35-8.2). Aliases (e.g. pc) are also allowed and resolve to the latest machine version for that alias, or, if using two QEMU binaries, to the latest common machine version between the two.
Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231018192741.25885-12-farosas@suse.de>
show more ...
|
#
dcf389cb |
| 18-Oct-2023 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest/migration: Introduce find_common_machine_version
When using two different QEMU binaries for migration testing, we'll need to find what is the machine version that will work with both bin
tests/qtest/migration: Introduce find_common_machine_version
When using two different QEMU binaries for migration testing, we'll need to find what is the machine version that will work with both binaries. Add a helper for that.
Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231018192741.25885-7-farosas@suse.de>
show more ...
|
#
5274274c |
| 12-Jul-2023 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest: migration: Add support for negative testing of qmp_migrate
There is currently no way to write a test for errors that happened in qmp_migrate before the migration has started.
Add a ver
tests/qtest: migration: Add support for negative testing of qmp_migrate
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>
show more ...
|
#
28fa97e0 |
| 12-Jul-2023 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest: migration: Add migrate_incoming_qmp helper
file-based migration requires the target to initiate its migration after the source has finished writing out the data in the file. Currently t
tests/qtest: migration: Add migrate_incoming_qmp helper
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>
show more ...
|
#
9d479290 |
| 12-Jul-2023 |
Fabiano Rosas <farosas@suse.de> |
tests/qtest: migration: Expose migrate_set_capability
The following patch will make use of this function from within migrate-helpers.c, so move it there.
Reviewed-by: Juan Quintela <quintela@redhat
tests/qtest: migration: Expose migrate_set_capability
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>
show more ...
|
#
266ea334 |
| 01-Jun-2023 |
Daniel P. Berrangé <berrange@redhat.com> |
tests/qtest: capture RESUME events during migration
When running migration tests we monitor for a STOP event so we can skip redundant waits. This will be needed for the RESUME event too shortly.
Re
tests/qtest: capture RESUME events during migration
When running migration tests we monitor for a STOP event so we can skip redundant waits. This will be needed for the RESUME event too shortly.
Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230601161347.1803440-8-berrange@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
aca04069 |
| 01-Jun-2023 |
Daniel P. Berrangé <berrange@redhat.com> |
tests/qtest: replace wait_command() with qtest_qmp_assert_success
Most usage of wait_command() is followed by qobject_unref(), which is just a verbose re-implementation of qtest_qmp_assert_success()
tests/qtest: replace wait_command() with qtest_qmp_assert_success
Most usage of wait_command() is followed by qobject_unref(), which is just a verbose re-implementation of qtest_qmp_assert_success().
Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230601161347.1803440-7-berrange@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
cdf5ab55 |
| 01-Jun-2023 |
Daniel P. Berrangé <berrange@redhat.com> |
tests/qtest: switch to using event callbacks for STOP event
Change the migration test to use the new qtest event callback to watch for the stop event. This ensures that we only watch for the STOP ev
tests/qtest: switch to using event callbacks for STOP event
Change the migration test to use the new qtest event callback to watch for the stop event. This ensures that we only watch for the STOP event on the source QEMU. The previous code would set the single 'got_stop' flag when either source or dest QEMU got the STOP event.
Reviewed-by: Juan Quintela <quintela@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230601161347.1803440-6-berrange@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
ffd47275 |
| 01-Jun-2023 |
Daniel P. Berrangé <berrange@redhat.com> |
tests/qtest: get rid of 'qmp_command' helper in migration test
This function duplicates logic of qtest_qmp_assert_success_ref. The qtest_qmp_assert_success_ref method has better diagnostics on failu
tests/qtest: get rid of 'qmp_command' helper in migration test
This function duplicates logic of qtest_qmp_assert_success_ref. The qtest_qmp_assert_success_ref method has better diagnostics on failure because it prints the entire QMP response, instead of just asserting on existance of the 'error' key.
Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230601161347.1803440-4-berrange@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
0472b2e5 |
| 19-Dec-2022 |
Daniel P. Berrangé <berrange@redhat.com> |
tests: add G_GNUC_PRINTF for various functions
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20221219130205.687815-6-berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzin
tests: add G_GNUC_PRINTF for various functions
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20221219130205.687815-6-berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
d7613ee2 |
| 24-Aug-2022 |
Bin Meng <bin.meng@windriver.com> |
tests/qtest: migration-test: Skip running test_migrate_fd_proto on win32
The test case 'test_migrate_fd_proto' calls socketpair() which does not exist on win32. Exclude it. The helper function wait_
tests/qtest: migration-test: Skip running test_migrate_fd_proto on win32
The test case 'test_migrate_fd_proto' calls socketpair() which does not exist on win32. Exclude it. The helper function wait_command_fd() is not needed anymore, hence exclude it too.
Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20220824094029.1634519-22-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
8aff6f50 |
| 25-Jun-2022 |
Hyman Huang(黄勇) <huangy81@chinatelecom.cn> |
tests: Add dirty page rate limit test
Add dirty page rate limit test if kernel support dirty ring,
The following qmp commands are covered by this test case: "calc-dirty-rate", "query-dirty-rate", "
tests: Add dirty page rate limit test
Add dirty page rate limit test if kernel support dirty ring,
The following qmp commands are covered by this test case: "calc-dirty-rate", "query-dirty-rate", "set-vcpu-dirty-limit", "cancel-vcpu-dirty-limit" and "query-vcpu-dirty-limit".
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> Acked-by: Peter Xu <peterx@redhat.com> Message-Id: <eed5b847a6ef0a9c02a36383dbdd7db367dd1e7e.1656177590.git.huangy81@chinatelecom.cn> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
show more ...
|