[PATCH v6 2/3] selftests: cgroup: Add KB() helper
From: Albert Esteve
Date: Mon Aug 31 2026 - 10:03:59 EST
cgroup_util.h already has MB() and GB() for size
literals. Add KB() in the same style so tests can
spell kilobyte values without in-code shifts.
Signed-off-by: Albert Esteve <aesteve@xxxxxxxxxx>
---
tools/testing/selftests/cgroup/lib/include/cgroup_util.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/cgroup/lib/include/cgroup_util.h b/tools/testing/selftests/cgroup/lib/include/cgroup_util.h
index 5d39c709ac7a..0e5d7b87ad19 100644
--- a/tools/testing/selftests/cgroup/lib/include/cgroup_util.h
+++ b/tools/testing/selftests/cgroup/lib/include/cgroup_util.h
@@ -6,6 +6,7 @@
#define BUF_SIZE 4096
#endif
+#define KB(x) (x << 10)
#define MB(x) (x << 20)
#define GB(x) ((unsigned long long)(x) << 30)
--
2.55.0