Skip to content

Commit

Permalink
memcontrol04: Fix the judgment error in test_memcg_low()
Browse files Browse the repository at this point in the history
In the test_memcg_low() function, 4 subgroups (C, D, E, F) are created under B,
and 50MB pagecache is allocated in C, D, and F. Therefore, when checking whether
it is successful at the end, only E should be judged to have low_events==0,
and the judgment conditions for all other subgroups should be low_events > 0.

Fix issure: linux-test-project#1209
linux-test-project#1209
  • Loading branch information
jinguojie committed Nov 21, 2024
1 parent ec41611 commit fbe25b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testcases/kernel/controllers/memcg/memcontrol04.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static void test_memcg_low(void)

TST_EXP_EXPR(oom == 0, "(%c oom events=%ld) == 0", id, oom);

if (i < E) {
if (i != E) {
TST_EXP_EXPR(low > 0,
"(%c low events=%ld) > 0", id, low);
} else {
Expand Down

0 comments on commit fbe25b2

Please sign in to comment.