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 | 5646b9ef2068f1577569226326f62d90e2de5f09 (patch) | |
tree | 2e561ae7a8c60e83555ca99bdd1589813f8b8ee2 /test/fuzzer/SleepOneSecondTest.cpp | |
parent | c483d54d4a6d703121c3054a522f1eeb745287d2 (diff) |
[libFuzzer] handle SIGUSR1/SIGUSR2 and try to exit grafully on these signals
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/fuzzer/SleepOneSecondTest.cpp')
-rw-r--r-- | test/fuzzer/SleepOneSecondTest.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/fuzzer/SleepOneSecondTest.cpp b/test/fuzzer/SleepOneSecondTest.cpp new file mode 100644 index 000000000..27de2f4f7 --- /dev/null +++ b/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; +} + |