Merge pull request #1383 from joe-lawrence/integration-dmesg-again

kpatch-test: add dmesg entry at start of test
This commit is contained in:
Joe Lawrence 2024-04-23 16:17:37 -04:00 committed by GitHub
commit ef68b4e416
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -299,12 +299,13 @@ run_combined_test() {
# save existing dmesg so we can detect new content # save existing dmesg so we can detect new content
save_dmesg() { save_dmesg() {
SAVED_DMESG="$(dmesg | tail -n1)" SAVED_DMESG="kpatch-test timestamp: $(date --rfc-3339=ns)"
echo "$SAVED_DMESG" > /dev/kmsg
} }
# new dmesg entries since our saved entry # new dmesg entries since our saved entry
new_dmesg() { new_dmesg() {
if ! dmesg | awk -v last="$SAVED_DMESG" 'p; $0 == last{p=1} END {exit !p}'; then if ! dmesg --notime | awk -v last="$SAVED_DMESG" 'p; $0 == last{p=1} END {exit !p}'; then
error "dmesg overflow, try increasing kernel log buffer size" error "dmesg overflow, try increasing kernel log buffer size"
fi fi
} }