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:
Julien Thierry 2019-10-05 16:02:53 +01:00
parent 58eead5a16
commit c9a4e09b45
1 changed files with 1 additions and 8 deletions

View File

@ -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() {