diff --git a/test/integration/kpatch-test b/test/integration/kpatch-test index ca5e783..688ab1d 100755 --- a/test/integration/kpatch-test +++ b/test/integration/kpatch-test @@ -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