Qtest pull request
- migration-test: fix UADK build, reinstate postcopy tests and other cleanups - a couple of memory leak fixes for bios-tables-test and virtio-iommu-test - drop dead code from fw_cfg-test -----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEqhtIsKIjJqWkw2TPx5jcdBvsMZ0FAmd3DSMQHGZhcm9zYXNA c3VzZS5kZQAKCRDHmNx0G+wxnUy5EACPnvy3U2jen2Cc5Hke69byCQtMkDTAJHH5 xlwTLoTEF25AXMjLyee9vM4MoDHl+EUaGd3zmmAu2/P5/zOHWrBh9VbkFKDDvJJS XTVSZ0Iv9a0LDGKsv74Pk7LUZCEanr9a0qpfYTFPuwUh9yu7pd4QeYpbEdwzKzX6 TMpJTYOE5gUTgP6X8Ir6u3po8DChfE9Eb+Z3LhRU7S+Xi3FoUWRFgRzuvXhXLkf3 SPNEA27XCaqWQjG8SfQ9yhafrEz9OIGq39Q2unSJ8Df8riYurrdhxYrWNZ/6URQi /sYoBJZ2IMBzLg4cVOWXXQwdFkmU+0LUYPOANy6MrYRXl1QJtWway3eHOj+ZlkIH r2ulAJWAXqIQ3Ki6Dv3TYCg0/snF8arFzmdsaAbn0M8YYQB7XAlcqHus5axEMIVO 0VG7rXctRyH2h7DFfKeW/G1aaK5ox+/0aJoVhjmFJSlYZ2DUx+htfsPlIJmwhRRF i61VaOw7NsrHsW0fEgTRurQBVVuZ2/nJT8saJwvXpFiJu0X1GQ6lmKQNlWqm5h6C JyLc096+vOG0Cqih7p+M3NvKTHNQZQzUPSLJU2UXItPDPv1oAmFrHpVlBQiUD37I h/2R6vxZIY5ei2ECFITnl+LaV4MNjGExpeOEi020KSLEz9Y8nk+i5E+4oDUct93z wAsWLadmxg== =sLkH -----END PGP SIGNATURE----- Merge tag 'qtest-20250102-pull-request' of https://gitlab.com/farosas/qemu into staging Qtest pull request - migration-test: fix UADK build, reinstate postcopy tests and other cleanups - a couple of memory leak fixes for bios-tables-test and virtio-iommu-test - drop dead code from fw_cfg-test # -----BEGIN PGP SIGNATURE----- # # iQJEBAABCAAuFiEEqhtIsKIjJqWkw2TPx5jcdBvsMZ0FAmd3DSMQHGZhcm9zYXNA # c3VzZS5kZQAKCRDHmNx0G+wxnUy5EACPnvy3U2jen2Cc5Hke69byCQtMkDTAJHH5 # xlwTLoTEF25AXMjLyee9vM4MoDHl+EUaGd3zmmAu2/P5/zOHWrBh9VbkFKDDvJJS # XTVSZ0Iv9a0LDGKsv74Pk7LUZCEanr9a0qpfYTFPuwUh9yu7pd4QeYpbEdwzKzX6 # TMpJTYOE5gUTgP6X8Ir6u3po8DChfE9Eb+Z3LhRU7S+Xi3FoUWRFgRzuvXhXLkf3 # SPNEA27XCaqWQjG8SfQ9yhafrEz9OIGq39Q2unSJ8Df8riYurrdhxYrWNZ/6URQi # /sYoBJZ2IMBzLg4cVOWXXQwdFkmU+0LUYPOANy6MrYRXl1QJtWway3eHOj+ZlkIH # r2ulAJWAXqIQ3Ki6Dv3TYCg0/snF8arFzmdsaAbn0M8YYQB7XAlcqHus5axEMIVO # 0VG7rXctRyH2h7DFfKeW/G1aaK5ox+/0aJoVhjmFJSlYZ2DUx+htfsPlIJmwhRRF # i61VaOw7NsrHsW0fEgTRurQBVVuZ2/nJT8saJwvXpFiJu0X1GQ6lmKQNlWqm5h6C # JyLc096+vOG0Cqih7p+M3NvKTHNQZQzUPSLJU2UXItPDPv1oAmFrHpVlBQiUD37I # h/2R6vxZIY5ei2ECFITnl+LaV4MNjGExpeOEi020KSLEz9Y8nk+i5E+4oDUct93z # wAsWLadmxg== # =sLkH # -----END PGP SIGNATURE----- # gpg: Signature made Thu 02 Jan 2025 17:03:15 EST # gpg: using RSA key AA1B48B0A22326A5A4C364CFC798DC741BEC319D # gpg: issuer "farosas@suse.de" # gpg: Good signature from "Fabiano Rosas <farosas@suse.de>" [unknown] # gpg: aka "Fabiano Almeida Rosas <fabiano.rosas@suse.com>" [unknown] # gpg: WARNING: The key's User ID is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: AA1B 48B0 A223 26A5 A4C3 64CF C798 DC74 1BEC 319D * tag 'qtest-20250102-pull-request' of https://gitlab.com/farosas/qemu: qtest/fw-cfg: remove compiled out code tests/qtest/migration: Re-enable postcopy tests tests/migration: Drop arch_[source|target] tests/qtest/virtio-iommu-test: Don't pass uninitialized data into qtest_memwrite tests/qtest/bios-tables-test: Free tables at dump_aml_files tests/qtest/migration: Initialize buffer in probe_o_direct_support tests/qtest/migration: Do proper cleanup in the dirty_limit test tests/qtest/migration: Fix compile errors when CONFIG_UADK is set Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
commit
9ee90cfc25
@ -292,6 +292,7 @@ static void dump_aml_files(test_data *data, bool rebuild)
|
|||||||
|
|
||||||
g_free(aml_file);
|
g_free(aml_file);
|
||||||
}
|
}
|
||||||
|
free_test_data(&exp_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool create_tmp_asl(AcpiSdtTable *sdt)
|
static bool create_tmp_asl(AcpiSdtTable *sdt)
|
||||||
|
@ -243,12 +243,6 @@ int main(int argc, char **argv)
|
|||||||
qtest_add_func("fw_cfg/ram_size", test_fw_cfg_ram_size);
|
qtest_add_func("fw_cfg/ram_size", test_fw_cfg_ram_size);
|
||||||
qtest_add_func("fw_cfg/nographic", test_fw_cfg_nographic);
|
qtest_add_func("fw_cfg/nographic", test_fw_cfg_nographic);
|
||||||
qtest_add_func("fw_cfg/nb_cpus", test_fw_cfg_nb_cpus);
|
qtest_add_func("fw_cfg/nb_cpus", test_fw_cfg_nb_cpus);
|
||||||
#if 0
|
|
||||||
qtest_add_func("fw_cfg/machine_id", test_fw_cfg_machine_id);
|
|
||||||
qtest_add_func("fw_cfg/kernel", test_fw_cfg_kernel);
|
|
||||||
qtest_add_func("fw_cfg/initrd", test_fw_cfg_initrd);
|
|
||||||
qtest_add_func("fw_cfg/boot_device", test_fw_cfg_boot_device);
|
|
||||||
#endif
|
|
||||||
qtest_add_func("fw_cfg/max_cpus", test_fw_cfg_max_cpus);
|
qtest_add_func("fw_cfg/max_cpus", test_fw_cfg_max_cpus);
|
||||||
qtest_add_func("fw_cfg/numa", test_fw_cfg_numa);
|
qtest_add_func("fw_cfg/numa", test_fw_cfg_numa);
|
||||||
qtest_add_func("fw_cfg/boot_menu", test_fw_cfg_boot_menu);
|
qtest_add_func("fw_cfg/boot_menu", test_fw_cfg_boot_menu);
|
||||||
|
@ -88,59 +88,6 @@ migrate_hook_start_precopy_tcp_multifd_uadk(QTestState *from,
|
|||||||
return migrate_hook_start_precopy_tcp_multifd_common(from, to, "uadk");
|
return migrate_hook_start_precopy_tcp_multifd_common(from, to, "uadk");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
|
||||||
migrate_hook_start_xbzrle(QTestState *from,
|
|
||||||
QTestState *to)
|
|
||||||
{
|
|
||||||
migrate_set_parameter_int(from, "xbzrle-cache-size", 33554432);
|
|
||||||
|
|
||||||
migrate_set_capability(from, "xbzrle", true);
|
|
||||||
migrate_set_capability(to, "xbzrle", true);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void test_precopy_unix_xbzrle(void)
|
|
||||||
{
|
|
||||||
g_autofree char *uri = g_strdup_printf("unix:%s/migsocket", tmpfs);
|
|
||||||
MigrateCommon args = {
|
|
||||||
.connect_uri = uri,
|
|
||||||
.listen_uri = uri,
|
|
||||||
.start_hook = migrate_hook_start_xbzrle,
|
|
||||||
.iterations = 2,
|
|
||||||
/*
|
|
||||||
* XBZRLE needs pages to be modified when doing the 2nd+ round
|
|
||||||
* iteration to have real data pushed to the stream.
|
|
||||||
*/
|
|
||||||
.live = true,
|
|
||||||
};
|
|
||||||
|
|
||||||
test_precopy_common(&args);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *
|
|
||||||
migrate_hook_start_precopy_tcp_multifd_zlib(QTestState *from,
|
|
||||||
QTestState *to)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Overloading this test to also check that set_parameter does not error.
|
|
||||||
* This is also done in the tests for the other compression methods.
|
|
||||||
*/
|
|
||||||
migrate_set_parameter_int(from, "multifd-zlib-level", 2);
|
|
||||||
migrate_set_parameter_int(to, "multifd-zlib-level", 2);
|
|
||||||
|
|
||||||
return migrate_hook_start_precopy_tcp_multifd_common(from, to, "zlib");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void test_multifd_tcp_zlib(void)
|
|
||||||
{
|
|
||||||
MigrateCommon args = {
|
|
||||||
.listen_uri = "defer",
|
|
||||||
.start_hook = migrate_hook_start_precopy_tcp_multifd_zlib,
|
|
||||||
};
|
|
||||||
test_precopy_common(&args);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void test_multifd_tcp_uadk(void)
|
static void test_multifd_tcp_uadk(void)
|
||||||
{
|
{
|
||||||
MigrateCommon args = {
|
MigrateCommon args = {
|
||||||
@ -151,7 +98,6 @@ static void test_multifd_tcp_uadk(void)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_UADK */
|
#endif /* CONFIG_UADK */
|
||||||
|
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
migrate_hook_start_xbzrle(QTestState *from,
|
migrate_hook_start_xbzrle(QTestState *from,
|
||||||
QTestState *to)
|
QTestState *to)
|
||||||
|
@ -197,8 +197,6 @@ static void cleanup(const char *filename)
|
|||||||
int migrate_start(QTestState **from, QTestState **to, const char *uri,
|
int migrate_start(QTestState **from, QTestState **to, const char *uri,
|
||||||
MigrateStart *args)
|
MigrateStart *args)
|
||||||
{
|
{
|
||||||
g_autofree gchar *arch_source = NULL;
|
|
||||||
g_autofree gchar *arch_target = NULL;
|
|
||||||
/* options for source and target */
|
/* options for source and target */
|
||||||
g_autofree gchar *arch_opts = NULL;
|
g_autofree gchar *arch_opts = NULL;
|
||||||
g_autofree gchar *cmd_source = NULL;
|
g_autofree gchar *cmd_source = NULL;
|
||||||
@ -307,12 +305,11 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri,
|
|||||||
"-name source,debug-threads=on "
|
"-name source,debug-threads=on "
|
||||||
"-m %s "
|
"-m %s "
|
||||||
"-serial file:%s/src_serial "
|
"-serial file:%s/src_serial "
|
||||||
"%s %s %s %s %s",
|
"%s %s %s %s",
|
||||||
kvm_opts ? kvm_opts : "",
|
kvm_opts ? kvm_opts : "",
|
||||||
machine, machine_opts,
|
machine, machine_opts,
|
||||||
memory_size, tmpfs,
|
memory_size, tmpfs,
|
||||||
arch_opts ? arch_opts : "",
|
arch_opts ? arch_opts : "",
|
||||||
arch_source ? arch_source : "",
|
|
||||||
shmem_opts ? shmem_opts : "",
|
shmem_opts ? shmem_opts : "",
|
||||||
args->opts_source ? args->opts_source : "",
|
args->opts_source ? args->opts_source : "",
|
||||||
ignore_stderr);
|
ignore_stderr);
|
||||||
@ -329,12 +326,11 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri,
|
|||||||
"-m %s "
|
"-m %s "
|
||||||
"-serial file:%s/dest_serial "
|
"-serial file:%s/dest_serial "
|
||||||
"-incoming %s "
|
"-incoming %s "
|
||||||
"%s %s %s %s %s",
|
"%s %s %s %s",
|
||||||
kvm_opts ? kvm_opts : "",
|
kvm_opts ? kvm_opts : "",
|
||||||
machine, machine_opts,
|
machine, machine_opts,
|
||||||
memory_size, tmpfs, uri,
|
memory_size, tmpfs, uri,
|
||||||
arch_opts ? arch_opts : "",
|
arch_opts ? arch_opts : "",
|
||||||
arch_target ? arch_target : "",
|
|
||||||
shmem_opts ? shmem_opts : "",
|
shmem_opts ? shmem_opts : "",
|
||||||
args->opts_target ? args->opts_target : "",
|
args->opts_target ? args->opts_target : "",
|
||||||
ignore_stderr);
|
ignore_stderr);
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
#include "migration/bootfile.h"
|
#include "migration/bootfile.h"
|
||||||
#include "migration/migration-util.h"
|
#include "migration/migration-util.h"
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* for uffd_version_check() */
|
/* for uffd_version_check() */
|
||||||
#if defined(__linux__) && defined(__NR_userfaultfd) && defined(CONFIG_EVENTFD)
|
#if defined(__linux__) && defined(__NR_userfaultfd) && defined(CONFIG_EVENTFD)
|
||||||
#include <sys/eventfd.h>
|
#include <sys/eventfd.h>
|
||||||
@ -31,7 +36,6 @@
|
|||||||
/* For dirty ring test; so far only x86_64 is supported */
|
/* For dirty ring test; so far only x86_64 is supported */
|
||||||
#if defined(__linux__) && defined(HOST_X86_64)
|
#if defined(__linux__) && defined(HOST_X86_64)
|
||||||
#include "linux/kvm.h"
|
#include "linux/kvm.h"
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -284,6 +288,7 @@ bool probe_o_direct_support(const char *tmpfs)
|
|||||||
|
|
||||||
buf = qemu_try_memalign(len, len);
|
buf = qemu_try_memalign(len, len);
|
||||||
g_assert(buf);
|
g_assert(buf);
|
||||||
|
memset(buf, 0, len);
|
||||||
|
|
||||||
ret = pwrite(fd, buf, len, offset);
|
ret = pwrite(fd, buf, len, offset);
|
||||||
unlink(filename);
|
unlink(filename);
|
||||||
|
@ -877,6 +877,11 @@ static void test_dirty_limit(void)
|
|||||||
migrate_cancel(from);
|
migrate_cancel(from);
|
||||||
wait_for_migration_status(from, "cancelled", NULL);
|
wait_for_migration_status(from, "cancelled", NULL);
|
||||||
|
|
||||||
|
/* destination always fails after cancel */
|
||||||
|
migration_event_wait(to, "failed");
|
||||||
|
qtest_set_expected_status(to, EXIT_FAILURE);
|
||||||
|
qtest_quit(to);
|
||||||
|
|
||||||
/* Check if dirty limit throttle switched off, set timeout 1ms */
|
/* Check if dirty limit throttle switched off, set timeout 1ms */
|
||||||
do {
|
do {
|
||||||
throttle_us_per_full =
|
throttle_us_per_full =
|
||||||
|
@ -105,7 +105,7 @@ static int send_map(QTestState *qts, QVirtioIOMMU *v_iommu,
|
|||||||
QVirtQueue *vq = v_iommu->vq;
|
QVirtQueue *vq = v_iommu->vq;
|
||||||
uint64_t ro_addr, wr_addr;
|
uint64_t ro_addr, wr_addr;
|
||||||
uint32_t free_head;
|
uint32_t free_head;
|
||||||
struct virtio_iommu_req_map req;
|
struct virtio_iommu_req_map req = {};
|
||||||
size_t ro_size = sizeof(req) - sizeof(struct virtio_iommu_req_tail);
|
size_t ro_size = sizeof(req) - sizeof(struct virtio_iommu_req_tail);
|
||||||
size_t wr_size = sizeof(struct virtio_iommu_req_tail);
|
size_t wr_size = sizeof(struct virtio_iommu_req_tail);
|
||||||
struct virtio_iommu_req_tail buffer;
|
struct virtio_iommu_req_tail buffer;
|
||||||
@ -147,7 +147,7 @@ static int send_unmap(QTestState *qts, QVirtioIOMMU *v_iommu,
|
|||||||
QVirtQueue *vq = v_iommu->vq;
|
QVirtQueue *vq = v_iommu->vq;
|
||||||
uint64_t ro_addr, wr_addr;
|
uint64_t ro_addr, wr_addr;
|
||||||
uint32_t free_head;
|
uint32_t free_head;
|
||||||
struct virtio_iommu_req_unmap req;
|
struct virtio_iommu_req_unmap req = {};
|
||||||
size_t ro_size = sizeof(req) - sizeof(struct virtio_iommu_req_tail);
|
size_t ro_size = sizeof(req) - sizeof(struct virtio_iommu_req_tail);
|
||||||
size_t wr_size = sizeof(struct virtio_iommu_req_tail);
|
size_t wr_size = sizeof(struct virtio_iommu_req_tail);
|
||||||
struct virtio_iommu_req_tail buffer;
|
struct virtio_iommu_req_tail buffer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user