linux/security/apparmor/include
Rae Moar cef064fdde apparmor: test: make static symbols visible during kunit testing
[ Upstream commit b11e51dd70 ]

Use macros, VISIBLE_IF_KUNIT and EXPORT_SYMBOL_IF_KUNIT, to allow
static symbols to be conditionally set to be visible during
apparmor_policy_unpack_test, which removes the need to include the testing
file in the implementation file.

Change the namespace of the symbols that are now conditionally visible (by
adding the prefix aa_) to avoid confusion with symbols of the same name.

Allow the test to be built as a module and namespace the module name from
policy_unpack_test to apparmor_policy_unpack_test to improve clarity of
the module name.

Provide an example of how static symbols can be dealt with in testing.

Signed-off-by: Rae Moar <rmoar@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Acked-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Stable-dep-of: 8884ba0778 ("apparmor: fix invalid reference on profile->disconnected")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:52:09 +01:00
..
apparmor.h
apparmorfs.h
audit.h
capability.h
cred.h
crypto.h
domain.h
file.h
ipc.h
label.h
lib.h
match.h
mount.h
net.h
path.h
perms.h
policy_ns.h
policy_unpack.h apparmor: test: make static symbols visible during kunit testing 2023-11-20 11:52:09 +01:00
policy.h
procattr.h
resource.h
secid.h
sig_names.h
task.h