'The device\'s C{ioctl} implementation raises L{OSError} with an errno of
C{EBADF} when called on a file descriptor which is not valid (ie, which
has no associated file description).'

def test_ioctlEBADF(self):

    fd = self._invalidFileDescriptor()
    exc = self.assertRaises(IOError, self.system.ioctl, fd, _TUNSETIFF, 'tap0')
    self.assertEqual(EBADF, exc.errno)
