-
由 Lukáš Doktor 提交于
Currently avocado adds custom handlers of SIGINT and SIGUSR1 in order to produce traceback and notify about user interaction or timeout. This could be missleading in case the test uses those signals and potentially dangerous as some tests assume default behavior. This patch removes the custom handling of SIGINT and SIGUSR1 and reports the failure in `job.log`. Additionally it tries to inject the error message in the test output, if status.logfile available. In order to keep the useful traceback in case of interruption, this patch overrides the default SIGTERM handler. The default behavior of SIGTERM is to die, our custom handler raises SystemExit with info saying the test was interrupted by sigterm, which should generate traceback and finish. The runner then changes the result to INTERRUPTED, so even when the test modifies the SIGTERM handler, we get the correct status. Worth mentioning that in case test ignores SIGTERM, SIGKILL is emitted by the runner, so this should be safe approach. Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
d37c23fa