OpenVPN
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Data Structures
Data Structures
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
x
z
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
u
w
Enumerations
_
a
c
d
e
f
g
h
k
m
n
o
p
r
t
u
v
w
Enumerator
_
a
c
d
e
f
g
i
k
m
n
o
p
r
s
t
u
v
w
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
vendor
cmocka
tests
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[] = {
24
cmocka_unit_test
(
test_segfault_recovery
),
25
cmocka_unit_test
(
test_segfault_recovery
),
26
cmocka_unit_test
(
test_segfault_recovery
),
27
};
28
29
return
cmocka_run_group_tests
(tests, NULL, NULL);
30
}
cmocka_unit_test
#define cmocka_unit_test(f)
Initializes a CMUnitTest structure.
Definition:
cmocka.h:1653
test_segv::y
int y
Definition:
test_exception_handler.c:10
test_segv::x
int x
Definition:
test_exception_handler.c:9
cmocka_run_group_tests
#define cmocka_run_group_tests(group_tests, group_setup, group_teardown)
Definition:
cmocka.h:1749
cmocka.h
CMUnitTest
Definition:
cmocka.h:2071
test_segv
Definition:
test_exception_handler.c:8
main
int main(void)
Definition:
test_exception_handler.c:22
test_segfault_recovery
static void test_segfault_recovery(void **state)
Definition:
test_exception_handler.c:13
Generated by
1.8.13