diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-10-31 19:06:09 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-31 19:06:09 +0000 |
commit | b90da81d9f2d3d974db13bc69f961974741b0e2e (patch) | |
tree | 226b97684ddd9959a3e84a43a6f5f56ddff04e2a /tests | |
parent | e80b4b8fb6babce7dcc91ea9ddeecbc351fd4646 (diff) | |
parent | 83a00f6095a36de2024d6cca57470c4dedfb85ee (diff) | |
download | qemu-b90da81d9f2d3d974db13bc69f961974741b0e2e.zip |
Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging
x86 and machine queue, 2016-10-31
# gpg: Signature made Mon 31 Oct 2016 18:29:18 GMT
# gpg: using RSA key 0x2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6
* remotes/ehabkost/tags/x86-and-machine-pull-request:
target-i386: Print warning when mixing [+-]foo and foo=(on|off)
tests: Remove unneeded "-vnc none" option
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ide-test.c | 1 | ||||
-rw-r--r-- | tests/ipmi-bt-test.c | 2 | ||||
-rw-r--r-- | tests/ipmi-kcs-test.c | 2 | ||||
-rw-r--r-- | tests/test-x86-cpuid-compat.c | 28 |
4 files changed, 25 insertions, 8 deletions
diff --git a/tests/ide-test.c b/tests/ide-test.c index 67c7df0c8d..fb541f88b5 100644 --- a/tests/ide-test.c +++ b/tests/ide-test.c @@ -620,7 +620,6 @@ static void test_retry_flush(const char *machine) prepare_blkdebug_script(debug_path, "flush_to_disk"); ide_test_start( - "-vnc none " "-drive file=blkdebug:%s:%s,if=ide,cache=writeback,format=raw," "rerror=stop,werror=stop", debug_path, tmp_path); diff --git a/tests/ipmi-bt-test.c b/tests/ipmi-bt-test.c index be9005eb85..ad1e97e91e 100644 --- a/tests/ipmi-bt-test.c +++ b/tests/ipmi-bt-test.c @@ -415,7 +415,7 @@ int main(int argc, char **argv) /* Run the tests */ g_test_init(&argc, &argv, NULL); - cmdline = g_strdup_printf("-vnc none" + cmdline = g_strdup_printf( " -chardev socket,id=ipmi0,host=localhost,port=%d,reconnect=10" " -device ipmi-bmc-extern,chardev=ipmi0,id=bmc0" " -device isa-ipmi-bt,bmc=bmc0", emu_port); diff --git a/tests/ipmi-kcs-test.c b/tests/ipmi-kcs-test.c index 3750389651..9cf0b34a33 100644 --- a/tests/ipmi-kcs-test.c +++ b/tests/ipmi-kcs-test.c @@ -276,7 +276,7 @@ int main(int argc, char **argv) /* Run the tests */ g_test_init(&argc, &argv, NULL); - cmdline = g_strdup_printf("-vnc none -device ipmi-bmc-sim,id=bmc0" + cmdline = g_strdup_printf("-device ipmi-bmc-sim,id=bmc0" " -device isa-ipmi-kcs,bmc=bmc0"); qtest_start(cmdline); qtest_irq_intercept_in(global_qtest, "ioapic"); diff --git a/tests/test-x86-cpuid-compat.c b/tests/test-x86-cpuid-compat.c index 260dd2795c..79a2e69a28 100644 --- a/tests/test-x86-cpuid-compat.c +++ b/tests/test-x86-cpuid-compat.c @@ -35,6 +35,7 @@ static QObject *qom_get(const char *path, const char *prop) return ret; } +#ifdef CONFIG_HAS_GLIB_SUBPROCESS_TESTS static bool qom_get_bool(const char *path, const char *prop) { QBool *value = qobject_to_qbool(qom_get(path, prop)); @@ -43,6 +44,7 @@ static bool qom_get_bool(const char *path, const char *prop) QDECREF(value); return b; } +#endif typedef struct CpuidTestArgs { const char *cmdline; @@ -76,7 +78,8 @@ static void add_cpuid_test(const char *name, const char *cmdline, qtest_add_data_func(name, args, test_cpuid_prop); } -static void test_plus_minus(void) +#ifdef CONFIG_HAS_GLIB_SUBPROCESS_TESTS +static void test_plus_minus_subprocess(void) { char *path; @@ -86,9 +89,8 @@ static void test_plus_minus(void) * 3) Old feature names with underscores (e.g. "sse4_2") * should keep working * - * Note: rules 1 and 2 are planned to be removed soon, but we - * need to keep compatibility for a while until we start - * warning users about it. + * Note: rules 1 and 2 are planned to be removed soon, and + * should generate a warning. */ qtest_start("-cpu pentium,-fpu,+fpu,-mce,mce=on,+cx8,cx8=off,+sse4_1,sse4_2=on"); path = get_cpu0_qom_path(); @@ -108,11 +110,27 @@ static void test_plus_minus(void) g_free(path); } +static void test_plus_minus(void) +{ + g_test_trap_subprocess("/x86/cpuid/parsing-plus-minus/subprocess", 0, 0); + g_test_trap_assert_passed(); + g_test_trap_assert_stderr("*Ambiguous CPU model string. " + "Don't mix both \"-mce\" and \"mce=on\"*"); + g_test_trap_assert_stderr("*Ambiguous CPU model string. " + "Don't mix both \"+cx8\" and \"cx8=off\"*"); + g_test_trap_assert_stdout(""); +} +#endif + int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); - qtest_add_func("x86/cpuid/parsing-plus-minus", test_plus_minus); +#ifdef CONFIG_HAS_GLIB_SUBPROCESS_TESTS + g_test_add_func("/x86/cpuid/parsing-plus-minus/subprocess", + test_plus_minus_subprocess); + g_test_add_func("/x86/cpuid/parsing-plus-minus", test_plus_minus); +#endif /* Original level values for CPU models: */ add_cpuid_test("x86/cpuid/phenom/level", |