[pypy-commit] pypy default: See comments. Thanks tumbleweed

arigo noreply at buildbot.pypy.org
Wed Dec 14 18:15:44 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r50512:0eea2bcfa892
Date: 2011-12-14 18:15 +0100
http://bitbucket.org/pypy/pypy/changeset/0eea2bcfa892/

Log:	See comments. Thanks tumbleweed

diff --git a/pypy/module/posix/test/test_posix2.py b/pypy/module/posix/test/test_posix2.py
--- a/pypy/module/posix/test/test_posix2.py
+++ b/pypy/module/posix/test/test_posix2.py
@@ -656,7 +656,11 @@
                 os.fsync(f)     # <- should also work with a file, or anything
             finally:            #    with a fileno() method
                 f.close()
-            raises(OSError, os.fsync, fd)
+            try:
+                # May not raise anything with a buggy libc (or eatmydata)
+                os.fsync(fd)
+            except OSError:
+                pass
             raises(ValueError, os.fsync, -1)
 
     if hasattr(os, 'fdatasync'):
@@ -668,7 +672,11 @@
                 os.fdatasync(fd)
             finally:
                 f.close()
-            raises(OSError, os.fdatasync, fd)
+            try:
+                # May not raise anything with a buggy libc (or eatmydata)
+                os.fdatasync(fd)
+            except OSError:
+                pass
             raises(ValueError, os.fdatasync, -1)
 
     if hasattr(os, 'fchdir'):


More information about the pypy-commit mailing list