summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-02-12 17:52:20 +0100
committerMarkus Armbruster <armbru@redhat.com>2015-02-26 14:49:31 +0100
commitf43e47dbf6de24db20ec9b588bb6cc762093dd69 (patch)
treee6236f3afaabde624458eab11e8daaa7e0dd4878 /tests
parent6be4194b9215ed29f258543ce34a1b4b2003864d (diff)
downloadhqemu-f43e47dbf6de24db20ec9b588bb6cc762093dd69.zip
hqemu-f43e47dbf6de24db20ec9b588bb6cc762093dd69.tar.gz
QemuOpts: Drop qemu_opt_set(), rename qemu_opt_set_err(), fix use
qemu_opt_set() is a wrapper around qemu_opt_set() that reports the error with qerror_report_err(). Most of its users assume the function can't fail. Make them use qemu_opt_set_err() with &error_abort, so that should the assumption ever break, it'll break noisily. Just two users remain, in util/qemu-config.c. Switch them to qemu_opt_set_err() as well, then rename qemu_opt_set_err() to qemu_opt_set(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-qemu-opts.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-qemu-opts.c b/tests/test-qemu-opts.c
index 11cd1bd..da56492 100644
--- a/tests/test-qemu-opts.c
+++ b/tests/test-qemu-opts.c
@@ -148,13 +148,13 @@ static void test_qemu_opt_get(void)
opt = qemu_opt_get(opts, "str2");
g_assert(opt == NULL);
- qemu_opt_set(opts, "str2", "value");
+ qemu_opt_set(opts, "str2", "value", &error_abort);
/* now we have set str2, should know about it */
opt = qemu_opt_get(opts, "str2");
g_assert_cmpstr(opt, ==, "value");
- qemu_opt_set(opts, "str2", "value2");
+ qemu_opt_set(opts, "str2", "value2", &error_abort);
/* having reset the value, the returned should be the reset one */
opt = qemu_opt_get(opts, "str2");
@@ -331,7 +331,7 @@ static void test_qemu_opt_unset(void)
g_assert_cmpstr(value, ==, "value");
/* reset it to value2 */
- qemu_opt_set(opts, "key", "value2");
+ qemu_opt_set(opts, "key", "value2", &error_abort);
value = qemu_opt_get(opts, "key");
g_assert_cmpstr(value, ==, "value2");
OpenPOWER on IntegriCloud