build-sys: build ui-spice-app as a module
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
@@ -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
@@ -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
PATCH 2/2 tests: fix modules-test with no default machine
--- tests/modules-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/modules-test.c +3 -1
@@ -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
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")Signed-off-by Marc-André Lureau <[email protected]>--- tests/modules-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tests/modules-test.c +0
-0
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
-1static 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
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")Signed-off-by Marc-André Lureau <[email protected]>--- tests/modules-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tests/modules-test.c +0
-0tests/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
-1static 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
Reviewed-by Thomas Huth <[email protected]>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
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")Signed-off-by Marc-André Lureau <[email protected]>--- tests/modules-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tests/modules-test.c +0
-0tests/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
-1static 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
Reviewed-by Thomas Huth <[email protected]>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
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")Signed-off-by Marc-André Lureau <[email protected]>--- tests/modules-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tests/modules-test.c +0
-0tests/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
-1static 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); }Reviewed-by Thomas Huth <[email protected]>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
Re: [Qemu-devel] [PATCH 2/2] tests: fix modules-test with no default machine
In reply to Marc-André LureauQuoted 2 lines · Marc-André Lureau
Fixes eb062cfa733 ("tests: add module loading test")Signed-off-by Marc-André Lureau <[email protected]>
Quoted 14 lines
--- tests/modules-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tests/modules-test.c +2
-0@@ -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
-1static 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
Quoted 30 lines · Marc-André Lureau
This reverts commit
45db1ac157("modules-test: ui-spice-app is not built as module") and fixes commitd8aec9d9f1("display: add -display spice-app launching a Spice client").Signed-off-by Marc-André Lureau <[email protected]>--- tests/modules-test.c | 3 +++ ui/Makefile.objs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-)tests/modules-test.c +3
-0@@ -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
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.
Quoted 5 lines · Marc-André Lureau
This reverts commit
45db1ac157("modules-test: ui-spice-app is not built as module") and fixes commitd8aec9d9f1("display: add -display spice-app launching a Spice client").Signed-off-by Marc-André Lureau <[email protected]>
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@@ -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
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