Ignore:
Timestamp:
2019-11-10T17:07:44Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b093a62
Parents:
6427f083
Message:

Display server should deal with client not destroying windows properly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/test/client.c

    r6427f083 rda412547  
    203203}
    204204
     205/** Test client being destroyed while still having a window.
     206 *
     207 * This can happen if client forgets to destroy window or if the client
     208 * is disconnected (or terminated).
     209 */
     210PCUT_TEST(client_leftover_window)
     211{
     212        ds_display_t *disp;
     213        ds_client_t *client;
     214        ds_window_t *wnd;
     215        errno_t rc;
     216
     217        rc = ds_display_create(NULL, &disp);
     218        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     219
     220        rc = ds_client_create(disp, NULL, NULL, &client);
     221        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     222
     223        rc = ds_window_create(client, &wnd);
     224        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     225
     226        ds_client_destroy(client);
     227        ds_display_destroy(disp);
     228}
     229
    205230PCUT_EXPORT(client);
Note: See TracChangeset for help on using the changeset viewer.