summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2013-07-09 14:31:23 +0300
committerUri Lublin <uril@redhat.com>2013-07-16 23:37:28 +0300
commit3ede55b2ba602fd08870a007caea56ecb31022b3 (patch)
tree917f15e8dc00a3337491986f43dcb300d86ae484
parentb66d755447c0b91e4d09bbe2d942696106514046 (diff)
downloadspice-3ede55b2ba602fd08870a007caea56ecb31022b3.tar.gz
spice-3ede55b2ba602fd08870a007caea56ecb31022b3.tar.xz
spice-3ede55b2ba602fd08870a007caea56ecb31022b3.zip
server/tests: test_display_width_stride: add destroy command
Otherwise, the test exits after the first iteration over all tests, on the second attempt to create an already created surface.
-rw-r--r--server/tests/test_display_width_stride.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/tests/test_display_width_stride.c b/server/tests/test_display_width_stride.c
index 20de57a5..f9383738 100644
--- a/server/tests/test_display_width_stride.c
+++ b/server/tests/test_display_width_stride.c
@@ -54,6 +54,14 @@ void set_surface_params(Test *test, Command *command)
create->data = g_surface_data;
}
+void set_destroy_parameters(Test *test, Command *command)
+{
+ if (g_surface_data) {
+ free(g_surface_data);
+ g_surface_data = NULL;
+ }
+}
+
static Command commands[] = {
{SIMPLE_CREATE_SURFACE, set_surface_params},
{SIMPLE_DRAW_SOLID, set_draw_parameters},
@@ -65,6 +73,7 @@ static Command commands[] = {
{SIMPLE_DRAW_SOLID, set_draw_parameters},
{SIMPLE_DRAW_SOLID, set_draw_parameters},
{SIMPLE_DRAW_SOLID, set_draw_parameters},
+ {SIMPLE_DESTROY_SURFACE, set_destroy_parameters},
};
void on_client_connected(Test *test)