[LTP] [PATCH] API/cgroup: Add rdma controller

Luke Nowakowski-Krijger luke.nowakowskikrijger@canonical.com
Wed Aug 24 23:54:21 CEST 2022


There is a test reporting "TBROK: 'rdma' controller is unknown
to LTP" so lets add the controller.

Signed-off-by: Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com>
---
 lib/tst_cgroup.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
index 1cfd79243..1da3f0a5d 100644
--- a/lib/tst_cgroup.c
+++ b/lib/tst_cgroup.c
@@ -93,9 +93,10 @@ enum cgroup_ctrl_indx {
 	CTRL_BLKIO,
 	CTRL_MISC,
 	CTRL_PERFEVENT,
-	CTRL_DEBUG
+	CTRL_DEBUG,
+	CTRL_RDMA
 };
-#define CTRLS_MAX CTRL_DEBUG
+#define CTRLS_MAX CTRL_RDMA
 
 /* At most we can have one cgroup V1 tree for each controller and one
  * (empty) v2 tree.
@@ -253,6 +254,10 @@ static const struct cgroup_file debug_ctrl_files[] = {
 	{ }
 };
 
+static const struct cgroup_file rdma_ctrl_files[] = {
+	{ }
+};
+
 #define CTRL_NAME_MAX 31
 #define CGROUP_CTRL_MEMBER(x, y)[y] = { .ctrl_name = #x, .files = \
 	x ## _ctrl_files, .ctrl_indx = y, NULL, 0 }
@@ -275,6 +280,7 @@ static struct cgroup_ctrl controllers[] = {
 	CGROUP_CTRL_MEMBER(misc, CTRL_MISC),
 	CGROUP_CTRL_MEMBER(perf_event, CTRL_PERFEVENT),
 	CGROUP_CTRL_MEMBER(debug, CTRL_DEBUG),
+	CGROUP_CTRL_MEMBER(rdma, CTRL_RDMA),
 	{ }
 };
 
-- 
2.34.1



More information about the ltp mailing list