Skip to contentSkip to conversation

build-sys: build ui-spice-app as a module

PATCH In review Marc-André Lureau 4 participants 9 messages Aug 27, 2019 – Sep 3, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 build-sys: build ui-spice-app as a module

This reverts commit 45db1ac157 ("modules-test: ui-spice-app is not built as module") and fixes commit d8aec9d9f1 ("display: add -display spice-app launching a Spice client").

---
 tests/modules-test.c | 3 +++
 ui/Makefile.objs     | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
tests/modules-test.c +3 -0
index f9de3afdb7..a8118e9042 100644
@@ -52,6 +52,9 @@ int main(int argc, char *argv[])
 #endif
 #ifdef CONFIG_SDL
         "ui-", "sdl",
+#endif
+#if defined(CONFIG_SPICE) && defined(CONFIG_GIO)
+        "ui-", "spice-app",
 #endif
     };
     int i;
ui/Makefile.objs +3 -1
index cc2bf5b180..ba39080edb 100644
@@ -49,7 +49,9 @@ curses.mo-objs := curses.o
 curses.mo-cflags := $(CURSES_CFLAGS) $(ICONV_CFLAGS)
 curses.mo-libs := $(CURSES_LIBS) $(ICONV_LIBS)
 
-common-obj-$(call land,$(CONFIG_SPICE),$(CONFIG_GIO)) += spice-app.mo
+ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),yy)
+common-obj-$(if $(CONFIG_MODULES),m,y) += spice-app.mo
+endif
 spice-app.mo-objs := spice-app.o
 spice-app.mo-cflags := $(GIO_CFLAGS)
 spice-app.mo-libs := $(GIO_LIBS)
Signature · 1 line
2.23.0
#1 lore raw

PATCH 2/2 tests: fix modules-test with no default machine

Fixes eb062cfa733 ("tests: add module loading test")
---
 tests/modules-test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/modules-test.c +3 -1
index a8118e9042..d1a6ace218 100644
@@ -1,12 +1,14 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 
+const char common_args[] = "-nodefaults -machine none";
+
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
     const char **args = (const char **)data;
 
-    qts = qtest_init(NULL);
+    qts = qtest_init(common_args);
     qtest_module_load(qts, args[0], args[1]);
     qtest_quit(qts);
 }
Signature · 1 line
2.23.0
Reviewed-by on v1 2/2
#2 lore raw

Re: [Qemu-devel] [PATCH 2/2] tests: fix modules-test with no default machine

Quoted 11 lines · Marc-André Lureau
Fixes eb062cfa733 ("tests: add module loading test")
---
 tests/modules-test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/modules-test.c +0 -0
index a8118e9042..d1a6ace218 100644

tests/modules-test.c line 4

Quoted 4 lines
tests/modules-test.c +1 -0
@@ -1,12 +1,14 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 
+const char common_args[] = "-nodefaults -machine none";

"-nodefaults" likely does not do much with the "none" machine ... OTOH, it also does not hurt here.

tests/modules-test.c line 14

Quoted 11 lines
tests/modules-test.c +1 -1
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
     const char **args = (const char **)data;
 
-    qts = qtest_init(NULL);
+    qts = qtest_init(common_args);
     qtest_module_load(qts, args[0], args[1]);
     qtest_quit(qts);
 }

Peter, will you apply this directly as a fix for the travis builds, or shall I take it through the qtest tree?

Thomas

#3 lore raw

Re: [Qemu-devel] [PATCH 2/2] tests: fix modules-test with no default machine

Quoted 33 lines · Thomas Huth
Quoted 11 lines · Marc-André Lureau
Fixes eb062cfa733 ("tests: add module loading test")
---
 tests/modules-test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/modules-test.c +0 -0
index a8118e9042..d1a6ace218 100644

tests/modules-test.c line 4

Quoted 4 lines
tests/modules-test.c +1 -0
@@ -1,12 +1,14 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 
+const char common_args[] = "-nodefaults -machine none";

"-nodefaults" likely does not do much with the "none" machine ... OTOH, it also does not hurt here.

tests/modules-test.c line 14

