summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-06-04 23:52:47 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-06-04 23:52:47 (GMT)
commit28eeefe566d77cd3af3d675c4f2216c5033fe538 (patch)
tree7fec63fcf38c5dbe611860fb74e8c49206d2e581 /Lib/test
parentc7d14452a4ed303d38498cc16c3cfc0beed9b843 (diff)
downloadcpython-28eeefe566d77cd3af3d675c4f2216c5033fe538.zip
cpython-28eeefe566d77cd3af3d675c4f2216c5033fe538.tar.gz
cpython-28eeefe566d77cd3af3d675c4f2216c5033fe538.tar.bz2
Revert revisions:
46640 Patch #1454481: Make thread stack size runtime tunable. 46647 Markup fix The first is causing many buildbots to fail test runs, and there are multiple causes with seemingly no immediate prospects for repairing them. See python-dev discussion. Note that a branch can (and should) be created for resolving these problems, like svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH followed by merging rev 46647 to the new branch.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/output/test_thread8
-rw-r--r--Lib/test/test_thread.py35
-rw-r--r--Lib/test/test_threading.py16
3 files changed, 0 insertions, 59 deletions
diff --git a/Lib/test/output/test_thread b/Lib/test/output/test_thread
index ec58d73..d49651d 100644
--- a/Lib/test/output/test_thread
+++ b/Lib/test/output/test_thread
@@ -4,11 +4,3 @@ all tasks done
*** Barrier Test ***
all tasks done
-
-*** Changing thread stack size ***
-trying stack_size = 32768
-waiting for all tasks to complete
-all tasks done
-trying stack_size = 4194304
-waiting for all tasks to complete
-all tasks done
diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py
index d970107..ea345b6 100644
--- a/Lib/test/test_thread.py
+++ b/Lib/test/test_thread.py
@@ -115,38 +115,3 @@ for i in range(numtasks):
thread.start_new_thread(task2, (i,))
done.acquire()
print 'all tasks done'
-
-# not all platforms support changing thread stack size
-print '\n*** Changing thread stack size ***'
-if thread.stack_size() != 0:
- raise ValueError, "initial stack_size not 0"
-
-thread.stack_size(0)
-if thread.stack_size() != 0:
- raise ValueError, "stack_size not reset to default"
-
-from os import name as os_name
-if os_name in ("nt", "os2", "posix"):
-
- for tss, ok in ((4096, 0), (32768, 1), (0x400000, 1), (0, 1)):
- if ok:
- failed = lambda s, e: s != e
- fail_msg = "stack_size(%d) failed - should succeed"
- else:
- failed = lambda s, e: s == e
- fail_msg = "stack_size(%d) succeeded - should fail"
- thread.stack_size(tss)
- if failed(thread.stack_size(), tss):
- raise ValueError, fail_msg % tss
-
- for tss in (32768, 0x400000):
- print 'trying stack_size = %d' % tss
- next_ident = 0
- for i in range(numtasks):
- newtask()
-
- print 'waiting for all tasks to complete'
- done.acquire()
- print 'all tasks done'
-
- thread.stack_size(0)
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index 09e84f4..7eb9758 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -85,22 +85,6 @@ class ThreadTests(unittest.TestCase):
print 'all tasks done'
self.assertEqual(numrunning.get(), 0)
- # run with a minimum thread stack size (32kB)
- def test_various_ops_small_stack(self):
- if verbose:
- print 'with 32kB thread stack size...'
- threading.stack_size(0x8000)
- self.test_various_ops()
- threading.stack_size(0)
-
- # run with a large thread stack size (16MB)
- def test_various_ops_large_stack(self):
- if verbose:
- print 'with 16MB thread stack size...'
- threading.stack_size(0x1000000)
- self.test_various_ops()
- threading.stack_size(0)
-
def test_foreign_thread(self):
# Check that a "foreign" thread can use the threading module.
def f(mutex):