-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run a callback when command process starts
When `Command.run()` spawns new process for the given command, by calling `subprocess.Popen`, an optional callable provided by `run()` caller would be called. Generally, of not much use, but an async watchdog check might need to interrupt the local process managing the test. It might be a SSH process, or `podman exec`, but it runs in a thread started by an `execute` plugin. Plugin calls `guest.execute(test_command, ...)`, and `guest.execute()` wait for the command to complete. But, if the watchdog, running in another thread, detects the guest is lost, unresponsive, there are two options: * mark the invocation with a "guest dead" label, and wait for the test process to terminate (by running out of time, or getting killed by network timeouts, etc.), or * mark the invocation with a "guest dead" label, and kill the local test process. To do this, watchdog in thread B must have access to PID of a process started in thread A. The callback would allow the plugin to store process in the test invocation instance.
- Loading branch information
Showing
6 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters