[pypy-svn] r19370 - pypy/dist/pypy/translator/c/test

pedronis at codespeak.net pedronis at codespeak.net
Tue Nov 1 20:56:55 CET 2005


Author: pedronis
Date: Tue Nov  1 20:56:54 2005
New Revision: 19370

Modified:
   pypy/dist/pypy/translator/c/test/test_extfunc.py
Log:
segfaulting os.read test



Modified: pypy/dist/pypy/translator/c/test/test_extfunc.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_extfunc.py	(original)
+++ pypy/dist/pypy/translator/c/test/test_extfunc.py	Tue Nov  1 20:56:54 2005
@@ -87,6 +87,21 @@
     assert open(filename, 'r').read() == "hello world\n"
     os.unlink(filename)
 
+def segfaulting_test_big_read():
+    filename = str(udir.join('test_open_read_write_close.txt'))
+    def does_stuff():
+        fd = os.open(filename, os.O_WRONLY | os.O_CREAT, 0777)
+        count = os.write(fd, "hello world\n")
+        os.close(fd)
+        fd = os.open(filename, os.O_RDONLY, 0777)
+        data = os.read(fd, 500000)
+        os.close(fd)
+
+    f1 = compile(does_stuff, [])
+    f1()
+    os.unlink(filename)
+
+
 def test_ftruncate():
     if not hasattr(os, 'ftruncate'):
         py.test.skip("this os has no ftruncate :-(")



More information about the Pypy-commit mailing list