Subject: Fix test that fail under eatmydata
Forwarded: not-needed
Reviewed-by: Sylvain Beucler <beuc@debian.org>
Last-Update: 2025-03-10

fsync return always true under eatmydata (used at Salsa-CI for
performance) so skip test

Index: pypy-5.6.0+dfsg/lib-python/2.7/test/test_os.py
===================================================================
--- pypy-5.6.0+dfsg.orig/lib-python/2.7/test/test_os.py
+++ pypy-5.6.0+dfsg/lib-python/2.7/test/test_os.py
@@ -637,6 +637,9 @@ class Win32ErrorTests(unittest.TestCase)
 class TestInvalidFD(unittest.TestCase):
     singles = ["fchdir", "fdopen", "dup", "fdatasync", "fstat",
                "fstatvfs", "fsync", "tcgetpgrp", "ttyname"]
+    if 'libeatmydata.so' in os.environ.get('LD_PRELOAD', ''):
+        singles.remove("fsync")
+        singles.remove("fdatasync")
     #singles.append("close")
     #We omit close because it doesn'r raise an exception on some platforms
     def get_single(f):
