google / mobly

E2E test framework for tests with complex environment requirements.
https://github.com/google/mobly
Apache License 2.0
647 stars 179 forks source link

`SnippetClient` does not explicitly handle `self._proc` in USB disconnect case. #509

Closed xpconanfan closed 2 years ago

xpconanfan commented 6 years ago

When the USB disconnects (without rebooting the device), self._proc essentially becomes useless. Right now the behavior is implicitly assumed. We should handle this better.

Discovered when doing #507

mhaoli commented 2 years ago

Currently, the client will set it to None when restoring the connection to the server. I think this is enough.

On the one hand, the client will no longer use self._proc. On the other hand, setting it to None will clean up the zombie processes in the system. So I think this is enough.