Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memcontrol04 broken on X86/Arm64 #1209

Open
jinguojie opened this issue Nov 21, 2024 · 1 comment
Open

memcontrol04 broken on X86/Arm64 #1209

jinguojie opened this issue Nov 21, 2024 · 1 comment

Comments

@jinguojie
Copy link

When running memcontrol04, TFAIL results will appear on various Linux distributions, kernel versions, and CPUs:

Linux distribution: Ubuntu 24.10
CPU: X86_64, Arm64
Kernel: 6.6 longterm
glibc:  2.40
LTP version:  commit ec4161186e5, Oct 24 12:18:17 2024

During the operation of memcontrol04, file systems such as ext2, ext3, ext4, xfs, ntfs, and vfat will be tested.
For any of the file system, the same TFAIL result will appear:

root@vm:~/ltp/testcases/kernel/controllers/memcg# ./memcontrol04

tst_test.c:1823: TINFO: === Testing on ext2 ===
memcontrol04.c:208: TPASS: Expect: (C oom events=0) == 0
memcontrol04.c:211: TPASS: Expect: (C low events=437) > 0
memcontrol04.c:208: TPASS: Expect: (D oom events=0) == 0
memcontrol04.c:211: TPASS: Expect: (D low events=437) > 0
memcontrol04.c:208: TPASS: Expect: (E oom events=0) == 0
memcontrol04.c:214: TPASS: Expect: (E low events=0) == 0
memcontrol04.c:208: TPASS: Expect: (F oom events=0) == 0
memcontrol04.c:214: TFAIL: Expect: (F low events=412) == 0

tst_test.c:1823: TINFO: === Testing on ext3 ===
memcontrol04.c:208: TPASS: Expect: (C oom events=0) == 0
memcontrol04.c:211: TPASS: Expect: (C low events=437) > 0
memcontrol04.c:208: TPASS: Expect: (D oom events=0) == 0
memcontrol04.c:211: TPASS: Expect: (D low events=437) > 0
memcontrol04.c:208: TPASS: Expect: (E oom events=0) == 0
memcontrol04.c:214: TPASS: Expect: (E low events=0) == 0
memcontrol04.c:208: TPASS: Expect: (F oom events=0) == 0
memcontrol04.c:214: TFAIL: Expect: (F low events=411) == 0

......

Summary:
passed   55
failed   5
broken   0
skipped  0
warnings 0

It looks like there is an error in the processing logic of cgroup F.

jinguojie added a commit to jinguojie/ltp that referenced this issue Nov 21, 2024
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
@Werkov
Copy link

Werkov commented Nov 28, 2024

@jinguojie there is some more context in earlier discussions. Your fix is too simplistic and makes extra assumptions about memory reclaim.

What about this:

  • without memory_recursiveprot -> expect 0 events in F
  • with memory_recursiveprot -> skip the test (that should silence failures in common environments while it'd avoid having to define the expected behavior)
    ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants