Skip to contentSkip to conversation

security: apparmor: default KUNIT_* fragments to KUNIT_RUN_ALL

PATCH Superseded Anders Roxell 2 participants 2 messages May 5, 2020 – May 7, 2020

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 6/6 security: apparmor: default KUNIT_* fragments to KUNIT_RUN_ALL

This makes it easier to enable all KUnit fragments.

Adding 'if !KUNIT_RUN_ALL' so individual test can be turned of if someone wants that even though KUNIT_RUN_ALL is enabled.

---
 security/apparmor/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
security/apparmor/Kconfig +2 -1
index 0fe336860773..c4648426ea5d 100644
@@ -70,8 +70,9 @@ config SECURITY_APPARMOR_DEBUG_MESSAGES
 	  the kernel message buffer.
 
 config SECURITY_APPARMOR_KUNIT_TEST
-	bool "Build KUnit tests for policy_unpack.c"
+	bool "Build KUnit tests for policy_unpack.c" if !KUNIT_RUN_ALL
 	depends on KUNIT=y && SECURITY_APPARMOR
+	default KUNIT_RUN_ALL
 	help
 	  This builds the AppArmor KUnit tests.
 
Signature · 1 line
2.20.1
Reviewed-by on v2 6/6
#1 lore raw
Quoted 5 lines · Anders Roxell

This makes it easier to enable all KUnit fragments.

Adding 'if !KUNIT_RUN_ALL' so individual test can be turned of if someone wants that even though KUNIT_RUN_ALL is enabled.

Again, as with the other patches, might be worth revising this description when changing the config name.

Quoted 2 lines

Thanks again for the patchset, it's working well for me.

-- David

Quoted 22 lines
---
 security/apparmor/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
security/apparmor/Kconfig +2 -2
index 0fe336860773..c4648426ea5d 100644
@@ -70,8 +70,9 @@ config SECURITY_APPARMOR_DEBUG_MESSAGES
          the kernel message buffer.
 
 config SECURITY_APPARMOR_KUNIT_TEST
-       bool "Build KUnit tests for policy_unpack.c"
+       bool "Build KUnit tests for policy_unpack.c" if !KUNIT_RUN_ALL
        depends on KUNIT=y && SECURITY_APPARMOR
+       default KUNIT_RUN_ALL
        help
          This builds the AppArmor KUnit tests.
 
--

2.20.1