0Previously, the {Basic,}TestingSetup for fuzzers were set up in many ways:
1
21. Calling InitializeFuzzingContext, which implicitly constructs a static
3 const BasicTestingSetup
42. Directly constructing a static const BasicTestingSetup in the initialize_*
5 function
63. Directly constructing a static TestingSetup and reproducing the
7 initialization arguments (I'm assuming because
8 InitializeFuzzingContext only initializes a BasicTestingSetup)
9
10The new, relatively-simple MakeFuzzingContext function allows us to
11consolidate these methods of initialization by being flexible enough to
12be used in all situations. It:
13
141. Is templated so that we can choose to initialize any of
15 the *TestingSetup classes
162. Has sane defaults which are often used in fuzzers but are also
17 easily overridable
183. Returns a unique_ptr, explicitly transferring ownership to the caller
19 to deal with according to its situation
Question for fuzzing people: was it intentional that Answeredsrc/test/fuzz/net.cpp
would directly instantiate the BasicTestingSetup
and thus omit the "-nodebuglogfile"
flag?