Skip to contentSkip to conversation

test: remove qemu-ga reference

PATCH Superseded Michael Roth 3 participants 8 messages Mar 20, 2012 – Mar 26, 2012 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 test: remove qemu-ga reference

This was added by mistake a while back.

---
 tests/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tests/Makefile +1 -1
index c78ade1..354fdbb 100644
@@ -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
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 2/3 qapi: remove print statements from test-qmp-commands

This is necessary for nicer make check integration.

---
 test-qmp-commands.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
test-qmp-commands.c +0 -3
index fa5a7bd..60cbf01 100644
@@ -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);
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 3/3 test: add test-qmp-commands to make check

In reply to Michael Roth

All the deps are here but the test was never added to the list of tests for make check

---
 tests/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
tests/Makefile +1 -0
index 354fdbb..94ea342 100644
@@ -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)
Signature · 1 line
1.7.4.1
#3 lore raw
In reply to Michael Roth
Quoted 6 lines · Michael Roth

This was added by mistake a while back.

---
 tests/Makefile |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)

After applying your series and rebuilding, I get the following error. I checked that there are no auto-generated files left around after make distclean.

$ make distclean
$ ./configure --target-list=x86_64-softmmu --disable-werror
$ make
  GEN   x86_64-softmmu/config-devices.mak
  GEN   config-all-devices.mak
  GEN   qemu-options.texi
  GEN   qemu-monitor.texi
  GEN   qemu-img-cmds.texi
  GEN   qemu-doc.html
  GEN   qemu-tech.html
  GEN   qemu.1
  GEN   qemu-img.1
  GEN   qemu-nbd.8
  GEN   QMP/qmp-commands.txt
  GEN   config-host.h
  GEN   trace.h
  GEN   qemu-options.def
  GEN   qmp-commands.h
  GEN   qapi-types.h
  GEN   qapi-visit.h
  GEN   /home/stefanha/qemu/qapi-generated/qga-qapi-types.h
  GEN   /home/stefanha/qemu/qapi-generated/qga-qapi-visit.h
  GEN   /home/stefanha/qemu/qapi-generated/qga-qmp-commands.h
  CC    qemu-ga.o
  CC    qga/commands.o
qga/commands.c:15:30: fatal error: qga-qmp-commands.h: No such file or directory
compilation terminated.
make: *** [qga/commands.o] Error 1
#4 lore raw
Quoted 4 lines · Stefan Hajnoczi
Quoted 2 lines · Michael Roth

This was added by mistake a while back.

Quoted 8 lines
Quoted 4 lines

---
 tests/Makefile |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)

After applying your series and rebuilding, I get the following error. I checked that there are no auto-generated files left around after make distclean.

Shoot, sorry, I must've only tested make check after the change. It looks like qemu-ga target is relying on that dependency being sourced from tests/Makefile. I'll send an updated 1/3 that moves it to top-level Makefile where it should be.

Quoted 30 lines
$ make distclean
$ ./configure --target-list=x86_64-softmmu --disable-werror
$ make
  GEN   x86_64-softmmu/config-devices.mak
  GEN   config-all-devices.mak
  GEN   qemu-options.texi
  GEN   qemu-monitor.texi
  GEN   qemu-img-cmds.texi
  GEN   qemu-doc.html
  GEN   qemu-tech.html
  GEN   qemu.1
  GEN   qemu-img.1
  GEN   qemu-nbd.8
  GEN   QMP/qmp-commands.txt
  GEN   config-host.h
  GEN   trace.h
  GEN   qemu-options.def
  GEN   qmp-commands.h
  GEN   qapi-types.h
  GEN   qapi-visit.h
  GEN   /home/stefanha/qemu/qapi-generated/qga-qapi-types.h
  GEN   /home/stefanha/qemu/qapi-generated/qga-qapi-visit.h
  GEN   /home/stefanha/qemu/qapi-generated/qga-qmp-commands.h
  CC    qemu-ga.o
  CC    qga/commands.o
qga/commands.c:15:30: fatal error: qga-qmp-commands.h: No such file or directory
compilation terminated.
make: *** [qga/commands.o] Error 1
#5 lore raw

PATCH v2 1/1 test: remove qemu-ga reference

In reply to Michael Roth

This was added by mistake a while back.

---
 Makefile       |    1 +
 tests/Makefile |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
Makefile +1 -0
index 1bc3cb0..cab7c74 100644
@@ -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 $@))
 
tests/Makefile +1 -1
index c78ade1..354fdbb 100644
@@ -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
Signature · 1 line
1.7.4.1
#7 lore raw
In reply to Michael Roth
Quoted 3 lines · Michael Roth

This was added by mistake a while back.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 30 lines
---
  Makefile       |    1 +
  tests/Makefile |    2 +-
  2 files changed, 2 insertions(+), 1 deletions(-)
Makefile +1 -0
index 1bc3cb0..cab7c74 100644
@@ -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 $@))
 
tests/Makefile +1 -1
index c78ade1..354fdbb 100644
@@ -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