diff --git a/case-lib/hijack.sh b/case-lib/hijack.sh index f38fa9a1..5fbe6950 100644 --- a/case-lib/hijack.sh +++ b/case-lib/hijack.sh @@ -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 diff --git a/case-lib/lib.sh b/case-lib/lib.sh index 94baa569..613a3408 100644 --- a/case-lib/lib.sh +++ b/case-lib/lib.sh @@ -338,3 +338,8 @@ journalctl_cmd() journalctl -k -q --no-pager --utc --output=short-monotonic \ --no-hostname "$@" } + +disable_kernel_check_point() +{ + KERNEL_CHECKPOINT="disabled" +} diff --git a/test-case/verify-kernel-boot-log.sh b/test-case/verify-kernel-boot-log.sh new file mode 100755 index 00000000..ceaab759 --- /dev/null +++ b/test-case/verify-kernel-boot-log.sh @@ -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