diff options
Diffstat (limited to 'fuzz/harnesses/fuzz_assert')
-rwxr-xr-x | fuzz/harnesses/fuzz_assert | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/fuzz/harnesses/fuzz_assert b/fuzz/harnesses/fuzz_assert new file mode 100755 index 0000000..6a0baa9 --- /dev/null +++ b/fuzz/harnesses/fuzz_assert | |||
@@ -0,0 +1,29 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=fuzz_assert | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf- | ||
11 | } | ||
12 | |||
13 | run() { | ||
14 | build/fuzz/fuzz_assert -max_len=17408 -runs=1 ${T}/corpus \ | ||
15 | 2>/dev/null 1>&2 | ||
16 | } | ||
17 | |||
18 | case "$1" in | ||
19 | sync) | ||
20 | sync | ||
21 | ;; | ||
22 | run) | ||
23 | run | ||
24 | exit 0 | ||
25 | ;; | ||
26 | *) | ||
27 | echo unknown command "$1" | ||
28 | exit 1 | ||
29 | esac | ||