drm/xe/kunit: Restore test->priv when done with fake xe device
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 18 Dec 2023 19:06:25 +0000 (20:06 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 21:31:30 +0000 (16:31 -0500)
commit0b75475723b182400a4bfa5aaff9a969afdfdb76
tree3a99dde933352817eaaece268c0159ca6a24fa63
parent5095d13d758b4e602eb78771abf65ee5dc867645
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>
drivers/gpu/drm/xe/tests/xe_kunit_helpers.c