GenericExperiment: record output during complete runtime

Before this change, the GenericExperiment only recorded port 0xe9 output
*after* the fault was injected.  When a fault was injected during the
workload's output loop, the output data before that point in time was
missing, and the experiment outcome was wrongly classified as SDC.

This change moves the logging activation to before the fast-forwarding
step (DatabaseExperiment::cb_before_fast_forward).  It also makes sure the
DatabaseExperiment only clears its own listeners instead of also touching
the SerialOutputLogger's one.

Change-Id: I66bda4ee318d271ddda6f7ade4e817bf9d14cf46
This commit is contained in:
Horst Schirmeier
2016-02-26 09:50:28 +01:00
parent 5bd7c4a9c5
commit 39b120f7ca
3 changed files with 20 additions and 7 deletions

View File

@ -243,6 +243,15 @@ bool GenericExperiment::cb_start_experiment() {
}
bool GenericExperiment::cb_before_fast_forward()
{
if (enabled_e9_sol) {
// output may already appear *before* FI
simulator.addFlow(&e9_sol);
}
return true;
}
bool GenericExperiment::cb_before_resume() {
if (enabled_trap)
simulator.addListener(&l_trap);
@ -263,10 +272,6 @@ bool GenericExperiment::cb_before_resume() {
simulator.addListener(*it);
}
if (enabled_e9_sol) {
simulator.addFlow(&e9_sol);
}
return true; // everything OK
}

View File

@ -98,6 +98,14 @@ public:
*/
virtual bool cb_start_experiment();
/**
* Callback that is called before the fast forward is done. This
* can be used to add additional event listeners during the fast
* forward phase. If returning false, the experiment is canceled.
* @return \c true on success, \c false otherwise
*/
virtual bool cb_before_fast_forward();
/**
* Callback that is called before the resuming till crash has
* started. This is called after the fault was injected. Here the