tests/qtest/migration: Pick smoke tests

Choose a few tests per group and move them from the full set to the
smoke set.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20250130184012.5711-3-farosas@suse.de>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250207153112.3939799-10-alex.bennee@linaro.org>
This commit is contained in:
Fabiano Rosas 2025-02-07 15:31:04 +00:00 committed by Alex Bennée
parent bc2a1f1a45
commit 43ab3fb375
8 changed files with 67 additions and 31 deletions

View file

@ -46,7 +46,6 @@ int main(int argc, char **argv)
g_test_init(&argc, &argv, NULL); g_test_init(&argc, &argv, NULL);
env = migration_get_env(); env = migration_get_env();
env->full_set = full_set; env->full_set = full_set;
env->full_set = true; /* temporary */
module_call_init(MODULE_INIT_QOM); module_call_init(MODULE_INIT_QOM);
migration_test_add_tls(env); migration_test_add_tls(env);

View file

@ -151,10 +151,18 @@ static void test_multifd_tcp_zlib(void)
test_precopy_common(&args); test_precopy_common(&args);
} }
static void migration_test_add_compression_smoke(MigrationTestEnv *env)
{
migration_test_add("/migration/multifd/tcp/plain/zlib",
test_multifd_tcp_zlib);
}
void migration_test_add_compression(MigrationTestEnv *env) void migration_test_add_compression(MigrationTestEnv *env)
{ {
tmpfs = env->tmpfs; tmpfs = env->tmpfs;
migration_test_add_compression_smoke(env);
if (!env->full_set) { if (!env->full_set) {
return; return;
} }
@ -183,7 +191,4 @@ void migration_test_add_compression(MigrationTestEnv *env)
migration_test_add("/migration/precopy/unix/xbzrle", migration_test_add("/migration/precopy/unix/xbzrle",
test_precopy_unix_xbzrle); test_precopy_unix_xbzrle);
} }
migration_test_add("/migration/multifd/tcp/plain/zlib",
test_multifd_tcp_zlib);
} }

View file

