]> granicus.if.org Git - python/commitdiff
Attempt RLock creation prior to test execution on Linux, if it raises the OSError...
authorJesse Noller <jnoller@gmail.com>
Wed, 18 Jun 2008 13:29:52 +0000 (13:29 +0000)
committerJesse Noller <jnoller@gmail.com>
Wed, 18 Jun 2008 13:29:52 +0000 (13:29 +0000)
Lib/test/test_multiprocessing.py

index 66df2ab8f95528491b8e45d04350f2e0e9f88a92..0d53b3f2409d89818103eb13e2d7cfca91d95395 100644 (file)
@@ -1755,9 +1755,12 @@ globals().update(testcases_threads)
 #
 
 def test_main(run=None):
-    if sys.platform.startswith("linux") and not os.path.exists("/dev/shm"):
-        from test.test_support import TestSkipped
-        raise TestSkipped("Missing required /dev/shm device on Linux!")
+    if sys.platform.startswith("linux"):
+        try:
+            lock = multiprocessing.RLock()
+        except OSError:
+            from test.test_support import TestSkipped
+            raise TestSkipped("OSError raises on RLock creation, see issue 3111!")
 
     if run is None:
         from test.test_support import run_unittest as run