Rebased on top of upstream head commit:
60f81419c4 LTP 20240930
Update Note:
* This update fixes the following issues:
- LP: #2025638 cgroup_core02 in ubuntu_ltp_controller failed on J-5.15 s390x
- LP: #2070330 mm:kallsyms from ubuntu_ltp failed
- LP: #2078315 creat07, execve04, ioctl_loop02, ioctl_loop06, ioctl_loop07 from ubuntu_ltp_syscalls failed on N-OEM-6.11
- Build issue on Oracular
* This update is known to have the following issues:
- LP: #2083180 ioctl_ficlone03 from ubuntu_ltp_syscalls failed on Bionic when testing xfs/btrfs
- LP: #2083183 landlock04 from ubuntu_ltp_syscalls failed on Jammy (TBROK: landlock_add_rule)
- LP: #2083185 landlock07 from ubuntu_ltp_syscalls failed on Noble
- LP: #2083220 cgroup_fj_function_cpuset and cgroup_fj_stress_cpuset* failed on Jammy with TWARN
- LP: #2083687 cachestat03 from ubuntu_ltp_syscalls failed on B-KVM
* sru-trusty branch is not be updated.
runtest: syscalls: Disable ficlone tests for the release
For XFS the test requires mkfs.xfs > 5.1 and kernel 4.9 and since fixing
this properly will require additions to the test library and we are
releasing LTP today, we will just disable these tests just for the
release.
c3f507a...
by
Andrea Cervesato <email address hidden>
Ignore generated modules.livepatch in git repo
modules.livepatch files are generated during the build and they are not
needed inside the git repo. Ignore them so they are not added by
accident inside the git repository.
smt_smp_affinity 0 TINFO : Set affinity through system call
smt_smp_affinity 0 TINFO : Set test process affinity.
mask: 1
smt_smp_affinity 0 TINFO : ...Error
...
smt_smp_affinity 0 TINFO : Set test process affinity.
mask: c0000000
smt_smp_affinity 0 TINFO : ...Error
smt_smp_affinity 3 TFAIL : ht_affinity.c:240: System call setaffinity() is error.
The type of cpumask pointer used in set_affinity() is unsigned long, but
ht_affinity used a unsigned int pointer. When kernel copy cpumask from
user-space pointer, the high 32bit of cpumask is a random value. So the
process can't be bind to the cpu specified by users.
After using sizeof on the mask instead of sizeof(unsigned long), ht_affinity
test succeeds:
smt_smp_affinity 0 TINFO : Set affinity through system call
smt_smp_affinity 0 TINFO : Set test process affinity.
mask: 1
smt_smp_affinity 0 TINFO : ...OK
...
smt_smp_affinity 0 TINFO : Set test process affinity.
mask: c0000000
smt_smp_affinity 0 TINFO : ...OK
smt_smp_affinity 3 TPASS : System call setaffinity() is OK.
lib: handle ENOENT errors when processes exit during PID scanning
There is a race window between readdir() and fopen() in line 125~131 of lib
function get_used_pids. A process could terminate after its directory entry
is read but before its status file is opened.
When fopen() is called, the status file may no longer exist, resulting in an
error like:
tag=msgstress01__with_dmesg_entry stime=1723563200
...
tst_test.c:1617: TINFO: Timeout per run is 0h 03m 30s
tst_pid.c:128: TBROK: Failed to open FILE '/proc/73429/status' for reading: ENOENT (2)
To resolve this, the file_lines_scanf() function is modified to handle ENOENT
errors gracefully when strict mode is not enabled. If fopen() fails due to
ENOENT, the function now returns 1 to skip the missing file instead of treating
it as a critical error.
Reported-by: Paul Bunyan <email address hidden>
Analysed-by: Charles Mirabile <email address hidden>
Signed-off-by: Li Wang <email address hidden>
Reviewed-by: Cyril Hrubis <email address hidden>
968e624...
by
Martin Doucha <email address hidden>
cve-2015-3290: Fix broken 32bit assembly
The 32bit corruption assembly has two bugs:
- EBP is missing from asm clobber list which may result in input/output
parameters getting overwritten by the "puzzle"
- orig_ss is allocated on stack which will result in segfault when
restoring %ss to the original value
Add EBP to the clobber list and make sure that mov %[orig_ss], %%ss
will not use address relative to %esp.
As the ru_maxrss value is generally updated at certain intervals or under
specific conditions, such as page faults or context switches. There may be
delay between the completion of memset() and the update of ru_maxrss.
To address this issue, we create a function to force context switches by
calling sched_yield() multiple times. This approach helps to ensure that
the system has the opportunity to update the ru_maxrss value more promptly.
Reproted-by: Scott Weaver <email address hidden>
Signed-off-by: Li Wang <email address hidden>
Reviewed-by: Cyril Hrubis <email address hidden>
62cebaf...
by
Ma Xinjian via ltp <email address hidden>
sigsuspend: Add testcase for EFAULT
Add a testcase with the mask parameter points to an invalid address.