Commit 118f505b authored by Stephen Morris's avatar Stephen Morris

[#640] Minor corrections

1. Update to documentation concerning the running of until tests
   which code is compiled with fuzzing enabled.
2. Correction of text of fuzzing-related initialization exception.
parent bfdc3fb8
......@@ -280,4 +280,26 @@ above was adopted for the single-threaded Kea 1.6. Should Kea be modified to
become multi-threaded, the fuzzing code will need to be changed back to reading
the AFL input in the background.
@section fuzzNotes Notes
@subsection fuzzNotesUnitTests Unit Test Failures
If unit tests are built when --enable-fuzzing is specified, note that tests
which check or use the DHCP servers (i.e. the unit tests in src/bin/dhcp4,
src/bin/dhcp6 and src/bin/kea-admin) will fail. With no AFL-related
environment variables defined, a C++ exception will be thrown with the
description "no fuzzing interface has been set". However, if the
KEA_AFL_INTERFACE and KEA_AFL_ADDRESS variables are set to valid values, the
tests will hang.
Both these results are expected and should cause no concern. The exception is
thrown by the fuzzing object constructor when it attempts to create the address
structures for routing packets between AFL and Kea but discovers it does not
have the necessary information. The hang is due to the fact that the AFL
processing loop does a synchronous read from stdin, something not expected by
the test. (Should random input be supplied on stdin, e.g. from the keyboard,
the test will most likely fail as the input is unlikely to be that expected by
the test.)
*/
......@@ -68,8 +68,8 @@ Fuzz::Fuzz(int ipversion, uint16_t port) :
try {
loop_max_ = boost::lexical_cast<long>(loop_max_ptr);
} catch (const boost::bad_lexical_cast&) {
reason << "cannot convert port number specification "
<< loop_max_ptr << " to an integer";
reason << "cannot convert loop count " << loop_max_ptr
<< " to an integer";
isc_throw(FuzzInitFail, reason.str());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment