From: Albert Esteve <aesteve@redhat.com>
To: "Tejun Heo" <tj@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Shuah Khan" <shuah@kernel.org>,
"Maarten Lankhorst" <dev@lankhorst.se>,
"Natalie Vock" <nat@pixelcluster.dev>
Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
linux-kselftest@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Albert Esteve <aesteve@redhat.com>,
echanude@redhat.com, mripard@kernel.org,
R Nageswara Sastry <rnsastry@linux.ibm.com>
Subject: [PATCH v7 2/3] selftests: cgroup: Add KB() helper
Date: Tue, 17 Nov 2026 14:27:47 +0100 [thread overview]
Message-ID: <20261117-kunit_cgroups-v7-2-5bcbfe17f323@redhat.com> (raw)
In-Reply-To: <20261117-kunit_cgroups-v7-0-5bcbfe17f323@redhat.com>
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.
Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
Signed-off-by: Albert Esteve <aesteve@redhat.com>
---
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 5307f3bf32a0..455e52a516da 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
next prev parent reply other threads:[~2026-11-17 13:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 13:27 [PATCH v7 0/3] cgroup: dmem: add selftest helper and coverage Albert Esteve
2026-11-17 13:27 ` [PATCH v7 1/3] selftests: cgroup: Add dmem_selftest helper module Albert Esteve
2026-11-17 13:27 ` Albert Esteve [this message]
2026-11-17 13:27 ` [PATCH v7 3/3] selftests: cgroup: Add dmem selftest coverage Albert Esteve
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261117-kunit_cgroups-v7-2-5bcbfe17f323@redhat.com \
--to=aesteve@redhat.com \
--cc=cgroups@vger.kernel.org \
--cc=dev@lankhorst.se \
--cc=dri-devel@lists.freedesktop.org \
--cc=echanude@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=mripard@kernel.org \
--cc=nat@pixelcluster.dev \
--cc=rnsastry@linux.ibm.com \
--cc=shuah@kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox