mirror of
https://github.com/dynup/kpatch
synced 2025-04-28 05:57:57 +00:00
test/integration: Fix kpatch-test module unloading
The unload_all() function in kpatch-test script is out dated and does not unload patches loaded through livepatching. Luckily, "kpatch unload --all" should support both kpatch unloading kpatch patches and livepatch patches. Signed-off-by: Julien Thierry <jthierry@redhat.com>
This commit is contained in:
parent
58eead5a16
commit
c9a4e09b45
@ -117,14 +117,7 @@ log() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unload_all() {
|
unload_all() {
|
||||||
for i in `/sbin/lsmod |egrep '^kpatch' |awk '{print $1}'`; do
|
$KPATCH unload --all
|
||||||
if [[ $i != kpatch ]]; then
|
|
||||||
$KPATCH unload $i >> $LOG 2>&1 || error "\"kpatch unload $i\" failed"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if /sbin/lsmod |egrep -q '^kpatch'; then
|
|
||||||
$RMMOD kpatch >> $LOG 2>&1 || error "\"rmmod kpatch\" failed"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build_module() {
|
build_module() {
|
||||||
|
Loading…
Reference in New Issue
Block a user