diff options
| author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2024-07-20 17:25:25 +0300 |
|---|---|---|
| committer | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2024-07-22 13:20:11 +0300 |
| commit | 8f3d86f13eb2b37d86fc48df8995dffd9b7d9010 (patch) | |
| tree | 3ed4248ada5106ab954f21f3aaa9900c33dfb8a7 | |
| parent | e17eedf56ea7afacd919a3d6cc75a617cddd003a (diff) | |
| download | linux-8f3d86f13eb2b37d86fc48df8995dffd9b7d9010.tar.xz | |
drm/xe/tests: Convert xe_dma_buf live tests
Convert xe_dma_buf live tests to parameterized style.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240720142528.530-5-michal.wajdeczko@intel.com
| -rw-r--r-- | drivers/gpu/drm/xe/tests/xe_dma_buf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/tests/xe_dma_buf.c b/drivers/gpu/drm/xe/tests/xe_dma_buf.c index 4f9dc41e13de..c24c8509227e 100644 --- a/drivers/gpu/drm/xe/tests/xe_dma_buf.c +++ b/drivers/gpu/drm/xe/tests/xe_dma_buf.c @@ -8,6 +8,7 @@ #include <kunit/test.h> #include <kunit/visibility.h> +#include "tests/xe_kunit_helpers.h" #include "tests/xe_pci_test.h" #include "xe_pci.h" @@ -275,11 +276,13 @@ static int dma_buf_run_device(struct xe_device *xe) static void xe_dma_buf_kunit(struct kunit *test) { - xe_call_for_each_device(dma_buf_run_device); + struct xe_device *xe = test->priv; + + dma_buf_run_device(xe); } static struct kunit_case xe_dma_buf_tests[] = { - KUNIT_CASE(xe_dma_buf_kunit), + KUNIT_CASE_PARAM(xe_dma_buf_kunit, xe_pci_live_device_gen_param), {} }; @@ -287,5 +290,6 @@ VISIBLE_IF_KUNIT struct kunit_suite xe_dma_buf_test_suite = { .name = "xe_dma_buf", .test_cases = xe_dma_buf_tests, + .init = xe_kunit_helper_xe_device_live_test_init, }; EXPORT_SYMBOL_IF_KUNIT(xe_dma_buf_test_suite); |
