On 31.08.2026 6:55 PM, Albert Esteve wrote:
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 <[email protected]>
Tested-by: R Nageswara Sastry <[email protected]>
System: ppc64le LPAR (IBM POWER), Linux 7.3-rc2
# insmod test_modules/dmem_selftest.ko
# ./test_dmem
TAP version 13
1..2
ok 1 test_dmem_max
ok 2 test_dmem_alloc_byte_granularity
# Totals: pass:2 fail:0 xfail:0 xpass:0 skip:0 error:0
---
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)
--
Thanks and Regards
R.Nageswara Sastry