Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions case-lib/hijack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ function func_exit_handler()

if [[ "$KERNEL_CHECKPOINT" =~ ^[0-9]{10} ]]; then
journalctl_cmd --since=@"$KERNEL_CHECKPOINT" > "$LOG_ROOT/dmesg.txt"
elif [[ "$KERNEL_CHECKPOINT" == "disabled" ]]; then
journalctl_cmd > "$LOG_ROOT/dmesg.txt"
else
die 'Kernel check point "KERNEL_CHECKPOINT" is not properly set'
fi
Expand Down
5 changes: 5 additions & 0 deletions case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,8 @@ journalctl_cmd()
journalctl -k -q --no-pager --utc --output=short-monotonic \
--no-hostname "$@"
}

disable_kernel_check_point()
{
KERNEL_CHECKPOINT="disabled"
}
24 changes: 24 additions & 0 deletions test-case/verify-kernel-boot-log.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

##
## Case Name: verify-kernel-boot-log
## Preconditions:
## N/A
## Description:
## Check kernel boot log, and see if there is any errors
## Case step:
## 1. Disable kernel check point and check kernel log from kernel boot
## Expect result:
## No error found in kernel boot log
##

set -e

# source from the relative path of current folder
# shellcheck source=case-lib/lib.sh
source "$(dirname "${BASH_SOURCE[0]}")"/../case-lib/lib.sh

func_opt_parse_option "$@"
disable_kernel_check_point

sof-kernel-log-check.sh