OpenVPN
test_exception_handler.c
Go to the documentation of this file.
1 #include <stdarg.h>
2 #include <stddef.h>
3 #include <setjmp.h>
4 #include <cmocka.h>
5 
6 #include <stdlib.h>
7 
8 struct test_segv {
9  int x;
10  int y;
11 };
12 
13 static void test_segfault_recovery(void **state)
14 {
15  struct test_segv *s = NULL;
16 
17  (void) state; /* unused */
18 
19  s->x = 1;
20 }
21 
22 int main(void) {
23  const struct CMUnitTest tests[] = {
27  };
28 
29  return cmocka_run_group_tests(tests, NULL, NULL);
30 }
#define cmocka_unit_test(f)
Initializes a CMUnitTest structure.
Definition: cmocka.h:1653
#define cmocka_run_group_tests(group_tests, group_setup, group_teardown)
Definition: cmocka.h:1749
int main(void)
static void test_segfault_recovery(void **state)