]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fpga: Simplify and improve fpga region test using deferred actions
authorMarco Pagani <marpagan@redhat.com>
Thu, 25 Jul 2024 12:50:31 +0000 (14:50 +0200)
committerXu Yilun <yilun.xu@linux.intel.com>
Wed, 14 Aug 2024 15:51:04 +0000 (23:51 +0800)
commitd783ed2f5fe7850fb7f6296ae267e2efcf877319
treea0aa0bc96800828395a158f2c0312a9f2b4eef75
parent3c2c01849c01e7e3c99124a7fb7f238b7c9a2348
fpga: Simplify and improve fpga region test using deferred actions

Use deferred actions to simplify the test suite and avoid potential memory
leaks when test cases fail. Remove unnecessary calls to
kunit_device_unregister() since kunit devices are tied to the test context
and released by a deferred action when the test is completed.

Other changes: fix a typo by changing the test suite name to fpga_region in
the kunit_suite struct.

Signed-off-by: Marco Pagani <marpagan@redhat.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20240725125031.308195-4-marpagan@redhat.com
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
drivers/fpga/tests/fpga-region-test.c