mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
selftests/livepatch: wait for atomic replace to occur
On some machines with a large number of CPUs there is a sizable delay between an atomic replace occurring and when sysfs updates accordingly. This fix uses 'loop_until' to wait for the atomic replace to unload all previous livepatches. Reported-by: CKI Project <cki-project@redhat.com> Closes: https://datawarehouse.cki-project.org/kcidb/tests/redhat:1413102084-x86_64-kernel_upt_28 Signed-off-by: Ryan Sullivan <rysulliv@redhat.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Acked-by: Joe Lawrence <joe.lawrence@redhat.com> Link: https://lore.kernel.org/r/20240822173122.14760-1-rysulliv@redhat.com Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
parent
d2d721e2eb
commit
052f395164
@ -139,11 +139,8 @@ load_lp $MOD_REPLACE replace=1
|
||||
grep 'live patched' /proc/cmdline > /dev/kmsg
|
||||
grep 'live patched' /proc/meminfo > /dev/kmsg
|
||||
|
||||
mods=(/sys/kernel/livepatch/*)
|
||||
nmods=${#mods[@]}
|
||||
if [ "$nmods" -ne 1 ]; then
|
||||
die "Expecting only one moduled listed, found $nmods"
|
||||
fi
|
||||
loop_until 'mods=(/sys/kernel/livepatch/*); nmods=${#mods[@]}; [[ "$nmods" -eq 1 ]]' ||
|
||||
die "Expecting only one moduled listed, found $nmods"
|
||||
|
||||
# These modules were disabled by the atomic replace
|
||||
for mod in $MOD_LIVEPATCH3 $MOD_LIVEPATCH2 $MOD_LIVEPATCH1; do
|
||||
|
Loading…
Reference in New Issue
Block a user