History log of /linux-master/drivers/gpu/drm/xe/tests/xe_kunit_helpers.c
Revision Date Author Comments
# 0b754757 18-Dec-2023 Michal Wajdeczko <michal.wajdeczko@intel.com>

drm/xe/kunit: Restore test->priv when done with fake xe device

Current KUnit implementation does not reset test->priv in case of
parametrized tests and that may lead to wrongly treat our output
pointer to fake xe_device from first call as input pointer with
xe_pci_fake_data on subsequent calls. Restore test->priv to
original value to avoid invalid access.

Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20231218190629.502-7-michal.wajdeczko@intel.com
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>


# 5095d13d 18-Dec-2023 Michal Wajdeczko <michal.wajdeczko@intel.com>

drm/xe/kunit: Define helper functions to allocate fake xe device

There will be more KUnit tests added that will require fake device.
Define generic helper functions to avoid code duplications.

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20231218190629.502-6-michal.wajdeczko@intel.com
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>