GSOC: Add test for ptp ioctl decoder

Dmitry V. Levin ldv at
Sat Feb 24 16:07:20 UTC 2018


On Sat, Feb 24, 2018 at 08:09:45PM +0530, Harsha Sharma wrote:
> Hello list,
> Greetings from my side, I will like to work on the small task of
> adding test for ptp ioctl decoder. I have one doubt - How am I
> supposed to assign ptp device in my test ? I think I'll need it for
> opening file descriptor from character device. Please correct me if
> I'm wrong.

As with most of ioctl decoders, the entering part and the error path of
the exiting part of ioctl syscall can be tested without any device at all,
and most of tests in tests/ioctl_*.c actually test only these parts.

To test the whole decoders, you need a properly functioning device.
According to linux/tools/testing/selftests/ptp/testptp.c,
it's /dev/ptp0 for PTP ioctls.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <>

More information about the Strace-devel mailing list