fix ioctl usage in ctest