aboutsummaryrefslogtreecommitdiff
path: root/tests/migration-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/migration-test.c')
-rw-r--r--tests/migration-test.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/migration-test.c b/tests/migration-test.c
index 5bdc0bd519..b7920255c5 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -96,6 +96,17 @@ static void init_bootfile(const char *bootpath, void *content)
fclose(bootfile);
}
+#include "tests/migration/s390x/a-b-bios.h"
+
+static void init_bootfile_s390x(const char *bootpath)
+{
+ FILE *bootfile = fopen(bootpath, "wb");
+ size_t len = sizeof(s390x_elf);
+
+ g_assert_cmpint(fwrite(s390x_elf, len, 1, bootfile), ==, 1);
+ fclose(bootfile);
+}
+
/*
* Wait for some output in the serial output file,
* we get an 'A' followed by an endless string of 'B's
@@ -443,6 +454,19 @@ static int test_migrate_start(QTestState **from, QTestState **to,
accel, tmpfs, bootpath, uri);
start_address = X86_TEST_MEM_START;
end_address = X86_TEST_MEM_END;
+ } else if (g_str_equal(arch, "s390x")) {
+ init_bootfile_s390x(bootpath);
+ cmd_src = g_strdup_printf("-machine accel=%s -m 128M"
+ " -name source,debug-threads=on"
+ " -serial file:%s/src_serial -bios %s",
+ accel, tmpfs, bootpath);
+ cmd_dst = g_strdup_printf("-machine accel=%s -m 128M"
+ " -name target,debug-threads=on"
+ " -serial file:%s/dest_serial -bios %s"
+ " -incoming %s",
+ accel, tmpfs, bootpath, uri);
+ start_address = S390_TEST_MEM_START;
+ end_address = S390_TEST_MEM_END;
} else if (strcmp(arch, "ppc64") == 0) {
cmd_src = g_strdup_printf("-machine accel=%s -m 256M -nodefaults"
" -name source,debug-threads=on"