kernel - Regarding tools/testing/ktests or selftests

Pintu Kumar pintu.ping at gmail.com
Tue Oct 10 03:45:11 EDT 2017


Hi All,

Is anybody familiar with ktests of selftests framework under: tool/testing/ ?
I have some queries.

1) What is the difference between ktests and selftests ? How to choose ?
2) How to invoke a test under ktests?
    For example:
    I have some user space C program, that tests some kernel driver IOCTL calls.
    I have a Makefile to build 2 executable for the tests.
    I invoke those executable from a bash shell script and execute all
the tests.
    How can I do it automatically from ktests ?
3) Similarly, how can I do it using selftests?
    Using selftests looks much better option for me.
    But the problem is I have some sub directories to execute the tests.
    Example:
    Under, tools/testing/selftests , I have created 2 sub folders.
    selftests/folders/folder1/
    My test setup is under: folder1
    How to invoke selftests, for folder1 ?

If anybody have added new tests under ktests of selftests, please
provide some reference.


Thanks,
Pintu



More information about the Kernelnewbies mailing list