1
0
mirror of https://github.com/dynup/kpatch synced 2025-03-25 04:16:39 +00:00

Merge pull request from keiya-nobuta/test-devel

kpatch-test: Change DYNDEBUG_CONTROL setting to use sudo
This commit is contained in:
Artem Savkov 2021-11-15 12:15:40 +01:00 committed by GitHub
commit 4975ae8b97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -355,8 +355,8 @@ unload_all
save_dmesg
if [ "${DYNDEBUG_ENABLED}" == "1" ]; then
prev_dyndebug=$(grep klp_try_switch_task "${DYNDEBUG_CONTROL}" | awk '{print $3;}')
echo "func klp_try_switch_task +p" >"${DYNDEBUG_CONTROL}" 2>/dev/null
prev_dyndebug=$(sudo sh -c "grep klp_try_switch_task ${DYNDEBUG_CONTROL}" | awk '{print $3;}')
sudo sh -c "echo 'func klp_try_switch_task +p' > ${DYNDEBUG_CONTROL} 2>/dev/null"
fi
if [[ $QUICK != 1 ]]; then
@ -380,7 +380,7 @@ fi
unload_all
if [ "${DYNDEBUG_ENABLED}" == "1" ]; then
echo "func klp_try_switch_task ${prev_dyndebug}" >"${DYNDEBUG_CONTROL}" 2>/dev/null
sudo sh -c "echo \"func klp_try_switch_task ${prev_dyndebug}\" > ${DYNDEBUG_CONTROL} 2>/dev/null"
fi
if new_dmesg | grep -q "Call Trace"; then