summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fcntl.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_fcntl.py')
-rw-r--r--Lib/test/test_fcntl.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py
index 0ce3a5d..b8cda2f 100644
--- a/Lib/test/test_fcntl.py
+++ b/Lib/test/test_fcntl.py
@@ -3,6 +3,7 @@
OS/2+EMX doesn't support the file locking operations.
"""
+import platform
import os
import struct
import sys
@@ -10,7 +11,7 @@ import _testcapi
import unittest
from test.support import verbose, TESTFN, unlink, run_unittest, import_module
-# Skip test if no fnctl module.
+# Skip test if no fcntl module.
fcntl = import_module('fcntl')
@@ -34,6 +35,8 @@ def get_lockdata():
pid_t = 'l'
lockdata = struct.pack(off_t + off_t + pid_t + 'hh', 0, 0, 0,
fcntl.F_WRLCK, 0)
+ elif sys.platform.startswith('gnukfreebsd'):
+ lockdata = struct.pack('qqihhi', 0, 0, 0, fcntl.F_WRLCK, 0, 0)
elif sys.platform in ['aix3', 'aix4', 'hp-uxB', 'unixware7']:
lockdata = struct.pack('hhlllii', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
elif sys.platform in ['os2emx']:
@@ -97,6 +100,9 @@ class TestFcntl(unittest.TestCase):
self.assertRaises(OverflowError, fcntl.fcntl, F(_testcapi.INT_MIN - 1),
fcntl.F_SETFL, os.O_NONBLOCK)
+ @unittest.skipIf(
+ platform.machine().startswith('arm') and platform.system() == 'Linux',
+ "ARM Linux returns EINVAL for F_NOTIFY DN_MULTISHOT")
def test_fcntl_64_bit(self):
# Issue #1309352: fcntl shouldn't fail when the third arg fits in a
# C 'long' but not in a C 'int'.