summaryrefslogtreecommitdiff
path: root/readme.md
blob: 188c10a6346eb1c75c78b99e4e5c6478e8723b9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# segfault-suite

A small test framework that catches segmentation faults.

## Dependencies

1. POSIX compliant OS (`fork`, `waitpid`)

## Usage

```C
#include "test-lib.h"

int badTest() {
  int* ptr = (int*)0;
  *ptr = 5;
  return 0;
}

int main() {
  syncTest("badTest", "it segfaulted", badTest);
  return 0;
}
```

## TODO

1. Run `asyncTest` test callbacks in separate thread (fork)