Skip to contentSkip to conversation

cfs-scheduler: Fixed "make check" warning in cfs_bandwidth01.c

PATCH Applied Samir 3 participants 4 messages Jun 2 – Jun 12

lore
Share & tools
lore

Samir

author
#0 lore raw

PATCH v3 1/1 cfs-scheduler: Fixed "make check" warning in cfs_bandwidth01.c

Fixed make check warning in cfs_bandwidth01.c to comply with LTP coding style.

cfs_bandwidth01.c:
- Remove initialization of static variable to 0.

Patch v1: https://lore.kernel.org/ltp/[email protected]/
Patch v2: https://lore.kernel.org/ltp/[email protected]/

---
 testcases/kernel/sched/cfs-scheduler/cfs_bandwidth01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/sched/cfs-scheduler/cfs_bandwidth01.c +1 -1
index e52858f8e..8c511f060 100644
@@ -35,7 +35,7 @@
 
 static struct tst_cg_group *cg_level2, *cg_level3a, *cg_level3b;
 static struct tst_cg_group *cg_workers[3];
-static int may_have_waiters = 0;
+static int may_have_waiters;
 
 static void set_cpu_quota(const struct tst_cg_group *const cg,
 			  const float quota_percent)
Signature · 5 lines
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi Samir,

testcases/kernel/sched/cfs-scheduler/cfs_bandwidth01.c line 38

Quoted 4 lines · Samir

cfs-scheduler: Fixed "make check" warning in cfs_bandwidth01.c

testcases/kernel/sched/cfs-scheduler/cfs_bandwidth01.c +1 -1
-static int may_have_waiters = 0;
+static int may_have_waiters;

All good. Reviewed.

Pre-existing issues noticed in the surrounding code (not introduced by this patch):

- cfs_bandwidth01.c in do_test() -- sleep(1) and sleep(2) are used for process synchronization (waiting for workers to start and for throttling to take effect). Is there a checkpoint-based or polling-based approach that could replace these to avoid flakiness under load? The checkpoint mechanism is already used elsewhere in this test.

---
Note:

The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw
In reply to Samir

Merged, Thanks. I also fixed the commit message that was not following the right conventions. Please make sure this will be fixed the next time. In particular:

- commit subject was too long and verbose
- you added patch tracking into the commit message

Fixed into:

cfs-scheduler: Fixed "make check" warning

Fixed make check warning in cfs_bandwidth01.c to comply with LTP coding style.

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp