monitor_testcase_functions: Mark exit trap

Increase script verbosity by putting a marker in exit trap.  That eases reading
debugging output by visually separating regular script output from trap
execution.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_functions: ignore exit status of kill in stop_monitor and stop_mdadm

We don't mind is the kill command does not succeed, the test should proceed.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_6: Enable -o errexit for increased safety

Immediately terminate the script upon any failure.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_7: Enable -o errexit for increased safety

Immediately terminate the script upon any failure.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_8: Enable -o errexit for increased safety

Immediately terminate the script upon any failure.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_9: Enable -o errexit for increased safety

Immediately terminate the script upon any failure.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_10: Enable -o errexit for increased safety

Immediately terminate the script upon any failure.  Prevent math expression
evaluation from failing the test.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_11: Enable -o errexit for increased safety

Immediately terminate the script upon any failure.  Prevent math expression
evaluation from failing the test.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_12: Enable -o errexit for increased safety

Immediately terminate the script upon any failure.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
md_monitor: do not fail devices in state 'SPARE'

Devices in state 'SPARE' do not (currently) participate in the
array, so there's not need to set them to faulty.
In fact, doing so will confuse mdadm.

Signed-off-by: Hannes Reinecke <hare@suse.de>
monitor_testcases: unify message if wait_for_sync fails

When wait_for_sync fails we should be using the same error
message in all testcases.

Signed-off-by: Hannes Reinecke <hare@suse.de>