mirror of https://github.com/dynup/kpatch
kpatch-test: Change DYNDEBUG_CONTROL setting to use sudo
Depending on environment, "Permission denied" error may occur when /sys/kernel/debug/dynamic_debug/control setting. Signed-off-by: Keiya Nobuta <nobuta.keiya@fujitsu.com>
This commit is contained in:
parent
61fc3f1077
commit
7612b4da68
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue