mirror of https://github.com/dynup/kpatch
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() {
|
||||
for i in `/sbin/lsmod |egrep '^kpatch' |awk '{print $1}'`; do
|
||||
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
|
||||
$KPATCH unload --all
|
||||
}
|
||||
|
||||
build_module() {
|
||||
|
|
Loading…
Reference in New Issue