• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1REQUIRES: linux
2
3RUN: %no_fuzzer_cpp_compiler %S/AFLDriverTest.cpp %libfuzzer_src/afl/afl_driver.cpp -o %t-AFLDriverTest
4
5RUN: echo -n "abc" > %t.file3
6RUN: %run %t-AFLDriverTest < %t.file3 2>&1 | FileCheck %s --check-prefix=CHECK1
7CHECK1: __afl_persistent_loop called, Count = 1000
8CHECK1: LLVMFuzzerTestOneInput called; Size = 3
9
10RUN: %run %t-AFLDriverTest < %t.file3 -42 2>&1 | FileCheck %s --check-prefix=CHECK2
11CHECK2: __afl_persistent_loop called, Count = 42
12CHECK2: LLVMFuzzerTestOneInput called; Size = 3
13
14RUN: %run %t-AFLDriverTest < %t.file3 666 2>&1 | FileCheck %s --check-prefix=CHECK3
15CHECK3: WARNING: using the deprecated call style
16CHECK3: __afl_persistent_loop called, Count = 666
17CHECK3: LLVMFuzzerTestOneInput called; Size = 3
18
19RUN: %run %t-AFLDriverTest %t.file3 2>&1 | FileCheck %s --check-prefix=CHECK4
20CHECK4: LLVMFuzzerTestOneInput called; Size = 3
21
22RUN: echo -n "ab" > %t.file2
23RUN: %run %t-AFLDriverTest %t.file2 %t.file3 2>&1 | FileCheck %s --check-prefix=CHECK5
24CHECK5: LLVMFuzzerTestOneInput called; Size = 2
25CHECK5: LLVMFuzzerTestOneInput called; Size = 3