[Spice-devel] [PATCH spice-server] tests: destroy test object
Jonathon Jongsma
jjongsma at redhat.com
Tue Sep 5 14:04:23 UTC 2017
On Mon, 2017-09-04 at 06:07 -0400, Frediano Ziglio wrote:
> >
> > ---
> > server/tests/test-display-no-ssl.c | 1 +
> > server/tests/test-display-resolution-changes.c | 1 +
> > server/tests/test-display-streaming.c | 2 +-
> > server/tests/test-display-width-stride.c | 1 +
> > server/tests/test-two-servers.c | 2 ++
> > 5 files changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/server/tests/test-display-no-ssl.c
> > b/server/tests/test-display-no-ssl.c
> > index f4a5bea40..751d5cd91 100644
> > --- a/server/tests/test-display-no-ssl.c
> > +++ b/server/tests/test-display-no-ssl.c
> > @@ -67,6 +67,7 @@ int main(void)
> > core->timer_start(ping_timer, ping_ms);
> >
> > basic_event_loop_mainloop();
> > + test_destroy(test);
> >
> > return 0;
> > }
> > diff --git a/server/tests/test-display-resolution-changes.c
> > b/server/tests/test-display-resolution-changes.c
> > index c0aa38ff4..84dbf32f7 100644
> > --- a/server/tests/test-display-resolution-changes.c
> > +++ b/server/tests/test-display-resolution-changes.c
> > @@ -81,6 +81,7 @@ int main(void)
> > core->timer_start(ping_timer, ping_ms);
> >
> > basic_event_loop_mainloop();
> > + test_destroy(test);
> >
> > return 0;
> > }
> > diff --git a/server/tests/test-display-streaming.c
> > b/server/tests/test-display-streaming.c
> > index 05a6d126a..a881f11ea 100644
> > --- a/server/tests/test-display-streaming.c
> > +++ b/server/tests/test-display-streaming.c
> > @@ -248,6 +248,6 @@ int main(int argc, char **argv)
> > get_commands(&commands, &num_commands);
> > test_set_command_list(test, commands, num_commands);
> > basic_event_loop_mainloop();
> > - free(commands);
> > + test_destroy(test);
> > return 0;
> > }
> > diff --git a/server/tests/test-display-width-stride.c
> > b/server/tests/test-display-width-stride.c
> > index 10a55b8c3..a61d74033 100644
> > --- a/server/tests/test-display-width-stride.c
> > +++ b/server/tests/test-display-width-stride.c
> > @@ -116,6 +116,7 @@ int main(void)
> > core->timer_start(ping_timer, ping_ms);
> >
> > basic_event_loop_mainloop();
> > + test_destroy(test);
> >
> > return 0;
> > }
> > diff --git a/server/tests/test-two-servers.c
> > b/server/tests/test-two-servers.c
> > index 4cf451a4d..2fa535284 100644
> > --- a/server/tests/test-two-servers.c
> > +++ b/server/tests/test-two-servers.c
> > @@ -50,5 +50,7 @@ int main(void)
> > test_set_simple_command_list(t2, simple_commands,
> > COUNT(simple_commands));
> >
> > basic_event_loop_mainloop();
> > + test_destroy(t1);
> > + test_destroy(t2);
> > return 0;
> > }
>
> Acked-by: Frediano Ziglio <fziglio at redhat.com>
>
> I think this is a preparatory patch, these tests never exit the loop.
>
> Frediano
Yes, it's not strictly required, I just thought it was good practice.
Jonathon
More information about the Spice-devel
mailing list