Skip to content
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

bpo-30320: test_eintr now uses pthread_sigmask() #1523

Merged
merged 1 commit into from
May 10, 2017
Merged

bpo-30320: test_eintr now uses pthread_sigmask() #1523

merged 1 commit into from
May 10, 2017

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 9, 2017

Rewrite sigwaitinfo() and sigtimedwait() unit tests for EINTR using
pthread_sigmask() to fix a race condition between the child and the
parent process.

Remove the pipe which was used as a weak workaround against the race
condition.

sigtimedwait() is now tested with a child process sending a signal
instead of testing the timeout feature which is more unstable
(especially regarding to clock resolution depending on the platform).

@vstinner vstinner requested a review from vadmium May 9, 2017 23:10
@mention-bot
Copy link

@Haypo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @cf-natali, @brettcannon and @vadmium to be potential reviewers.

Rewrite sigwaitinfo() and sigtimedwait() unit tests for EINTR using
pthread_sigmask() to fix a race condition between the child and the
parent process.

Remove the pipe which was used as a weak workaround against the race
condition.

sigtimedwait() is now tested with a child process sending a signal
instead of testing the timeout feature which is more unstable
(especially regarding to clock resolution depending on the platform).
@vstinner vstinner merged commit 211a392 into python:master May 10, 2017
@vstinner vstinner deleted the sigwaitinfo branch May 10, 2017 00:37
vstinner added a commit that referenced this pull request May 10, 2017
Rewrite sigwaitinfo() and sigtimedwait() unit tests for EINTR using
pthread_sigmask() to fix a race condition between the child and the
parent process.

Remove the pipe which was used as a weak workaround against the race
condition.

sigtimedwait() is now tested with a child process sending a signal
instead of testing the timeout feature which is more unstable
(especially regarding to clock resolution depending on the platform).
(cherry picked from commit 211a392)
vstinner added a commit that referenced this pull request May 10, 2017
…ter to 3.5 (#1532)

* bpo-30320: test_eintr now uses pthread_sigmask() (#1523)

Rewrite sigwaitinfo() and sigtimedwait() unit tests for EINTR using
pthread_sigmask() to fix a race condition between the child and the
parent process.

Remove the pipe which was used as a weak workaround against the race
condition.

sigtimedwait() is now tested with a child process sending a signal
instead of testing the timeout feature which is more unstable
(especially regarding to clock resolution depending on the platform).
(cherry picked from commit 211a392)

* test_eintr: Fix ResourceWarning warnings

(cherry picked from commit c50cccf)

* test_eintr: remove unused import

* bpo-25277: Add a watchdog to test_eintr

Set a timeout of 10 minutes in test_eintr using faulthandler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants