diff options
| author | Kostya Serebryany <kcc@google.com> | 2017-11-09 20:30:19 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2017-11-09 20:30:19 +0000 |
| commit | a2ca2dcc461cccd539aed282b1f50d2925bc05d7 (patch) | |
| tree | 31847674b920c375488f247fa060a1ed37418dee /compiler-rt/test/fuzzer/SleepOneSecondTest.cpp | |
| parent | fe5ae8e4712ff62c611516f32324ccfa92a232b7 (diff) | |
| download | bcm5719-llvm-a2ca2dcc461cccd539aed282b1f50d2925bc05d7.tar.gz bcm5719-llvm-a2ca2dcc461cccd539aed282b1f50d2925bc05d7.zip | |
[libFuzzer] handle SIGUSR1/SIGUSR2 and try to exit grafully on these signals
llvm-svn: 317829
Diffstat (limited to 'compiler-rt/test/fuzzer/SleepOneSecondTest.cpp')
| -rw-r--r-- | compiler-rt/test/fuzzer/SleepOneSecondTest.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler-rt/test/fuzzer/SleepOneSecondTest.cpp b/compiler-rt/test/fuzzer/SleepOneSecondTest.cpp new file mode 100644 index 00000000000..27de2f4f700 --- /dev/null +++ b/compiler-rt/test/fuzzer/SleepOneSecondTest.cpp @@ -0,0 +1,13 @@ +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. + +// Simple test for a fuzzer: it simply sleeps for 1 second. +#include <cstddef> +#include <cstdint> +#include <thread> + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { + std::this_thread::sleep_for(std::chrono::seconds(1)); + return 0; +} + |

