kunit: Add module attribute
authorRae Moar <rmoar@google.com>
Tue, 25 Jul 2023 21:25:14 +0000 (21:25 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 26 Jul 2023 19:29:09 +0000 (13:29 -0600)
commita00a72709175a4d53096301a8792b8171d1223e5
tree40eafdbbc2e0416eea039b758d3addb63667a86f
parent02c2d0c2a84172c3c7ec0229c61db55d23dd4730
kunit: Add module attribute

Add module attribute to the test attribute API. This attribute stores the
module name associated with the test using KBUILD_MODNAME.

The name of a test suite and the module name often do not match. A
reference to the module name associated with the suite could be extremely
helpful in running tests as modules without needing to check the codebase.

This attribute will be printed for each suite.

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