tests: use checked fixture

The checked fixture run in the child test process.

Fix leaks found thanks to AddressSanitizer.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
macos/master
Marc-André Lureau 9 years ago committed by Dave Airlie
parent c54e1a76da
commit e1eef9a7f9
  1. 2
      tests/test_virgl_init.c
  2. 2
      tests/test_virgl_transfer.c

@ -470,7 +470,7 @@ Suite *virgl_init_suite(void)
suite_add_tcase(s, tc_core);
tc_core = tcase_create("init_std");
tcase_add_unchecked_fixture(tc_core, testvirgl_init_single_ctx_nr, testvirgl_fini_single_ctx);
tcase_add_checked_fixture(tc_core, testvirgl_init_single_ctx_nr, testvirgl_fini_single_ctx);
tcase_add_test(tc_core, virgl_init_egl_create_ctx_create_bind_res);
tcase_add_test(tc_core, virgl_init_egl_create_ctx_create_bind_res_illegal_ctx);
tcase_add_test(tc_core, virgl_init_egl_create_ctx_create_bind_res_illegal_res);

@ -734,7 +734,7 @@ Suite *virgl_init_suite(void)
s = suite_create("virgl_transfer");
tc_core = tcase_create("transfer_direct");
tcase_add_unchecked_fixture(tc_core, testvirgl_init_single_ctx_nr, testvirgl_fini_single_ctx);
tcase_add_checked_fixture(tc_core, testvirgl_init_single_ctx_nr, testvirgl_fini_single_ctx);
tcase_add_test(tc_core, virgl_test_transfer_read_illegal_ctx);
tcase_add_test(tc_core, virgl_test_transfer_write_illegal_ctx);
tcase_add_test(tc_core, virgl_test_transfer_read_unbound_res);

Loading…
Cancel
Save