kunit: example: Provide example exit functions
authorDavid Gow <davidgow@google.com>
Wed, 10 May 2023 05:38:32 +0000 (13:38 +0800)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 12 May 2023 00:17:41 +0000 (18:17 -0600)
commita5ce66ad292b681ffe245e1c0e8840484da76784
treea4bd7fc18847ca536f2c99b8efb186620b710903
parentcdc87bda607518e70b6a6745cd593458d725b5a7
kunit: example: Provide example exit functions

Add an example .exit and .suite_exit function to the KUnit example
suite. Given exit functions are a bit more subtle than init functions
(due to running in a different kthread, and running even after tests or
test init functions fail), providing an easy place to experiment with
them is useful.

Reviewed-by: Rae Moar <rmoar@google.com>
Signed-off-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/kunit/kunit-example-test.c