diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-02-20 11:37:43 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-02-20 12:20:39 +0100 |
| commit | 6911290dbb577fb295e556da6fd7e4f5f7c81a8a (patch) | |
| tree | 96c2f8d5581a7987c8b1f2b95392900a709c0e83 /fuzz/fuzzer.h | |
| parent | f2548fc882ec951d48193ca488c41061cf887971 (diff) | |
| download | vis-6911290dbb577fb295e556da6fd7e4f5f7c81a8a.tar.gz vis-6911290dbb577fb295e556da6fd7e4f5f7c81a8a.tar.xz | |
test/fuzz: add fuzzing infrastructure
For now we use the american fuzzy lop in the future we might
also add libFuzzer support.
Diffstat (limited to 'fuzz/fuzzer.h')
| -rw-r--r-- | fuzz/fuzzer.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fuzz/fuzzer.h b/fuzz/fuzzer.h new file mode 100644 index 0000000..3265532 --- /dev/null +++ b/fuzz/fuzzer.h @@ -0,0 +1,18 @@ +#ifndef FUZZER_H +#define FUZZER_H + +enum CmdStatus { + CMD_FAIL = false, + CMD_OK = true, + CMD_ERR, /* syntax error */ + CMD_QUIT, /* quit, accept no further commands */ +}; + +static const char *cmd_status_msg[] = { + [CMD_FAIL] = "Fail\n", + [CMD_OK] = "", + [CMD_ERR] = "Syntax error\n", + [CMD_QUIT] = "Bye\n", +}; + +#endif |