Quoted 11 lines
tests/modules-test.c +1 -1
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
     const char **args = (const char **)data;
 
-    qts = qtest_init(NULL);
+    qts = qtest_init(common_args);
     qtest_module_load(qts, args[0], args[1]);
     qtest_quit(qts);
 }
Quoted 4 lines

Peter, will you apply this directly as a fix for the travis builds, or shall I take it through the qtest tree?

I'm happy to take it directly (assuming patch 1/2 doesn't have anything too big in it -- it hasn't arrived here yet.)

thanks
-- PMM

#4 lore raw

Re: [Qemu-devel] [PATCH 2/2] tests: fix modules-test with no default machine

Quoted 34 lines · Peter Maydell
Quoted 33 lines · Thomas Huth
Quoted 11 lines · Marc-André Lureau
Fixes eb062cfa733 ("tests: add module loading test")
---
 tests/modules-test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/modules-test.c +0 -0
index a8118e9042..d1a6ace218 100644

tests/modules-test.c line 4

Quoted 4 lines
tests/modules-test.c +1 -0
@@ -1,12 +1,14 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 
+const char common_args[] = "-nodefaults -machine none";

"-nodefaults" likely does not do much with the "none" machine ... OTOH, it also does not hurt here.

Quoted 11 lines
tests/modules-test.c +1 -1
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
     const char **args = (const char **)data;
 
-    qts = qtest_init(NULL);
+    qts = qtest_init(common_args);
     qtest_module_load(qts, args[0], args[1]);
     qtest_quit(qts);
 }
Quoted 7 lines
Quoted 4 lines

Peter, will you apply this directly as a fix for the travis builds, or shall I take it through the qtest tree?

I'm happy to take it directly (assuming patch 1/2 doesn't have anything too big in it -- it hasn't arrived here yet.)

I've been testing this in my testing/next tree and as you're not back until tomorrow I can have these sitting in the PR I'm pulling together now if that's ok.

Quoted 3 lines

thanks
-- PMM

--
Alex Bennée

#5 lore raw

Re: [Qemu-devel] [PATCH 2/2] tests: fix modules-test with no default machine

Quoted 43 lines · Alex Bennée
Quoted 39 lines · Peter Maydell
Quoted 37 lines · Thomas Huth
Quoted 11 lines · Marc-André Lureau
Fixes eb062cfa733 ("tests: add module loading test")
---
 tests/modules-test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/modules-test.c +0 -0
index a8118e9042..d1a6ace218 100644

tests/modules-test.c line 4

Quoted 4 lines
tests/modules-test.c +1 -0
@@ -1,12 +1,14 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 
+const char common_args[] = "-nodefaults -machine none";

"-nodefaults" likely does not do much with the "none" machine ... OTOH, it also does not hurt here.

tests/modules-test.c line 14

Quoted 11 lines
tests/modules-test.c +1 -1
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
     const char **args = (const char **)data;
 
-    qts = qtest_init(NULL);
+    qts = qtest_init(common_args);
     qtest_module_load(qts, args[0], args[1]);
     qtest_quit(qts);
 }

Peter, will you apply this directly as a fix for the travis builds, or shall I take it through the qtest tree?

Quoted 6 lines
Quoted 2 lines

I'm happy to take it directly (assuming patch 1/2 doesn't have anything too big in it -- it hasn't arrived here yet.)

I've been testing this in my testing/next tree and as you're not back until tomorrow I can have these sitting in the PR I'm pulling together now if that's ok.

I just got back and found that I'd put the patches through the merge tests but hadn't done the final 'and push to master' part, so I've done that now. I assume git will cope with them being in your PR as well as in master...

thanks
-- PMM

Reviewed-by Tested-by on v1 2/2
#6 lore raw

Re: [Qemu-devel] [PATCH 2/2] tests: fix modules-test with no default machine

In reply to Marc-André Lureau
Quoted 2 lines · Marc-André Lureau
Fixes eb062cfa733 ("tests: add module loading test")
Quoted 14 lines
---
 tests/modules-test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/modules-test.c +2 -0
