summaryrefslogtreecommitdiffstats
path: root/tests/qtest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qtest')
-rw-r--r--tests/qtest/bios-tables-test.c10
-rw-r--r--tests/qtest/meson.build2
-rw-r--r--tests/qtest/migration-test.c6
-rw-r--r--tests/qtest/qmp-cmd-test.c3
4 files changed, 19 insertions, 2 deletions
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 3830a40d10..f23a5335a8 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -127,6 +127,9 @@ static void free_test_data(test_data *data)
{
int i;
+ if (!data->tables) {
+ return;
+ }
for (i = 0; i < data->tables->len; ++i) {
cleanup_table_descriptor(&g_array_index(data->tables, AcpiSdtTable, i));
}
@@ -656,6 +659,13 @@ static void test_acpi_one(const char *params, test_data *data)
char *args;
bool use_uefi = data->uefi_fl1 && data->uefi_fl2;
+#ifndef CONFIG_TCG
+ if (data->tcg_only) {
+ g_test_skip("TCG disabled, skipping ACPI tcg_only test");
+ return;
+ }
+#endif /* CONFIG_TCG */
+
if (use_uefi) {
/*
* TODO: convert '-drive if=pflash' to new syntax (see e33763be7cd3)
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 7e0ecaa2c5..ba8ebeead6 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -252,7 +252,7 @@ foreach dir : target_dirs
}
endif
# FIXME: missing dependency on the emulator binary and qemu-img
- test('qtest-@0@: @1@'.format(target_base, test),
+ test('qtest-@0@/@1@'.format(target_base, test),
qtest_executables[test],
depends: [test_deps, qtest_emulator],
env: qtest_env,
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index f410ec5996..f2142fbd3c 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -464,6 +464,10 @@ static void migrate_postcopy_start(QTestState *from, QTestState *to)
}
typedef struct {
+ /*
+ * QTEST_LOG=1 may override this. When QTEST_LOG=1, we always dump errors
+ * unconditionally, because it means the user would like to be verbose.
+ */
bool hide_stderr;
bool use_shmem;
/* only launch the target process */
@@ -557,7 +561,7 @@ static int test_migrate_start(QTestState **from, QTestState **to,
g_free(bootpath);
- if (args->hide_stderr) {
+ if (!getenv("QTEST_LOG") && args->hide_stderr) {
ignore_stderr = "2>/dev/null";
} else {
ignore_stderr = "";
diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c
index 8a4c570e83..1c7186e53c 100644
--- a/tests/qtest/qmp-cmd-test.c
+++ b/tests/qtest/qmp-cmd-test.c
@@ -31,6 +31,9 @@ static int query_error_class(const char *cmd)
#ifndef CONFIG_SPICE
{ "query-spice", ERROR_CLASS_COMMAND_NOT_FOUND },
#endif
+#ifndef CONFIG_TCG
+ { "query-replay", ERROR_CLASS_COMMAND_NOT_FOUND },
+#endif
#ifndef CONFIG_VNC
{ "query-vnc", ERROR_CLASS_GENERIC_ERROR },
{ "query-vnc-servers", ERROR_CLASS_GENERIC_ERROR },