mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
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.
This commit is contained in:
parent
b66d755447
commit
3ede55b2ba
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user