@@ -24,6 +24,7 @@ typedef struct MigrationTestEnv {
bool uffd_feature_thread_id;
bool has_dirty_ring;
bool is_x86;
+ bool full_set;
const char *arch;
const char *qemu_src;
const char *qemu_dst;
@@ -14,13 +14,39 @@
#include "migration/framework.h"
#include "qemu/module.h"
+static void parse_args(int *argc_p, char ***argv_p, bool *full_set)
+{
+ int argc = *argc_p;
+ char **argv = *argv_p;
+ int i, j;
+
+ j = 1;
+ for (i = 1; i < argc; i++) {
+ if (g_str_equal(argv[i], "--full")) {
+ *full_set = true;
+ continue;
+ }
+ argv[j++] = argv[i];
+ if (i >= j) {
+ argv[i] = NULL;
+ }
+ }
+ *argc_p = j;
+}
+
int main(int argc, char **argv)
{
MigrationTestEnv *env;
int ret;
+ bool full_set = false;
+
+ /* strip the --full option if it's present */
+ parse_args(&argc, &argv, &full_set);
g_test_init(&argc, &argv, NULL);
env = migration_get_env();
+ env->full_set = full_set;
+ env->full_set = true; /* temporary */
module_call_init(MODULE_INIT_QOM);
migration_test_add_tls(env);
@@ -155,6 +155,10 @@ void migration_test_add_compression(MigrationTestEnv *env)
{
tmpfs = env->tmpfs;
+ if (!env->full_set) {
+ return;
+ }
+
#ifdef CONFIG_ZSTD
migration_test_add("/migration/multifd/tcp/plain/zstd",
test_multifd_tcp_zstd);
@@ -104,6 +104,10 @@ void migration_test_add_cpr(MigrationTestEnv *env)
{
tmpfs = env->tmpfs;
+ if (!env->full_set) {
+ return;
+ }
+
/*
* Our CI system has problems with shared memory.
* Don't run this test until we find a workaround.
@@ -304,6 +304,10 @@ void migration_test_add_file(MigrationTestEnv *env)
{
tmpfs = env->tmpfs;
+ if (!env->full_set) {
+ return;
+ }
+
migration_test_add("/migration/precopy/file",
test_precopy_file);
@@ -262,6 +262,10 @@ void migration_test_add_misc(MigrationTestEnv *env)
{
tmpfs = env->tmpfs;
+ if (!env->full_set) {
+ return;
+ }
+
migration_test_add("/migration/bad_dest", test_baddest);
#ifndef _WIN32
migration_test_add("/migration/analyze-script", test_analyze_script);
@@ -81,6 +81,10 @@ static void test_postcopy_preempt_recovery(void)
void migration_test_add_postcopy(MigrationTestEnv *env)
{
+ if (!env->full_set) {
+ return;
+ }
+
if (env->has_uffd) {
migration_test_add("/migration/postcopy/plain", test_postcopy);
migration_test_add("/migration/postcopy/recovery/plain",
@@ -955,6 +955,10 @@ void migration_test_add_precopy(MigrationTestEnv *env)
{
tmpfs = env->tmpfs;
+ if (!env->full_set) {
+ return;
+ }
+
if (env->is_x86) {
migration_test_add("/migration/precopy/unix/suspend/live",
test_precopy_unix_suspend_live);
@@ -726,6 +726,10 @@ void migration_test_add_tls(MigrationTestEnv *env)
{
tmpfs = env->tmpfs;
+ if (!env->full_set) {
+ return;
+ }
+
migration_test_add("/migration/precopy/unix/tls/psk",
test_precopy_unix_tls_psk);
@@ -404,6 +404,8 @@ foreach dir : target_dirs
target_base = dir.split('-')[0]
qtest_emulator = emulators['qemu-system-' + target_base]
target_qtests = get_variable('qtests_' + target_base, []) + qtests_generic
+ has_kvm = ('CONFIG_KVM' in config_all_accel and host_os == 'linux'
+ and cpu == target_base and fs.exists('/dev/kvm'))
test_deps = roms
qtest_env = environment()
@@ -437,11 +439,18 @@ foreach dir : target_dirs
test: executable(test, src, dependencies: deps)
}
endif
+
+ test_args = ['--tap', '-k']
+
+ if test == 'migration-test' and has_kvm
+ test_args += ['--full']
+ endif
+
test('qtest-@0@/@1@'.format(target_base, test),
qtest_executables[test],
depends: [test_deps, qtest_emulator, emulator_modules],
env: qtest_env,
- args: ['--tap', '-k'],
+ args: test_args,
protocol: 'tap',
timeout: slow_qtests.get(test, 60),
priority: slow_qtests.get(test, 60),