From 5edd45bbcfca403be98ef18a04f0334402e5ff49 Mon Sep 17 00:00:00 2001 From: Artem Savkov Date: Wed, 20 May 2020 14:54:41 +0200 Subject: [PATCH] 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 --- test/integration/kpatch-test | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/integration/kpatch-test b/test/integration/kpatch-test index a781eee..4be001c 100755 --- a/test/integration/kpatch-test +++ b/test/integration/kpatch-test @@ -49,6 +49,7 @@ unset CCACHE_HASHDIR KPATCHBUILD="$ROOTDIR"/kpatch-build/kpatch-build ERROR=0 LOG=test.log +DYNDEBUG_CONTROL=/sys/kernel/debug/dynamic_debug/control rm -f *.log PATCHDIR="${PATCHDIR:-$PWD}" @@ -294,6 +295,9 @@ build_combined_module 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 for file in "${PATCH_LIST[@]}"; do run_load_test $file @@ -314,6 +318,8 @@ fi unload_all +echo "func klp_try_switch_task ${prev_dyndebug}" >"${DYNDEBUG_CONTROL}" 2>/dev/null + if dmesg | grep -q "Call Trace"; then dmesg > dmesg.log error "kernel error detected in printk buffer"