2018-09-05 01:08:47 +08:00
|
|
|
# AFL doesn't work on Windows. No reason to test the driver.
|
|
|
|
UNSUPPORTED: freebsd, windows
|
2018-05-25 07:55:52 +08:00
|
|
|
XFAIL: ios
|
2018-05-11 04:37:08 +08:00
|
|
|
RUN: %no_fuzzer_cpp_compiler %S/AFLDriverTest.cpp %libfuzzer_src/afl/afl_driver.cpp -o %t-AFLDriverTest
|
2017-08-22 07:25:50 +08:00
|
|
|
|
|
|
|
; Test that not specifying a stderr file isn't broken.
|
|
|
|
RUN: unset AFL_DRIVER_STDERR_DUPLICATE_FILENAME
|
2018-05-12 05:29:51 +08:00
|
|
|
RUN: %run %t-AFLDriverTest
|
2017-08-22 07:25:50 +08:00
|
|
|
|
|
|
|
; Test that specifying an invalid file causes a crash.
|
2018-05-12 05:29:51 +08:00
|
|
|
RUN: ASAN_OPTIONS= AFL_DRIVER_STDERR_DUPLICATE_FILENAME="%T" not --crash %run %t-AFLDriverTest
|
2017-08-22 07:25:50 +08:00
|
|
|
|
|
|
|
; Test that a file is created when specified as the duplicate stderr.
|
2018-05-12 05:29:51 +08:00
|
|
|
RUN: AFL_DRIVER_STDERR_DUPLICATE_FILENAME=%t %run %t-AFLDriverTest
|
2017-08-22 07:25:50 +08:00
|
|
|
RUN: stat %t
|