tmt icon indicating copy to clipboard operation
tmt copied to clipboard

Interrupt current test when tmt is interrupted

Open happz opened this issue 10 months ago • 0 comments

If tmt is running a test - or any subprocess - when it's interrupted, it waits for the test to finish before it quits. The patch adds hook for the interrupt-handling code to be able to kill the test invocation process.

There are some gaps though, e.g. it does not work for localhost. With SSH-backed guests, things are easy: there's SSH process, it gets killed, it quits, test quits, everything stops (almost) immediately. It also works with container guests, there's one podman exec process running the test, it gets killed, job done. With localhost, tmt runs the test wrapper script, and it seems there needs to be more work done in terms of setting up traps for signals.

Pull Request Checklist

  • [x] implement the feature
  • [ ] write the documentation
  • [ ] extend the test coverage
  • [ ] include a release note

happz avatar May 05 '25 14:05 happz