aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-01-17 14:56:53 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-01-17 14:56:53 +0000
commitbc65450ebb9bed9e2eb4181b85dd573935120617 (patch)
tree1df00898aeffbadedb891d04e75f6f4879b1aab2 /tests
parent43ed232fbf65fc594e496b944129a480b2f75b5e (diff)
parentc82b95489f8c33318101d18e643f7b50259d8e4e (diff)
downloadqemu-bc65450ebb9bed9e2eb4181b85dd573935120617.zip
qemu-bc65450ebb9bed9e2eb4181b85dd573935120617.tar.gz
qemu-bc65450ebb9bed9e2eb4181b85dd573935120617.tar.bz2
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-01-17' into staging
* Various fixes for qtests * Enable TCG tests with TCI in the gitlab CI # gpg: Signature made Fri 17 Jan 2020 10:35:17 GMT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth-gitlab/tags/pull-request-2020-01-17: gitlab-ci.yml: Run tcg test with tci tests/qtest/vhost-user-test: Fix memory leaks migration-test: ppc64: fix FORTH test program tests: acpi: update path in rebuild-expected-aml Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/data/acpi/rebuild-expected-aml.sh6
-rw-r--r--tests/qtest/migration-test.c4
-rw-r--r--tests/qtest/vhost-user-test.c11
3 files changed, 13 insertions, 8 deletions
diff --git a/tests/data/acpi/rebuild-expected-aml.sh b/tests/data/acpi/rebuild-expected-aml.sh
index f89d462..d44e511 100755
--- a/tests/data/acpi/rebuild-expected-aml.sh
+++ b/tests/data/acpi/rebuild-expected-aml.sh
@@ -14,7 +14,7 @@
qemu_bins="x86_64-softmmu/qemu-system-x86_64 aarch64-softmmu/qemu-system-aarch64"
-if [ ! -e "tests/bios-tables-test" ]; then
+if [ ! -e "tests/qtest/bios-tables-test" ]; then
echo "Test: bios-tables-test is required! Run make check before this script."
echo "Run this script from the build directory."
exit 1;
@@ -26,11 +26,11 @@ for qemu in $qemu_bins; do
echo "Also, run this script from the build directory."
exit 1;
fi
- TEST_ACPI_REBUILD_AML=y QTEST_QEMU_BINARY=$qemu tests/bios-tables-test
+ TEST_ACPI_REBUILD_AML=y QTEST_QEMU_BINARY=$qemu tests/qtest/bios-tables-test
done
eval `grep SRC_PATH= config-host.mak`
-echo '/* List of comma-separated changed AML files to ignore */' > ${SRC_PATH}/tests/bios-tables-test-allowed-diff.h
+echo '/* List of comma-separated changed AML files to ignore */' > ${SRC_PATH}/tests/qtest/bios-tables-test-allowed-diff.h
echo "The files were rebuilt and can be added to git."
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 53afec4..341d190 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -480,14 +480,14 @@ static int test_migrate_start(QTestState **from, QTestState **to,
} else if (strcmp(arch, "ppc64") == 0) {
machine_opts = "vsmt=8";
memory_size = "256M";
+ start_address = PPC_TEST_MEM_START;
+ end_address = PPC_TEST_MEM_END;
arch_source = g_strdup_printf("-nodefaults "
"-prom-env 'use-nvramrc?=true' -prom-env "
"'nvramrc=hex .\" _\" begin %x %x "
"do i c@ 1 + i c! 1000 +loop .\" B\" 0 "
"until'", end_address, start_address);
arch_target = g_strdup("");
- start_address = PPC_TEST_MEM_START;
- end_address = PPC_TEST_MEM_END;
} else if (strcmp(arch, "aarch64") == 0) {
init_bootfile(bootpath, aarch64_kernel, sizeof(aarch64_kernel));
machine_opts = "virt,gic-version=max";
diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c
index 2324b96..9ee0f1e 100644
--- a/tests/qtest/vhost-user-test.c
+++ b/tests/qtest/vhost-user-test.c
@@ -707,9 +707,9 @@ static void test_read_guest_mem(void *obj, void *arg, QGuestAllocator *alloc)
static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
{
TestServer *s = arg;
- TestServer *dest = test_server_new("dest");
- GString *dest_cmdline = g_string_new(qos_get_current_command_line());
- char *uri = g_strdup_printf("%s%s", "unix:", dest->mig_path);
+ TestServer *dest;
+ GString *dest_cmdline;
+ char *uri;
QTestState *to;
GSource *source;
QDict *rsp;
@@ -720,6 +720,10 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
return;
}
+ dest = test_server_new("dest");
+ dest_cmdline = g_string_new(qos_get_current_command_line());
+ uri = g_strdup_printf("%s%s", "unix:", dest->mig_path);
+
size = get_log_size(s);
g_assert_cmpint(size, ==, (256 * 1024 * 1024) / (VHOST_LOG_PAGE * 8));
@@ -778,6 +782,7 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
qtest_quit(to);
test_server_free(dest);
g_free(uri);
+ g_string_free(dest_cmdline, true);
}
static void wait_for_rings_started(TestServer *s, size_t count)