aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-01-25 11:52:12 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-01-25 11:52:12 +0000
commit9dd0d8111fbb8015db75a38933aee1d45f9e64a3 (patch)
treea2062212ac4345164221f25d06945e26fd10de16 /tests
parent87f6a866f12b8ca037b0a5cfc2dc9b8db9e67696 (diff)
parentbbc0586ced6e9ffdfd29d89fcc917b3d90ac3938 (diff)
downloadqemu-9dd0d8111fbb8015db75a38933aee1d45f9e64a3.zip
qemu-9dd0d8111fbb8015db75a38933aee1d45f9e64a3.tar.gz
qemu-9dd0d8111fbb8015db75a38933aee1d45f9e64a3.tar.bz2
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-01-24' into staging
QAPI patches for 2019-01-24 # gpg: Signature made Thu 24 Jan 2019 14:25:19 GMT # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2019-01-24: json: Fix % handling when not interpolating qmp: Add examples to qom list, get, and set commands qapi: Eliminate indirection through qmp_event_get_func_emit() qapi: Belatedly update docs for commit 9c2f56e9f9d Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.include4
-rw-r--r--tests/check-qjson.c5
-rw-r--r--tests/test-qmp-event.c6
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/Makefile.include b/tests/Makefile.include
index f5e6eb5..19b4c0a 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -529,7 +529,7 @@ QEMU_CFLAGS += -I$(SRC_PATH)/tests
test-util-obj-y = libqemuutil.a
test-qom-obj-y = $(qom-obj-y) $(test-util-obj-y)
test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o \
- tests/test-qapi-events.o tests/test-qapi-introspect.o \
+ tests/test-qapi-introspect.o \
$(test-qom-obj-y)
benchmark-crypto-obj-y = $(crypto-obj-y) $(test-qom-obj-y)
test-crypto-obj-y = $(crypto-obj-y) $(test-qom-obj-y)
@@ -621,7 +621,7 @@ tests/qapi-schema/doc-good.test.texi: $(SRC_PATH)/tests/qapi-schema/doc-good.jso
tests/test-string-output-visitor$(EXESUF): tests/test-string-output-visitor.o $(test-qapi-obj-y)
tests/test-string-input-visitor$(EXESUF): tests/test-string-input-visitor.o $(test-qapi-obj-y)
-tests/test-qmp-event$(EXESUF): tests/test-qmp-event.o $(test-qapi-obj-y)
+tests/test-qmp-event$(EXESUF): tests/test-qmp-event.o $(test-qapi-obj-y) tests/test-qapi-events.o
tests/test-qobject-output-visitor$(EXESUF): tests/test-qobject-output-visitor.o $(test-qapi-obj-y)
tests/test-clone-visitor$(EXESUF): tests/test-clone-visitor.o $(test-qapi-obj-y)
tests/test-qobject-input-visitor$(EXESUF): tests/test-qobject-input-visitor.o $(test-qapi-obj-y)
diff --git a/tests/check-qjson.c b/tests/check-qjson.c
index d876a7a..fa2afcc 100644
--- a/tests/check-qjson.c
+++ b/tests/check-qjson.c
@@ -176,6 +176,11 @@ static void utf8_string(void)
"\xCE\xBA\xE1\xBD\xB9\xCF\x83\xCE\xBC\xCE\xB5",
"\\u03BA\\u1F79\\u03C3\\u03BC\\u03B5",
},
+ /* '%' character when not interpolating */
+ {
+ "100%",
+ "100%",
+ },
/* 2 Boundary condition test cases */
/* 2.1 First possible sequence of a certain length */
/*
diff --git a/tests/test-qmp-event.c b/tests/test-qmp-event.c
index 9cddd72..bf900f1 100644
--- a/tests/test-qmp-event.c
+++ b/tests/test-qmp-event.c
@@ -93,9 +93,7 @@ static bool qdict_cmp_simple(QDict *a, QDict *b)
return d.result;
}
-/* This function is hooked as final emit function, which can verify the
- correctness. */
-static void event_test_emit(test_QAPIEvent event, QDict *d)
+void test_qapi_event_emit(test_QAPIEvent event, QDict *d)
{
QDict *t;
int64_t s, ms;
@@ -241,8 +239,6 @@ static void test_event_d(TestEventData *data,
int main(int argc, char **argv)
{
- qmp_event_set_func_emit(event_test_emit);
-
g_test_init(&argc, &argv, NULL);
event_test_add("/event/event_a", test_event_a);