aboutsummaryrefslogtreecommitdiff
path: root/tests/fuzz/fuzzer.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-12-25 21:16:21 +0200
committerRiccardo Spagni <ric@spagni.net>2017-12-25 21:16:21 +0200
commit9d1c4408ad23a73b96d8cd16d64c8dd1b2ca2ff8 (patch)
treefcc1b2c02a2b932fa910882f6683b2faec0b5e36 /tests/fuzz/fuzzer.cpp
parentd06f3ea9ad9f8e0d40de4986e9cd6b9ff761e0a2 (diff)
parentbd1f6029a367e411b66d4ff49f2537947e9d300f (diff)
downloadmonzero-core-9d1c4408ad23a73b96d8cd16d64c8dd1b2ca2ff8.tar.gz
monzero-core-9d1c4408ad23a73b96d8cd16d64c8dd1b2ca2ff8.tar.xz
monzero-core-9d1c4408ad23a73b96d8cd16d64c8dd1b2ca2ff8.zip
Merge pull request #2905
bd1f6029 http_client: rewrite header parsing manually for speed (moneromooo-monero) ec724eb6 tests: add levin fuzz test (moneromooo-monero) f1bdc9a4 tests: add http client fuzz test (moneromooo-monero) 0272df9e add parse_url fuzz test (moneromooo-monero) 261b0dd0 tests: add base58 fuzz test (moneromooo-monero) fd052087 fuzz_testing: allow automatically resuming an interrupted job (moneromooo-monero) c80bb0eb tests: don't init stuff we don't need in fuzz tests - faster (moneromooo-monero) 53b83a83 tests: better load-from-binary fuzz test data file (moneromooo-monero) 1a379ef6 fuzz_testing: build with ASAN (assumed to be available) (moneromooo-monero) 4cd4a431 fuzz_testing: create out directory if needed, and fix filename passing (moneromooo-monero) c27d9092 Makefile: build fuzz tests statically, starts faster (moneromooo-monero) 95aa0bf7 add load_from_binary/load_from_json fuzzers (moneromooo-monero)
Diffstat (limited to 'tests/fuzz/fuzzer.cpp')
-rw-r--r--tests/fuzz/fuzzer.cpp33
1 files changed, 1 insertions, 32 deletions
diff --git a/tests/fuzz/fuzzer.cpp b/tests/fuzz/fuzzer.cpp
index ede3fcc40..686a5e5f0 100644
--- a/tests/fuzz/fuzzer.cpp
+++ b/tests/fuzz/fuzzer.cpp
@@ -44,41 +44,11 @@ static int __AFL_LOOP(int)
}
#endif
-using namespace epee;
-using namespace boost::program_options;
-
int run_fuzzer(int argc, const char **argv, Fuzzer &fuzzer)
{
- TRY_ENTRY();
- tools::on_startup();
- string_tools::set_module_name_and_folder(argv[0]);
-
- //set up logging options
- mlog_configure(mlog_get_default_log_path("fuzztests.log"), true);
- mlog_set_log("*:FATAL,logging:none");
-
- options_description desc_options("Allowed options");
- command_line::add_arg(desc_options, command_line::arg_help);
-
- variables_map vm;
- bool r = command_line::handle_error_helper(desc_options, [&]()
- {
- store(parse_command_line(argc, argv, desc_options), vm);
- notify(vm);
- return true;
- });
- if (!r)
- return 1;
-
- if (command_line::get_arg(vm, command_line::arg_help))
- {
- std::cout << desc_options << std::endl;
- return 0;
- }
-
if (argc < 2)
{
- std::cout << desc_options << std::endl;
+ std::cout << "usage: " << argv[0] << " " << "<filename>" << std::endl;
return 1;
}
@@ -94,6 +64,5 @@ int run_fuzzer(int argc, const char **argv, Fuzzer &fuzzer)
return ret;
}
- CATCH_ENTRY_L0("fuzzer_main", 1);
return 0;
}