Livepatching selftest fixup for 6.11-rc6

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEESH4wyp42V4tXvYsjUqAMR0iAlPIFAmbNnWsACgkQUqAMR0iA
 lPK8sQ//Y6fsXu3TIoFRu0mCgwV2SyyseCBLOHMPOvwIQawBc3EdwzAfktAcObqW
 6+y/RZN6sWk/7IcNhRYt29L6eBglcz08SQ0UFimaNPgh9BD8TOzyzoJw4kvrejUs
 EalecacAo/C2ntDi0N9UNARm7X4zcr6hnIkmF/HDuMGzkRngiACOuL7MFJyOIIfK
 diz8Pu0CGPfjEnby1eUDSunUrVc5TFz6rt+AGnO6GAaH5YUASRby3NvGxyk98MX4
 oYjr+Q7dVAhDfazG7wW0JeCH6XQafQllyuZZKjt+udEavLOLmVvNfE3zVCf8+E5V
 kSymUfQaMpVqaWsJFS1uxchWwkQnbqBEgx/WJlA7esP1RsydjS1ui65Wi+P+WYpL
 L9l68N0NZJ10mr6+tzn9qj9Rr69rm5lmuA/hJglAwgZydWdl2bb8EXZzSJofhIbg
 KjjPDcWCl4GKSXt7lseYO7tDZofhD4E24tzk9xme8gOPRwdqzAcpFKoobqhk/9jO
 /HlgDNtXbkq6JfOmcg1wIA0+XO31ezP7w2aSn5oIn9YoQdFxT0xY8hj7W690FOfU
 SOLtXWC43XWJzGStt19b9inMO4E9dmmNffX3CAzqI3mEQcwfFdXv8S+ZHQn0jUAF
 Y/lx9qDgtYjdpe/FbS1+bICFgbWxCi0NCSF3GaQjFGf7Rz77K7k=
 =dua0
 -----END PGP SIGNATURE-----

Merge tag 'livepatching-for-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching

Pull livepatching fix from Petr Mladek:
 "Selftest regression fix"

* tag 'livepatching-for-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
  selftests/livepatch: wait for atomic replace to occur
This commit is contained in:
Linus Torvalds 2024-08-28 06:34:08 +12:00
commit 3ec3f5fc4a

View File

@ -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