mirror of https://github.com/dynup/kpatch
kpatch-test: clear dmesg just before tests commence
Defer clearing the kernel buffer until we're ready to start the tests, otherwise we increase the likelihood of catching stray errors while we're building the modules and preparing the tests. Fixes #1133 ("kpatch-test should ignore older kernel log messages") Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
This commit is contained in:
parent
3f885dedf5
commit
d76110ed24
|
@ -303,9 +303,6 @@ if [[ "${ID}" == "rhel" && "${VERSION_ID%%.*}" == "7" && "${VERSION_ID##*.}" -le
|
|||
echo "Dynamic debug is not supported on '${PRETTY_NAME}', disabling."
|
||||
fi
|
||||
|
||||
echo "clearing printk buffer"
|
||||
sudo dmesg -C
|
||||
|
||||
for file in "${PATCH_LIST[@]}"; do
|
||||
if [[ $QUICK != 1 || "$file" =~ -FAIL ]]; then
|
||||
build_module "$file"
|
||||
|
@ -316,6 +313,9 @@ build_combined_module
|
|||
|
||||
unload_all
|
||||
|
||||
echo "clearing printk buffer"
|
||||
sudo dmesg -C
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue