Move ioctl mocking tests from C to Vala