index a8118e9042..d1a6ace218 100644
@@ -1,12 +1,14 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 
+const char common_args[] = "-nodefaults -machine none";
+

tests/modules-test.c line 14

Quoted 10 lines
tests/modules-test.c +1 -1
 static void test_modules_load(const void *data)
 {
     QTestState *qts;
     const char **args = (const char **)data;
 
-    qts = qtest_init(NULL);
+    qts = qtest_init(common_args);
     qtest_module_load(qts, args[0], args[1]);
     qtest_quit(qts);
 }

--
Alex Bennée

Reviewed-by on v1 1/2
#7 lore raw
In reply to Marc-André Lureau
Quoted 30 lines · Marc-André Lureau

This reverts commit 45db1ac157 ("modules-test: ui-spice-app is not built as module") and fixes commit d8aec9d9f1 ("display: add -display spice-app launching a Spice client").

---
 tests/modules-test.c | 3 +++
 ui/Makefile.objs     | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
tests/modules-test.c +3 -0
index f9de3afdb7..a8118e9042 100644
@@ -52,6 +52,9 @@ int main(int argc, char *argv[])
 #endif
 #ifdef CONFIG_SDL
         "ui-", "sdl",
+#endif
+#if defined(CONFIG_SPICE) && defined(CONFIG_GIO)
+        "ui-", "spice-app",
 #endif
     };
     int i;
ui/Makefile.objs +0 -0
index cc2bf5b180..ba39080edb 100644

ui/Makefile.objs curses.mo-objs := curses.o · line 57

Quoted 10 lines
ui/Makefile.objs +3 -1
@@ -49,7 +49,9 @@ curses.mo-objs := curses.o
 curses.mo-cflags := $(CURSES_CFLAGS) $(ICONV_CFLAGS)
 curses.mo-libs := $(CURSES_LIBS) $(ICONV_LIBS)
 
-common-obj-$(call land,$(CONFIG_SPICE),$(CONFIG_GIO)) += spice-app.mo
+ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),yy)
+common-obj-$(if $(CONFIG_MODULES),m,y) += spice-app.mo
+endif
 spice-app.mo-objs := spice-app.o
 spice-app.mo-cflags := $(GIO_CFLAGS)
 spice-app.mo-libs := $(GIO_LIBS)

Looks reasonable to me.

Reviewed-by Tested-by on v1 1/2
#8 lore raw
In reply to Marc-André Lureau
Quoted 5 lines · Marc-André Lureau

This reverts commit 45db1ac157 ("modules-test: ui-spice-app is not built as module") and fixes commit d8aec9d9f1 ("display: add -display spice-app launching a Spice client").

Quoted 24 lines
---
 tests/modules-test.c | 3 +++
 ui/Makefile.objs     | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
tests/modules-test.c +3 -0
index f9de3afdb7..a8118e9042 100644
@@ -52,6 +52,9 @@ int main(int argc, char *argv[])
 #endif
 #ifdef CONFIG_SDL
         "ui-", "sdl",
+#endif
+#if defined(CONFIG_SPICE) && defined(CONFIG_GIO)
+        "ui-", "spice-app",
 #endif
     };
     int i;
ui/Makefile.objs +0 -0
index cc2bf5b180..ba39080edb 100644

ui/Makefile.objs curses.mo-objs := curses.o · line 57

Quoted 10 lines
ui/Makefile.objs +3 -1
@@ -49,7 +49,9 @@ curses.mo-objs := curses.o
 curses.mo-cflags := $(CURSES_CFLAGS) $(ICONV_CFLAGS)
 curses.mo-libs := $(CURSES_LIBS) $(ICONV_LIBS)
 
-common-obj-$(call land,$(CONFIG_SPICE),$(CONFIG_GIO)) += spice-app.mo
+ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),yy)
+common-obj-$(if $(CONFIG_MODULES),m,y) += spice-app.mo
+endif
 spice-app.mo-objs := spice-app.o
 spice-app.mo-cflags := $(GIO_CFLAGS)
 spice-app.mo-libs := $(GIO_LIBS)

--
Alex Bennée