Skip to content

bpo-36670, regrtest: Fix TestWorkerProcess.stop() #16530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

bpo-36670, regrtest: Fix TestWorkerProcess.stop() #16530

wants to merge 2 commits into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Oct 2, 2019

  • Add a RLock to TestWorkerProcess to make stop() reliable when
    regrtest is interrupted by CTRL+c: protect _popen and _killed
    attributes.
  • Fix _kill(): don't set _killed to True if _popen is None.
  • Fix TestWorkerProcess.repr(): start_time is only valid
    if _popen is not None.

https://bugs.python.org/issue36670

* Add a RLock to TestWorkerProcess to make stop() reliable when
  regrtest is interrupted by CTRL+c: protect _popen and _killed
  attributes.
* Fix _kill(): don't set _killed to True if _popen is None.
* Fix TestWorkerProcess.__repr__(): start_time is only valid
  if _popen is not None.
@vstinner
Copy link
Member Author

vstinner commented Oct 2, 2019

I'm not sure if my lock is correct, so I wrote a simpler PR with no lock: PR #16537.

@vstinner vstinner closed this Oct 2, 2019
@vstinner vstinner deleted the regrtest_lock branch October 2, 2019 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants