mirror of
https://github.com/dynup/kpatch
synced 2025-03-25 04:16:39 +00:00
Integration tests: enable dynamic debug in klp_try_switch_task()
Enable dynamic debug prints in klp_try_switch_task() function before going through with load tests and switch back to a previous state afterwards. Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
parent
c3f9f4be2d
commit
5edd45bbcf
@ -49,6 +49,7 @@ unset CCACHE_HASHDIR
|
|||||||
KPATCHBUILD="$ROOTDIR"/kpatch-build/kpatch-build
|
KPATCHBUILD="$ROOTDIR"/kpatch-build/kpatch-build
|
||||||
ERROR=0
|
ERROR=0
|
||||||
LOG=test.log
|
LOG=test.log
|
||||||
|
DYNDEBUG_CONTROL=/sys/kernel/debug/dynamic_debug/control
|
||||||
rm -f *.log
|
rm -f *.log
|
||||||
|
|
||||||
PATCHDIR="${PATCHDIR:-$PWD}"
|
PATCHDIR="${PATCHDIR:-$PWD}"
|
||||||
@ -294,6 +295,9 @@ build_combined_module
|
|||||||
|
|
||||||
unload_all
|
unload_all
|
||||||
|
|
||||||
|
prev_dyndebug=$(grep klp_try_switch_task "${DYNDEBUG_CONTROL}" | awk '{print $3;}')
|
||||||
|
echo "func klp_try_switch_task +p" >"${DYNDEBUG_CONTROL}" 2>/dev/null
|
||||||
|
|
||||||
if [[ $QUICK != 1 ]]; then
|
if [[ $QUICK != 1 ]]; then
|
||||||
for file in "${PATCH_LIST[@]}"; do
|
for file in "${PATCH_LIST[@]}"; do
|
||||||
run_load_test $file
|
run_load_test $file
|
||||||
@ -314,6 +318,8 @@ fi
|
|||||||
|
|
||||||
unload_all
|
unload_all
|
||||||
|
|
||||||
|
echo "func klp_try_switch_task ${prev_dyndebug}" >"${DYNDEBUG_CONTROL}" 2>/dev/null
|
||||||
|
|
||||||
if dmesg | grep -q "Call Trace"; then
|
if dmesg | grep -q "Call Trace"; then
|
||||||
dmesg > dmesg.log
|
dmesg > dmesg.log
|
||||||
error "kernel error detected in printk buffer"
|
error "kernel error detected in printk buffer"
|
||||||
|
Loading…
Reference in New Issue
Block a user