monitor_testcase_15: Add sanity checks

Testcase 15 requires to be run with root on MD, so add the
appropriate sanity checks here.

Signed-off-by: Hannes Reinecke <hare@suse.de>
monitor_testcase_functions: Failing setdasd should not be fatal

The exit cleanup procedure should not choke on missing or failing setdasd.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_functions: Report failing command

Report failing command when the error trap triggers.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_functions: Allow scripts register local cleanup

Local cleanup functions can be registered for a call from reset_devices() which
is called uppon test completion.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_5: Add test-specific exit cleanup

This test, unlike any other test, manipulates channel paths.  Reset the channel
paths to working state upon exit so that other tests in the series can proceed.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_11: Add test-specific exit cleanup

This test adds extra arrays.  In case the test fails, the arrays are not
stopped blocking attempts to assemble an array in subsequent tests.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
monitor_testcase_3: Fix array recovery detection

md_monitor -c"ArrayStatus:/dev/$THE_MD" output lists disks in an order
unsuitable for recovery detection.  Use sorted output by the disk name in
comparisons.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>