Add a subconfiguration which contains ToySimulators that behave badly by design
Back in the summer of 2016, a number of FHiCL parameters were added to the ToySimulator's ToyHardwareInterface which could instruct it to behave pathologically (e.g., throwing an exception after a given amount of time running). Given our group's commitment to testing, it seems like a good idea to take advantage of this feature. For this reason, I've added a subconfiguration in DAQInterface called "subconfig/component_special" which contains ToySimulators that behave badly in various ways. These include:
- component_throws_exception: throws an exception, putting the boardreader into the "Error" state
- component_dies_from_exit: boardreader dies because std::exit is called
- component_dies_from_abort: boardreader dies because std::abort is called
- component_hangs: getNext_() doesn't return because it encounters an infinite while loop
- component_fragment_size_blows_up: the fragment size returned by the ToySimulator suddenly increases to 100 MB
These components have also been added to the known_boardreaders_list_example file. Note that the bad thing which happens occurs 30 seconds after running begins. If, e.g., I perform a run like this:
just_do_it.sh ./boot.txt 0 --config "subconfigs/component_push subconfigs/component_special subconfigs/dataloggers subconfigs/dispatchers subconfigs/eventbuilders subconfigs/metrics_disabled subconfigs/routingmaster_disabled" --comps "component01 component02 component_throws_exception"
then of the three boardreaders in the run, after 30 seconds one of them will go into the Error state.
The advantage of having these components makes it easier to test how DAQInterface (and for that matter, artdaq) behaves not just when things go right, but when they go wrong.