On 6/16/22 16:55, David Gow wrote:
On Wed, Jun 15, 2022 at 9:59 PM Maíra Canal maira.canal@usp.br wrote:
KUnit unifies the test structure and provides helper tools that simplify the development of tests. The basic use case allows running tests as regular processes, which makes it easier to run unit tests on a development machine and to integrate the tests into a CI system.
That said, the conversion of selftests for DRM to KUnit tests is beneficial as it unifies the testing API by using the KUnit API.
KUnit is beneficial for developers as it eases the process to run unit tests. It is possible to run the tests by using the kunit-tool on userspace with the following command:
./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm/tests --arch=x86_64
For CI system, it is possible to execute during the build. But, we also think about IGT: we are developing a patch to introduce KUnit to IGT.
These patches were developed during a KUnit hackathon [0] last October. Now, we believe that both the IGT side and the Kernel side are in good shape for submission.
If you are willing to check the output, here is the Pastebin with the output and execution times [1].
[0] https://groups.google.com/g/kunit-dev/c/YqFR1q2uZvk/m/IbvItSfHBAAJ [1] https://pastebin.com/FJjLPKsC
- Arthur Grillo, Isabella Basso, and Maíra Canal
Great to see these going upstream!
Indeed, this is pretty awesome!
I haven't reviewed the patches yet but just have a meta comment. There's a TODO entry for this [0] in Documentation/gpu/todo.rst, so I think that you could add a patch removing that as a part of this series.
[0]: https://cgit.freedesktop.org/drm/drm/tree/Documentation/gpu/todo.rst#n620