diff options
| author | Stefan Hajnoczi <stefanha@redhat.com> | 2024-12-12 18:45:09 -0500 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2024-12-12 18:45:09 -0500 |
| commit | bdce9bc9179bd7b6f4e12c759dd3cd6794e26a6b (patch) | |
| tree | ac50a528b74309d205ce97bf770d7e8b1b0fd5c4 /tests/qtest/migration/migration-util.h | |
| parent | 1eec82cc06cd68b6ffaf13ba8337fac0080c7bce (diff) | |
| parent | de8bc62cc4871fa97d1891ebb96e782b0c75b56a (diff) | |
| download | focaccia-qemu-bdce9bc9179bd7b6f4e12c759dd3cd6794e26a6b.tar.gz focaccia-qemu-bdce9bc9179bd7b6f4e12c759dd3cd6794e26a6b.zip | |
Merge tag 'qtest-20241212-pull-request' of https://gitlab.com/farosas/qemu into staging
Qtest pull request - TIMEOUT_MULTIPLIER setting to allow tests to take longer when asan is enabled - New qtest_system_reset() wrapper to properly wait for a system reset - Split of migration-test.c into multiple files under qtest/migration/ # -----BEGIN PGP SIGNATURE----- # # iQJEBAABCAAuFiEEqhtIsKIjJqWkw2TPx5jcdBvsMZ0FAmda+84QHGZhcm9zYXNA # c3VzZS5kZQAKCRDHmNx0G+wxnXWZEACcxW/P9EiLxIeCf4ke7/qq+8HSOOLdQrEa # hP5ZCzLlY0K8KQ9fhTGvc6UgRBsScXcLuj4eoR8Gke9e4tID39XVdkion/x6OCiv # grC2Ll9/BNrWtR8DiXs3krsU1CXhav6qcT56bMiXV3Qo+KsTmB7RkpXpbkZLZxkn # P2aqZlYFS0zZ3PZQceCasQEzB6Dls7o1wNXvgSJXr2E4IuIEcbyWtQpr5DfctnfN # STbqGTgMXADyjlqh3CWwSLsZQvIVoN9+3twOrZn4j0D+fyEsTjKsZPlUpRtr72ap # FVT+zVIUfxieBlDTsRSwcieD1ePFUUjl7ikQFwypGs33TI9VDTsB88IG7h0/080o # 7dYbSMSG0pGEq9QIB8jkV26OZi3y00L/zmLMNDsN6nxKN4mSySlfVD/B/Jb70Smy # lwbLklnr921kqsF89Bsq8YRyg8bbGXtx2ifGROgqF+JtrxRW0ElF9K/h4HQtPjuD # nZJ4rtrDIv1iMTLJwbNu39fhxvuQowdBYTrbPMgw+xIv++LodqYJSDxbEX+FaDqI # LMf772jiAgesl7qe1d9TJizhvonyi9PIdcUILg0SH0H1KvoSjpS3mlGgvo8zgvh+ # zvhhzkFGDIHmlCvOaIYyCpadJ5SMMS627q/Q13X3DHjUTkpPUhxGgc9oO7T39+iA # 4dOLDRjUcg== # =H6xv # -----END PGP SIGNATURE----- # gpg: Signature made Thu 12 Dec 2024 10:05:50 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-20241212-pull-request' of https://gitlab.com/farosas/qemu: (22 commits) tests/qtest/migration: Split validation tests + misc tests/qtest/migration-test: Fix and enable test_ignore_shared tests/qtest/migration: Split CPR tests tests/qtest/migration: Split precopy tests tests/qtest/migration: Split file tests tests/qtest/migration: Split postcopy tests tests/qtest/migration: Split compression tests from migration-test.c tests/qtest/migration: Split TLS tests from migration-test.c tests/qtest/migration: Move common test code tests/qtest/migration: Isolate test initialization tests/qtest/migration: Move kvm_dirty_ring_supported to utils tests/qtest/migration: Move ufd_version_check to utils tests/qtest/migration: Rename migration-helpers.c tests/qtest/migration: Move qmp helpers to a separate file tests/qtest/migration: Move bootfile code to its own file tests/migration: Disambiguate guestperf vs. a-b tests/qtest/migration: Stop calling everything "test" tests/qtest/migration: Standardize hook names tests/qtest: Use qtest_system_reset_nowait() where appropriate tests/qtest: Use qtest_system_reset() instead of open-coded versions ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qtest/migration/migration-util.h')
| -rw-r--r-- | tests/qtest/migration/migration-util.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/qtest/migration/migration-util.h b/tests/qtest/migration/migration-util.h new file mode 100644 index 0000000000..f5f2e4650e --- /dev/null +++ b/tests/qtest/migration/migration-util.h @@ -0,0 +1,57 @@ +/* + * QTest migration helpers + * + * Copyright (c) 2016-2018 Red Hat, Inc. and/or its affiliates + * based on the vhost-user-test.c that is: + * Copyright (c) 2014 Virtual Open Systems Sarl. + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + +#ifndef MIGRATION_UTIL_H +#define MIGRATION_UTIL_H + +#include "libqtest.h" + +typedef struct QTestMigrationState { + bool stop_seen; + bool resume_seen; + bool suspend_seen; + bool suspend_me; +} QTestMigrationState; + +bool migrate_watch_for_events(QTestState *who, const char *name, + QDict *event, void *opaque); + +QDict *migrate_query(QTestState *who); +QDict *migrate_query_not_failed(QTestState *who); + +void wait_for_migration_status(QTestState *who, + const char *goal, const char **ungoals); + +void wait_for_migration_complete(QTestState *who); + +void wait_for_migration_fail(QTestState *from, bool allow_active); + +char *find_common_machine_version(const char *mtype, const char *var1, + const char *var2); +char *resolve_machine_version(const char *alias, const char *var1, + const char *var2); +#ifdef O_DIRECT +bool probe_o_direct_support(const char *tmpfs); +#else +static inline bool probe_o_direct_support(const char *tmpfs) +{ + return false; +} +#endif + +bool ufd_version_check(bool *uffd_feature_thread_id); +bool kvm_dirty_ring_supported(void); +void migration_test_add(const char *path, void (*fn)(void)); +char *migrate_get_connect_uri(QTestState *who); +void migrate_set_ports(QTestState *to, QList *channel_list); + +#endif /* MIGRATION_UTIL_H */ |