[LTP] [PATCH 15/15] cgroup_xattr: Remove kernel >= 3.15 check

Petr Vorel pvorel@suse.cz
Mon May 27 08:33:46 CEST 2024


Since 9e9654cf2 LTP supports kernel >= 4.4.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 .../kernel/controllers/cgroup_xattr/cgroup_xattr.c     | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/testcases/kernel/controllers/cgroup_xattr/cgroup_xattr.c b/testcases/kernel/controllers/cgroup_xattr/cgroup_xattr.c
index a870118f5..0d016b583 100644
--- a/testcases/kernel/controllers/cgroup_xattr/cgroup_xattr.c
+++ b/testcases/kernel/controllers/cgroup_xattr/cgroup_xattr.c
@@ -151,11 +151,8 @@ void setup(int argc, char *argv[])
 		tst_brkm(TCONF, NULL, "Kernel doesn't support cgroups");
 
 	for (i = 0; i < ARRAY_SIZE(tkeys); ++i) {
-		if (!strcmp(tkeys[i].name, "security.")) {
-			tkeys[i].good = tst_kvercmp(3, 15, 0) < 0;
-		} else if (!strcmp(tkeys[i].name, "trusted.")) {
+		if (!strcmp(tkeys[i].name, "trusted."))
 			tkeys[i].good = tst_kvercmp(4, 5, 0) < 0;
-		}
 	}
 
 	int value_size = DEFAULT_VALUE_SIZE;
@@ -269,12 +266,7 @@ int mount_cgroup(void)
 		 * additional "xattr" option. In that case, mount will succeed,
 		 * but xattr won't be supported in the new mount anyway.
 		 * Should be removed as soon as a fix committed to upstream.
-		 *
-		 * But not applicable for kernels >= 3.15 where xattr supported
-		 * natively.
 		 */
-		if (hier != 0 && tst_kvercmp(3, 15, 0) < 0)
-			continue;
 
 		int i, found = 0;
 		for (i = 0; i < cgrp_opt_num; ++i) {
-- 
2.43.0



More information about the ltp mailing list