This is an archive of the discontinued LLVM Phabricator instance.

[LibFuzzer] test_single_input option to run a single test case.
ClosedPublic

Authored by aizatsky on Oct 1 2015, 11:38 AM.

Details

Reviewers
kcc
Summary

-test_single_input flag specifies a file name with test data.

Diff Detail

Event Timeline

aizatsky updated this revision to Diff 36278.Oct 1 2015, 11:38 AM
aizatsky retitled this revision from to -test_input.
aizatsky updated this object.
aizatsky retitled this revision from -test_input to [LibFuzzer] test_input option to run a single test case..Oct 1 2015, 11:56 AM
aizatsky updated this object.
aizatsky added a reviewer: kcc.
aizatsky added a subscriber: llvm-commits.
kcc edited edge metadata.Oct 1 2015, 12:39 PM

Also, please add a test to test/fuzzer.test, e.g. using LLVMFuzzer-SimpleTest

lib/Fuzzer/FuzzerDriver.cpp
284

this code does not use {} in such cases.

lib/Fuzzer/FuzzerFlags.def
69

I would call it "test_single_input".
Description:

Use specified file as a single test input end exit
aizatsky updated this revision to Diff 36286.Oct 1 2015, 1:01 PM
aizatsky edited edge metadata.
  • answering review
  • test file
aizatsky retitled this revision from [LibFuzzer] test_input option to run a single test case. to [LibFuzzer] test_single_input option to run a single test case..Oct 1 2015, 1:01 PM
aizatsky updated this object.
aizatsky marked 2 inline comments as done.

all done and added the test.

kcc added a comment.Oct 1 2015, 1:13 PM

Good. Now I think this flag deserves to be in $LLVM/docs/LibFuzzer.rst

aizatsky updated this revision to Diff 36292.Oct 1 2015, 1:32 PM
  • added flag documentation
kcc accepted this revision.Oct 1 2015, 2:57 PM
kcc edited edge metadata.

LGTM, please ask someone else to commit, I may not have time today.
(assuming you did ninja check-fuzzer)

This revision is now accepted and ready to land.Oct 1 2015, 2:57 PM
krasin closed this revision.Oct 1 2015, 4:25 PM