kunit: test: add test resource management API
authorBrendan Higgins <brendanhiggins@google.com>
Mon, 23 Sep 2019 09:02:32 +0000 (02:02 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 30 Sep 2019 23:35:00 +0000 (17:35 -0600)
commit0a756853586ce185ee1bb9ccbe5ec03e103e594f
treebcf9aa448dfd6a9e6fa8fcfea8ba8e4040cd2659
parent914cc63eea6fbe11ed46dba5e4438d81b0cd42d2
kunit: test: add test resource management API

Create a common API for test managed resources like memory and test
objects. A lot of times a test will want to set up infrastructure to be
used in test cases; this could be anything from just wanting to allocate
some memory to setting up a driver stack; this defines facilities for
creating "test resources" which are managed by the test infrastructure
and are automatically cleaned up at the conclusion of the test.

Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
include/kunit/test.h
lib/kunit/test.c