Skip to content

Commit

Permalink
Merge pull request dynup#1383 from joe-lawrence/integration-dmesg-again
Browse files Browse the repository at this point in the history
kpatch-test: add dmesg entry at start of test
  • Loading branch information
joe-lawrence authored Apr 23, 2024
2 parents 4b01ee2 + 796872f commit ef68b4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/integration/kpatch-test
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,13 @@ run_combined_test() {

# save existing dmesg so we can detect new content
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() {
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"
fi
}
Expand Down

0 comments on commit ef68b4e

Please sign in to comment.