From 1d6528af68ca4afa3177d18542155976df505872 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 21 Mar 2012 09:33:40 -0300 Subject: [PATCH 1/5] vl.c: fix '-cpu ?' segfault Fix stupid copy&paste mistake at commit ecf40beae7dcbb057d4f115207f9d8276832a774: I moved code around but kept "optarg" on the cpu_list() call. Reported-by: Jiri Denemark Signed-off-by: Eduardo Habkost Signed-off-by: Stefan Hajnoczi --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 112b0e0af9..0fccf50a5d 100644 --- a/vl.c +++ b/vl.c @@ -3196,7 +3196,7 @@ int main(int argc, char **argv, char **envp) cpudef_init(); if (cpu_model && *cpu_model == '?') { - list_cpus(stdout, &fprintf, optarg); + list_cpus(stdout, &fprintf, cpu_model); exit(0); } From 3ac805d9223ba9b9e38570ed5883c410746a34da Mon Sep 17 00:00:00 2001 From: Michael Roth Date: Wed, 21 Mar 2012 10:10:46 -0500 Subject: [PATCH 2/5] test: remove qemu-ga reference This was added by mistake a while back. Signed-off-by: Michael Roth Signed-off-by: Stefan Hajnoczi --- Makefile | 1 + tests/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8d6b558b83..d8e1f36229 100644 --- a/Makefile +++ b/Makefile @@ -173,6 +173,7 @@ qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(qapi-obj-y): $(GENERATED_HEADERS) qapi-dir := $(BUILD_DIR)/qapi-generated qemu-ga$(EXESUF): LIBS = $(LIBS_QGA) +qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir) gen-out-type = $(subst .,-,$(suffix $@)) diff --git a/tests/Makefile b/tests/Makefile index c78ade122e..354fdbb7f5 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -17,7 +17,7 @@ test-coroutine: test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) test-qmp-input-visitor.o test-qmp-output-visitor.o \ test-string-input-visitor.o test-string-output-visitor.o \ - test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir) + test-qmp-commands.o: QEMU_CFLAGS += -I $(qapi-dir) $(qapi-dir)/test-qapi-types.c $(qapi-dir)/test-qapi-types.h :\ $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py From 151c5693258f594541fa9ea585547a0a8dd68abc Mon Sep 17 00:00:00 2001 From: Michael Roth Date: Mon, 19 Mar 2012 19:18:25 -0500 Subject: [PATCH 3/5] qapi: remove print statements from test-qmp-commands This is necessary for nicer make check integration. Signed-off-by: Michael Roth Signed-off-by: Stefan Hajnoczi --- test-qmp-commands.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/test-qmp-commands.c b/test-qmp-commands.c index fa5a7bd8dc..60cbf019bb 100644 --- a/test-qmp-commands.c +++ b/test-qmp-commands.c @@ -46,7 +46,6 @@ static void test_dispatch_cmd(void) resp = qmp_dispatch(QOBJECT(req)); assert(resp != NULL); assert(!qdict_haskey(qobject_to_qdict(resp), "error")); - g_print("\nresp: %s\n", qstring_get_str(qobject_to_json(resp))); qobject_decref(resp); QDECREF(req); @@ -63,7 +62,6 @@ static void test_dispatch_cmd_error(void) resp = qmp_dispatch(QOBJECT(req)); assert(resp != NULL); assert(qdict_haskey(qobject_to_qdict(resp), "error")); - g_print("\nresp: %s\n", qstring_get_str(qobject_to_json_pretty(resp))); qobject_decref(resp); QDECREF(req); @@ -92,7 +90,6 @@ static void test_dispatch_cmd_io(void) resp = qmp_dispatch(QOBJECT(req)); assert(resp != NULL); assert(!qdict_haskey(qobject_to_qdict(resp), "error")); - g_print("\nresp: %s\n", qstring_get_str(qobject_to_json_pretty(resp))); qobject_decref(resp); QDECREF(req); From 2db5b068ac16dc1d5403503d829ed9b046aca20c Mon Sep 17 00:00:00 2001 From: Michael Roth Date: Mon, 19 Mar 2012 19:18:26 -0500 Subject: [PATCH 4/5] test: add test-qmp-commands to make check All the deps are here but the test was never added to the list of tests for make check Signed-off-by: Michael Roth Signed-off-by: Stefan Hajnoczi --- tests/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Makefile b/tests/Makefile index 354fdbb7f5..94ea3421ad 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -3,6 +3,7 @@ export SRC_PATH CHECKS = check-qdict check-qfloat check-qint check-qstring check-qlist CHECKS += check-qjson test-qmp-output-visitor test-qmp-input-visitor CHECKS += test-string-input-visitor test-string-output-visitor test-coroutine +CHECKS += test-qmp-commands CHECKS += $(SRC_PATH)/tests/qemu-iotests-quick.sh check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o test-coroutine.o: $(GENERATED_HEADERS) From 95b752bc32ccabe48430c0d0062b7c6947d864d0 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 24 Mar 2012 08:13:34 +0100 Subject: [PATCH 5/5] trace-events: Fix broken build caused by wrong format specifier mem is an uint64_t value, so %lx was wrong. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace-events b/trace-events index 70f059d9f6..db2cd39950 100644 --- a/trace-events +++ b/trace-events @@ -726,7 +726,7 @@ ppm_save(const char *filename, void *display_surface) "%s surface=%p" # hw/qxl.c disable qxl_interface_set_mm_time(int qid, uint32_t mm_time) "%d %d" disable qxl_io_write_vga(int qid, const char *mode, uint32_t addr, uint32_t val) "%d %s addr=%u val=%u" -qxl_create_guest_primary(int qid, uint32_t width, uint32_t height, uint64_t mem, uint32_t format, uint32_t position) "%d %dx%d mem=%lx %d,%d" +qxl_create_guest_primary(int qid, uint32_t width, uint32_t height, uint64_t mem, uint32_t format, uint32_t position) "%d %ux%u mem=%" PRIx64 " %u,%u" qxl_create_guest_primary_rest(int qid, int32_t stride, uint32_t type, uint32_t flags) "%d %d,%d,%d" qxl_destroy_primary(int qid) "%d" qxl_enter_vga_mode(int qid) "%d"