@ -104,6 +104,8 @@ void migration_test_add_cpr(MigrationTestEnv *env)
{ {
tmpfs = env->tmpfs; tmpfs = env->tmpfs;
/* no tests in the smoke set for now */
if (!env->full_set) { if (!env->full_set) {
return; return;
} }

View file

@ -300,17 +300,25 @@ static void test_multifd_file_mapped_ram_fdset_dio(void)
} }
#endif /* !_WIN32 */ #endif /* !_WIN32 */
static void migration_test_add_file_smoke(MigrationTestEnv *env)
{
migration_test_add("/migration/precopy/file",
test_precopy_file);
migration_test_add("/migration/multifd/file/mapped-ram/dio",
test_multifd_file_mapped_ram_dio);
}
void migration_test_add_file(MigrationTestEnv *env) void migration_test_add_file(MigrationTestEnv *env)
{ {
tmpfs = env->tmpfs; tmpfs = env->tmpfs;
migration_test_add_file_smoke(env);
if (!env->full_set) { if (!env->full_set) {
return; return;
} }
migration_test_add("/migration/precopy/file",
test_precopy_file);
migration_test_add("/migration/precopy/file/offset", migration_test_add("/migration/precopy/file/offset",
test_precopy_file_offset); test_precopy_file_offset);
#ifndef _WIN32 #ifndef _WIN32
@ -330,9 +338,6 @@ void migration_test_add_file(MigrationTestEnv *env)
migration_test_add("/migration/multifd/file/mapped-ram/live", migration_test_add("/migration/multifd/file/mapped-ram/live",
test_multifd_file_mapped_ram_live); test_multifd_file_mapped_ram_live);
migration_test_add("/migration/multifd/file/mapped-ram/dio",
test_multifd_file_mapped_ram_dio);
#ifndef _WIN32 #ifndef _WIN32
migration_test_add("/migration/multifd/file/mapped-ram/fdset", migration_test_add("/migration/multifd/file/mapped-ram/fdset",
test_multifd_file_mapped_ram_fdset); test_multifd_file_mapped_ram_fdset);

View file

@ -258,18 +258,24 @@ static void test_validate_uri_channels_none_set(void)
do_test_validate_uri_channel(&args); do_test_validate_uri_channel(&args);
} }
static void migration_test_add_misc_smoke(MigrationTestEnv *env)
{
#ifndef _WIN32
migration_test_add("/migration/analyze-script", test_analyze_script);
#endif
}
void migration_test_add_misc(MigrationTestEnv *env) void migration_test_add_misc(MigrationTestEnv *env)
{ {
tmpfs = env->tmpfs; tmpfs = env->tmpfs;
migration_test_add_misc_smoke(env);
if (!env->full_set) { if (!env->full_set) {
return; return;
} }
migration_test_add("/migration/bad_dest", test_baddest); migration_test_add("/migration/bad_dest", test_baddest);
#ifndef _WIN32
migration_test_add("/migration/analyze-script", test_analyze_script);
#endif
/* /*
* Our CI system has problems with shared memory. * Our CI system has problems with shared memory.

View file

@ -79,18 +79,26 @@ static void test_postcopy_preempt_recovery(void)
test_postcopy_recovery_common(&args); test_postcopy_recovery_common(&args);
} }
void migration_test_add_postcopy(MigrationTestEnv *env) static void migration_test_add_postcopy_smoke(MigrationTestEnv *env)
{ {
if (!env->full_set) {
return;
}
if (env->has_uffd) { if (env->has_uffd) {
migration_test_add("/migration/postcopy/plain", test_postcopy); migration_test_add("/migration/postcopy/plain", test_postcopy);
migration_test_add("/migration/postcopy/recovery/plain", migration_test_add("/migration/postcopy/recovery/plain",
test_postcopy_recovery); test_postcopy_recovery);
migration_test_add("/migration/postcopy/preempt/plain", migration_test_add("/migration/postcopy/preempt/plain",
test_postcopy_preempt); test_postcopy_preempt);
}
}
void migration_test_add_postcopy(MigrationTestEnv *env)
{
migration_test_add_postcopy_smoke(env);
if (!env->full_set) {
return;
}
if (env->has_uffd) {
migration_test_add("/migration/postcopy/preempt/recovery/plain", migration_test_add("/migration/postcopy/preempt/recovery/plain",
test_postcopy_preempt_recovery); test_postcopy_preempt_recovery);

View file

@ -951,14 +951,8 @@ static void test_dirty_limit(void)
migrate_end(from, to, true); migrate_end(from, to, true);
} }
void migration_test_add_precopy(MigrationTestEnv *env) static void migration_test_add_precopy_smoke(MigrationTestEnv *env)
{ {
tmpfs = env->tmpfs;
if (!env->full_set) {
return;
}
if (env->is_x86) { if (env->is_x86) {
migration_test_add("/migration/precopy/unix/suspend/live", migration_test_add("/migration/precopy/unix/suspend/live",
test_precopy_unix_suspend_live); test_precopy_unix_suspend_live);
@ -970,6 +964,21 @@ void migration_test_add_precopy(MigrationTestEnv *env)
test_precopy_unix_plain); test_precopy_unix_plain);
migration_test_add("/migration/precopy/tcp/plain", test_precopy_tcp_plain); migration_test_add("/migration/precopy/tcp/plain", test_precopy_tcp_plain);
migration_test_add("/migration/multifd/tcp/uri/plain/none",
test_multifd_tcp_uri_none);
migration_test_add("/migration/multifd/tcp/plain/cancel",
test_multifd_tcp_cancel);
}
void migration_test_add_precopy(MigrationTestEnv *env)
{
tmpfs = env->tmpfs;
migration_test_add_precopy_smoke(env);
if (!env->full_set) {
return;
}
migration_test_add("/migration/precopy/tcp/plain/switchover-ack", migration_test_add("/migration/precopy/tcp/plain/switchover-ack",
test_precopy_tcp_switchover_ack); test_precopy_tcp_switchover_ack);
@ -993,16 +1002,12 @@ void migration_test_add_precopy(MigrationTestEnv *env)
test_dirty_limit); test_dirty_limit);
} }
} }
migration_test_add("/migration/multifd/tcp/uri/plain/none",
test_multifd_tcp_uri_none);
migration_test_add("/migration/multifd/tcp/channels/plain/none", migration_test_add("/migration/multifd/tcp/channels/plain/none",
test_multifd_tcp_channels_none); test_multifd_tcp_channels_none);
migration_test_add("/migration/multifd/tcp/plain/zero-page/legacy", migration_test_add("/migration/multifd/tcp/plain/zero-page/legacy",
test_multifd_tcp_zero_page_legacy); test_multifd_tcp_zero_page_legacy);
migration_test_add("/migration/multifd/tcp/plain/zero-page/none", migration_test_add("/migration/multifd/tcp/plain/zero-page/none",
test_multifd_tcp_no_zero_page); test_multifd_tcp_no_zero_page);
migration_test_add("/migration/multifd/tcp/plain/cancel",
test_multifd_tcp_cancel);
if (g_str_equal(env->arch, "x86_64") if (g_str_equal(env->arch, "x86_64")
&& env->has_kvm && env->has_dirty_ring) { && env->has_kvm && env->has_dirty_ring) {

View file

@ -722,10 +722,18 @@ static void test_multifd_tcp_tls_x509_reject_anon_client(void)
} }
#endif /* CONFIG_TASN1 */ #endif /* CONFIG_TASN1 */
static void migration_test_add_tls_smoke(MigrationTestEnv *env)
{
migration_test_add("/migration/precopy/tcp/tls/psk/match",
test_precopy_tcp_tls_psk_match);
}
void migration_test_add_tls(MigrationTestEnv *env) void migration_test_add_tls(MigrationTestEnv *env)
{ {
tmpfs = env->tmpfs; tmpfs = env->tmpfs;
migration_test_add_tls_smoke(env);
if (!env->full_set) { if (!env->full_set) {
return; return;
} }
@ -755,8 +763,6 @@ void migration_test_add_tls(MigrationTestEnv *env)
test_precopy_unix_tls_x509_override_host); test_precopy_unix_tls_x509_override_host);
#endif /* CONFIG_TASN1 */ #endif /* CONFIG_TASN1 */
migration_test_add("/migration/precopy/tcp/tls/psk/match",
test_precopy_tcp_tls_psk_match);
migration_test_add("/migration/precopy/tcp/tls/psk/mismatch", migration_test_add("/migration/precopy/tcp/tls/psk/mismatch",
test_precopy_tcp_tls_psk_mismatch); test_precopy_tcp_tls_psk_mismatch);
#ifdef CONFIG_TASN1 #ifdef CONFIG_TASN1