Skip to content
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
49 changes: 33 additions & 16 deletions test-case/verify-kernel-boot-log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,43 @@ set -e
# shellcheck source=case-lib/lib.sh
source "$(dirname "${BASH_SOURCE[0]}")"/../case-lib/lib.sh

func_opt_parse_option "$@"
disable_kernel_check_point
main()
{
func_opt_parse_option "$@"
disable_kernel_check_point

print_module_params
print_module_params

# Check this device time is NTP Synchronized
if check_ntp_sync; then
printf '\nTime Check: NTP Synchronized\n'
else
timedatectl show
# try to disable/enable NTP once, this will trigger ntp sync twice,
# before stopping ntp and after enabling ntp.
re_enable_ntp_sync
ntp_check

platform=$(sof-dump-status.py -p)
case "$platform" in
adl)
skip_test "$platform is under active development"
;;
esac

sof-kernel-log-check.sh
}

ntp_check()
{
# Check this device time is NTP Synchronized
if check_ntp_sync; then
printf '\nTime Check: NTP Synchronized after re-enabling ntp sync\n'
printf '\nTime Check: NTP Synchronized\n'
else
# If NTP is not synchronized, let this test fail
die "Time Check: NTP NOT Synchronized"
timedatectl show
# try to disable/enable NTP once, this will trigger ntp sync twice,
# before stopping ntp and after enabling ntp.
re_enable_ntp_sync

if check_ntp_sync; then
printf '\nTime Check: NTP Synchronized after re-enabling ntp sync\n'
else
# If NTP is not synchronized, let this test fail
die "Time Check: NTP NOT Synchronized"
fi
fi
fi
}

sof-kernel-log-check.sh
main "$@"