Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kpatch-test: add dmesg entry at start of test #1383

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading