[Intel-xe] [PATCH 1/7] drm/xe: Add basic unit tests for rtp
Lucas De Marchi
lucas.demarchi at intel.com
Fri Mar 31 14:34:21 UTC 2023
On Mon, Mar 27, 2023 at 07:56:01PM +0200, Michał Winiarski wrote:
>On Tue, Mar 21, 2023 at 03:05:21PM -0700, Lucas De Marchi wrote:
>> +EXPORT_SYMBOL(xe_rtp_process_incompat_types);
>> diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
>> new file mode 100644
>> index 000000000000..4a12aad3f759
>> --- /dev/null
>> +++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
>
>There's no need to have this as a separate file.
>We can move the contents of tests/xe_rtp.c into tests/xe_rtp_test.c and
>include tests/xe_rtp_test.c directly in xe_rtp.c
this is not how the tests are currently structured.
xe_rtp.c includes tests/xe_rtp.c. The latter can be seen as "an
extension of the that file, exporting whatever entrypoint is needed
for the real test". They are then part of the xe.ko module.
tests/xe_rtp_test.c is the one in the separate test module, and contains
the integration with kunit.
For some of the tests, when they don't export the required interface,
this unfortunately means writing most of the test inside tests/xe_rtp.c,
which ends up bloating xe.ko. This is not true for all, however. See
the xe_wa tests where we don't even have tests/xe_wa.c.
Lucas De Marchi
More information about the Intel-xe
mailing list