@@ -0,0 +1,892 @@
+import ctypes%0Aimport unittest%0A%0Atry:%0A    import unittest.mock as mock%0Aexcept ImportError:%0A    import mock%0A%0Aimport ioctl.linux%0A%0A%0Aclass TestLinux(unittest.TestCase):%0A%0A    @mock.patch('platform.machine', return_value='i386')%0A    def test_i386(self, _mock):%0A%0A        sizeof_ff_effect = 44%0A        EVIOCSFF = ioctl.linux.IOC('w', 'E', 0x80, sizeof_ff_effect)%0A        self.assertEqual(EVIOCSFF, 0x402c4580)%0A%0A        BLKRRPART = ioctl.linux.IO(0x12, 95)%0A        self.assertEqual(BLKRRPART, 0x0000125f)%0A%0A        RNDGETENTCNT = ioctl.linux.IOR('R', 0x00, ctypes.c_int)%0A        self.assertEqual(RNDGETENTCNT, 0x80045200)%0A%0A        RNDGETENTCNT = ioctl.linux.IOR('R', 0x00, 4)%0A%0A        RNDADDTOENTCNT = ioctl.linux.IOW('R', 0x01, ctypes.c_int)%0A        self.assertEqual(RNDADDTOENTCNT, 0x40045201)%0A%0A        FIFREEZE = ioctl.linux.IOWR('X', 119, ctypes.c_int)%0A        self.assertEqual(FIFREEZE, 0xc0045877)%0A

Add tests for ioctl.linux.