bpo-30796: Fix failures in signal delivery stress test#2488
bpo-30796: Fix failures in signal delivery stress test#2488pitrou merged 2 commits intopython:masterfrom
Conversation
setitimer() can have a poor minimum resolution on some machines, this would make the test reach its deadline (and a stray signal could then kill a subsequent test).
|
@Haypo, do you like it? Another timer resolution for you :-) |
|
Wow. IMHO calibrating setitmer is overkill for an unit test. The Python stdlib shouldn't depend too much on low-level OS features :-/ I suggest to remove the unit test. Maybe move it somewhere else? |
Well, it works and is short enough (less than 1 sec).
Things that are moved elsewhere never get exercised, unfortunately. |
This is |
|
I'd like to merge in order to see what the buildbots have to say. |
| if reso <= 1e-4: | ||
| return 10000 | ||
| elif reso <= 1e-2: | ||
| return 100 |
There was a problem hiding this comment.
Isn't 100 enough on all platforms?
There was a problem hiding this comment.
10000 triggers the issue much more reliably in my tests (it's very subtle).
There was a problem hiding this comment.
"10000 triggers the issue much more reliably in my tests (it's very subtle)." ok
I'm not really opposed to the test. It's just that I don't want to maintain it :-) Since you seem to want to maintain it, I'm fine with it :-) |
|
Thanks. If I really don't manage to make it stable enough, I'll restrict it to Linux :-) |
Ok, I agree with this plan. Let's see how buildbots like your code :-) |
* bpo-30796: Fix failures in signal delivery stress test setitimer() can have a poor minimum resolution on some machines, this would make the test reach its deadline (and a stray signal could then kill a subsequent test). * Make sure to clear the itimer after the test
* [3.6] bpo-30703: Improve signal delivery (GH-2415) * Improve signal delivery Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-unsafe functions. * Remove unused function * Improve comments * Add stress test * Adapt for --without-threads * Add second stress test * Add NEWS blurb * Address comments @Haypo. (cherry picked from commit c08177a) * bpo-30796: Fix failures in signal delivery stress test (#2488) * bpo-30796: Fix failures in signal delivery stress test setitimer() can have a poor minimum resolution on some machines, this would make the test reach its deadline (and a stray signal could then kill a subsequent test). * Make sure to clear the itimer after the test
setitimer() can have a poor minimum resolution on some machines, this would make the test reach its deadline (and a stray signal could then kill a subsequent test).