Skip to contentSkip to conversation

landlock: Remove KUnit test that triggers a warning

PATCH New Mickaël Salaün 1 participant 1 message May 3, 2025

Subsystems (2)
lore
Share & tools
lore

Mickaël Salaün

author maintainer
#0 lore raw

PATCH 1/1 landlock: Remove KUnit test that triggers a warning

A KUnit test checking boundaries triggers a canary warning, which may be disturbing. Let's remove this test for now. Hopefully, KUnit will soon get support for suppressing warning backtraces [1].

---
 security/landlock/audit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/landlock/audit.c +1 -1
index 7e5e0ed0e4e5..58d5c40d4d0e 100644
@@ -175,7 +175,7 @@ static void test_get_hierarchy(struct kunit *const test)
 	KUNIT_EXPECT_EQ(test, 10, get_hierarchy(&dom2, 0)->id);
 	KUNIT_EXPECT_EQ(test, 20, get_hierarchy(&dom2, 1)->id);
 	KUNIT_EXPECT_EQ(test, 30, get_hierarchy(&dom2, 2)->id);
-	KUNIT_EXPECT_EQ(test, 30, get_hierarchy(&dom2, -1)->id);
+	/* KUNIT_EXPECT_EQ(test, 30, get_hierarchy(&dom2, -1)->id); */
 }
 
 #endif /* CONFIG_SECURITY_LANDLOCK_KUNIT_TEST */
Signature · 1 line
2.49.0