drm/xe: Fix kunit integration due to missing prototypes
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 23 Feb 2023 05:00:35 +0000 (21:00 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:29:20 +0000 (18:29 -0500)
commit353dfaaa31648c4e6f7f3fee5001f047ebf3ed67
tree892144dff2e5aec5aba3f4cde90e69ff27393580
parent5b7e50e2ea1745bd09c3d99a4f7c49d630124825
drm/xe: Fix kunit integration due to missing prototypes

In order to avoid  -Werror=missing-prototypes, add the prototypes
in a separate tests/<test-name>_test.h file that is included by both
the implementation (tests/xe_<testname>.c, injected in xe.ko) and the
kunit module (tests/xe_<testname>_test.c -> xe-<testname>-test.ko).

v2: Add header and don't add ifdef to files that are already not built
when not using kunit (Matt Auld)

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/tests/xe_bo.c
drivers/gpu/drm/xe/tests/xe_bo_test.c
drivers/gpu/drm/xe/tests/xe_bo_test.h [new file with mode: 0644]
drivers/gpu/drm/xe/tests/xe_dma_buf.c
drivers/gpu/drm/xe/tests/xe_dma_buf_test.c
drivers/gpu/drm/xe/tests/xe_dma_buf_test.h [new file with mode: 0644]
drivers/gpu/drm/xe/tests/xe_migrate.c
drivers/gpu/drm/xe/tests/xe_migrate_test.c
drivers/gpu/drm/xe/tests/xe_migrate_test.h [new file with mode: 0644]