[PATCH weston 4/6] tests: load ivi-shell test plugins as weston module
Ucan, Emre (ADITG/ESB)
eucan at de.adit-jv.com
Thu Jan 25 12:58:47 UTC 2018
Hi Pekka,
> -----Original Message-----
> From: Pekka Paalanen [mailto:ppaalanen at gmail.com]
> Sent: Montag, 22. Januar 2018 13:31
> To: Ucan, Emre (ADITG/ESB)
> Cc: wayland-devel at lists.freedesktop.org
> Subject: Re: [PATCH weston 4/6] tests: load ivi-shell test plugins as weston
> module
>
> On Wed, 3 Jan 2018 16:09:19 +0100
> Emre Ucan <eucan at de.adit-jv.com> wrote:
>
> > Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
> > ---
> > tests/ivi_layout-internal-test.c | 21 ++++++++-------------
> > tests/ivi_layout-test-plugin.c | 20 +++++++-------------
> > 2 files changed, 15 insertions(+), 26 deletions(-)
> >
> > diff --git a/tests/ivi_layout-internal-test.c b/tests/ivi_layout-internal-test.c
> > index 4d73eff..1054d97 100644
> > --- a/tests/ivi_layout-internal-test.c
> > +++ b/tests/ivi_layout-internal-test.c
> > @@ -33,6 +33,7 @@
> > #include <stdint.h>
> >
> > #include "compositor.h"
> > +#include "compositor/weston.h"
> > #include "ivi-shell/ivi-layout-export.h"
> > #include "ivi-shell/ivi-layout-private.h"
> > #include "ivi-test.h"
> > @@ -991,24 +992,18 @@ run_internal_tests(void *data)
> > free(ctx);
> > }
> >
> > -int
> > -controller_module_init(struct weston_compositor *compositor,
> > - int *argc, char *argv[],
> > - const struct ivi_layout_interface *iface,
> > - size_t iface_version);
> > -
> > WL_EXPORT int
> > -controller_module_init(struct weston_compositor *compositor,
> > - int *argc, char *argv[],
> > - const struct ivi_layout_interface *iface,
> > - size_t iface_version)
> > +wet_module_init(struct weston_compositor *compositor,
> > + int *argc, char *argv[])
> > {
> > struct wl_event_loop *loop;
> > struct test_context *ctx;
> > + const struct ivi_layout_interface *iface;
> > +
> > + iface = ivi_layout_get_api(compositor);
> >
> > - /* strict check, since this is an internal test module */
> > - if (iface_version != sizeof(*iface)) {
> > - weston_log("fatal: controller interface mismatch\n");
> > + if (!iface) {
> > + weston_log("fatal: cannot use ivi_layout_interface.\n");
> > return -1;
> > }
> >
> > diff --git a/tests/ivi_layout-test-plugin.c b/tests/ivi_layout-test-plugin.c
> > index 19eab81..1f19c55 100644
> > --- a/tests/ivi_layout-test-plugin.c
> > +++ b/tests/ivi_layout-test-plugin.c
> > @@ -217,25 +217,19 @@ idle_launch_client(void *data)
> > weston_watch_process(&launcher->process);
> > }
> >
> > -int
> > -controller_module_init(struct weston_compositor *compositor,
> > - int *argc, char *argv[],
> > - const struct ivi_layout_interface *iface,
> > - size_t iface_version);
> > -
> > WL_EXPORT int
> > -controller_module_init(struct weston_compositor *compositor,
> > - int *argc, char *argv[],
> > - const struct ivi_layout_interface *iface,
> > - size_t iface_version)
> > +wet_module_init(struct weston_compositor *compositor,
> > + int *argc, char *argv[])
> > {
> > struct wl_event_loop *loop;
> > struct test_launcher *launcher;
> > const char *path;
> > + const struct ivi_layout_interface *iface;
> > +
> > + iface = ivi_layout_get_api(compositor);
> >
> > - /* strict check, since this is an internal test module */
> > - if (iface_version != sizeof(*iface)) {
> > - weston_log("fatal: controller interface mismatch\n");
> > + if (!iface) {
> > + weston_log("fatal: cannot use ivi_layout_interface.\n");
> > return -1;
> > }
> >
>
> Hi,
>
> this patch causes the test suite to fail.
>
> Did you forget the changes to the test driver to use the new mechanism
> to load controller modules?
>
> Some justification in the commit message would be good too.
>
> Otherwise good.
I have to modify weston-tests-env file to load controller modules differently.
I will send a new patch. Thank you for review.
>
>
> Thanks,
> pq
Best Regards,
Emre Ucan
More information about the wayland-devel
mailing list