summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2012-06-25 08:13:32 (GMT)
committerGregory P. Smith <greg@krypto.org>2012-06-25 08:13:32 (GMT)
commitb5ba203709ec9e2e189e29cd5b200b03c7fe0843 (patch)
tree4c1bff8b3dd919acbaa1c47f4318e776646869b3 /Lib/test/test_io.py
parent33369cf9a534289769c9e8a3a093a0fa380dd435 (diff)
downloadcpython-b5ba203709ec9e2e189e29cd5b200b03c7fe0843.zip
cpython-b5ba203709ec9e2e189e29cd5b200b03c7fe0843.tar.gz
cpython-b5ba203709ec9e2e189e29cd5b200b03c7fe0843.tar.bz2
Backout change e8f44ebacda7052267318cecf5b6f128d35add17. Reverting the test
to using signal.alarm(1) instead of signal.setitimer(signal.ITIMER_REAL, 0.1). This is an attempt to see if this change is what caused the ubuntu arm buildbot to hang in test_io's test_interrupted_write_retry_text. Discussion in Issue #12268.
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r--Lib/test/test_io.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 28b4f06..95ecd90 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -2868,7 +2868,7 @@ class SignalsTest(unittest.TestCase):
try:
wio = self.io.open(w, **fdopen_kwargs)
t.start()
- signal.setitimer(signal.ITIMER_REAL, 0.1)
+ signal.alarm(1)
# Fill the pipe enough that the write will be blocking.
# It will be interrupted by the timer armed above. Since the
# other thread has read one byte, the low-level write will
@@ -2912,7 +2912,7 @@ class SignalsTest(unittest.TestCase):
r, w = os.pipe()
wio = self.io.open(w, **fdopen_kwargs)
try:
- signal.setitimer(signal.ITIMER_REAL, 0.1)
+ signal.alarm(1)
# Either the reentrant call to wio.write() fails with RuntimeError,
# or the signal handler raises ZeroDivisionError.
with self.assertRaises((ZeroDivisionError, RuntimeError)) as cm:
@@ -2947,7 +2947,7 @@ class SignalsTest(unittest.TestCase):
try:
rio = self.io.open(r, **fdopen_kwargs)
os.write(w, b"foo")
- signal.setitimer(signal.ITIMER_REAL, 0.1)
+ signal.alarm(1)
# Expected behaviour:
# - first raw read() returns partial b"foo"
# - second raw read() returns EINTR
@@ -2991,13 +2991,13 @@ class SignalsTest(unittest.TestCase):
t.daemon = True
def alarm1(sig, frame):
signal.signal(signal.SIGALRM, alarm2)
- signal.setitimer(signal.ITIMER_REAL, 0.1)
+ signal.alarm(1)
def alarm2(sig, frame):
t.start()
signal.signal(signal.SIGALRM, alarm1)
try:
wio = self.io.open(w, **fdopen_kwargs)
- signal.setitimer(signal.ITIMER_REAL, 0.1)
+ signal.alarm(1)
# Expected behaviour:
# - first raw write() is partial (because of the limited pipe buffer
# and the first alarm)