• Olivier Berthier's avatar
    framework: Add aborting option when a monitored error is detected · 21031482
    Olivier Berthier authored
    This adds a policy which advises when the user should reboot the system
    to avoid noisy test results due to system becoming unstable, for
    instance, and therefore continues testing successfully.
    To do this, a new module is proposed. A class Monitoring is used for
    managing the monitoring rules. Two types of rules, MonitoringFile and
    MonitoringLinuxDmesg, derived from the abstract class MonitoringBase,
    have been implemented. The first allow to track a pattern on standard
    files or locked files. The second, derived from dmesg.LinuxDmesg, will
    track a pattern on the dmesg.
    The monitoring rules must be defined in piglit.conf at the section
    monitored-errors. If one of the regex is found, Piglit will raise a
    PiglitAbort exception, stop the test execution -terminating test thread
    pool- and exit with code 3.
    Then test execution resume, after rebooting the system or not, is done
    like usually with command line parameter "resume".
    To call it, use command line parameter: --abort-on-monitored-error
    This option implies --no-concurrent
    This include also a set of unit tests for this module.
    Reviewed-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
monitoring.py 10.6 KB