[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/30] tests: Add postcopy tls recovery migration test
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 22/30] tests: Add postcopy tls recovery migration test |
Date: |
Wed, 20 Jul 2022 12:19:18 +0100 |
From: Peter Xu <peterx@redhat.com>
It's easy to build this upon the postcopy tls test. Rename the old
postcopy recovery test to postcopy/recovery/plain.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220707185527.27747-1-peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
dgilbert: Manual merge
---
tests/qtest/migration-test.c | 39 +++++++++++++++++++++++++++---------
1 file changed, 30 insertions(+), 9 deletions(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index b2020ef6c5..5600b6d46a 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -1146,17 +1146,15 @@ static void test_postcopy_tls_psk(void)
}
#endif
-static void test_postcopy_recovery(void)
+static void test_postcopy_recovery_common(MigrateCommon *args)
{
- MigrateCommon args = {
- .start = {
- .hide_stderr = true,
- },
- };
QTestState *from, *to;
g_autofree char *uri = NULL;
- if (migrate_postcopy_prepare(&from, &to, &args)) {
+ /* Always hide errors for postcopy recover tests since they're expected */
+ args->start.hide_stderr = true;
+
+ if (migrate_postcopy_prepare(&from, &to, args)) {
return;
}
@@ -1207,9 +1205,28 @@ static void test_postcopy_recovery(void)
/* Restore the postcopy bandwidth to unlimited */
migrate_set_parameter_int(from, "max-postcopy-bandwidth", 0);
- migrate_postcopy_complete(from, to, &args);
+ migrate_postcopy_complete(from, to, args);
+}
+
+static void test_postcopy_recovery(void)
+{
+ MigrateCommon args = { };
+
+ test_postcopy_recovery_common(&args);
}
+#ifdef CONFIG_GNUTLS
+static void test_postcopy_recovery_tls_psk(void)
+{
+ MigrateCommon args = {
+ .start_hook = test_migrate_tls_psk_start_match,
+ .finish_hook = test_migrate_tls_psk_finish,
+ };
+
+ test_postcopy_recovery_common(&args);
+}
+#endif
+
static void test_baddest(void)
{
MigrateStart args = {
@@ -2410,7 +2427,9 @@ int main(int argc, char **argv)
module_call_init(MODULE_INIT_QOM);
qtest_add_func("/migration/postcopy/unix", test_postcopy);
- qtest_add_func("/migration/postcopy/recovery", test_postcopy_recovery);
+ qtest_add_func("/migration/postcopy/recovery/plain",
+ test_postcopy_recovery);
+
qtest_add_func("/migration/postcopy/plain", test_postcopy);
qtest_add_func("/migration/bad_dest", test_baddest);
@@ -2425,6 +2444,8 @@ int main(int argc, char **argv)
* general postcopy path that has TLS channel enabled.
*/
qtest_add_func("/migration/postcopy/tls/psk", test_postcopy_tls_psk);
+ qtest_add_func("/migration/postcopy/recovery/tls/psk",
+ test_postcopy_recovery_tls_psk);
#ifdef CONFIG_TASN1
qtest_add_func("/migration/precopy/unix/tls/x509/default-host",
test_precopy_unix_tls_x509_default_host);
--
2.36.1
- [PULL 06/30] softmmu/dirtylimit: Implement virtual CPU throttle, (continued)
- [PULL 06/30] softmmu/dirtylimit: Implement virtual CPU throttle, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 13/30] migration: Postcopy recover with preempt enabled, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 10/30] migration: Add postcopy-preempt capability, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 07/30] softmmu/dirtylimit: Implement dirty page rate limit, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 12/30] migration: Postcopy preemption enablement, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 14/30] migration: Create the postcopy preempt channel asynchronously, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 11/30] migration: Postcopy preemption preparation on channel creation, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 16/30] migration: Add helpers to detect TLS capability, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 15/30] migration: Add property x-postcopy-preempt-break-huge, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 19/30] migration: Respect postcopy request order in preemption mode, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 22/30] tests: Add postcopy tls recovery migration test,
Dr. David Alan Gilbert (git) <=
- [PULL 18/30] migration: Enable TLS for preempt channel, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 09/30] multifd: Copy pages before compressing them with zlib, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 20/30] tests: Move MigrateCommon upper, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 24/30] migration: remove unreachable code after reading data, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 17/30] migration: Export tls-[creds|hostname|authz] params to cmdline too, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 26/30] Add dirty-sync-missed-zero-copy migration stat, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 21/30] tests: Add postcopy tls migration test, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 23/30] tests: Add postcopy preempt tests, Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 30/30] Revert "gitlab: disable accelerated zlib for s390x", Dr. David Alan Gilbert (git), 2022/07/20
- [PULL 27/30] migration/multifd: Report to user when zerocopy not working, Dr. David Alan Gilbert (git), 2022/07/20