ltp
ltp copied to clipboard
memcontrol04 broken on X86/Arm64
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 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) ?
This should have been fixed in 7e19705f797998d647d2f2ee745d9c361ec3e9bc