From c9c038efea7224e55d04362b90e7aab0b644d695 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Thu, 14 Oct 2021 21:20:10 -0700 Subject: [PATCH 1/2] verify-kernel-boot-log: move all the code to functions Rationale in #740 Signed-off-by: Marc Herbert --- test-case/verify-kernel-boot-log.sh | 42 ++++++++++++++++++----------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/test-case/verify-kernel-boot-log.sh b/test-case/verify-kernel-boot-log.sh index 318f97ef..c37b3a24 100755 --- a/test-case/verify-kernel-boot-log.sh +++ b/test-case/verify-kernel-boot-log.sh @@ -18,26 +18,36 @@ 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 + 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 "$@" From 23f1aa3d969d3db3fe32105c4ea561ba2c2aab9b Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Thu, 14 Oct 2021 21:32:10 -0700 Subject: [PATCH 2/2] verify-kernel-kernel-log: skip ADL platforms Having plaforms still under development in PR testing is already a stretch, let's not push it too far. The kernel boot logs should still be availble. This will avoid recurring issues like #767, - *ERROR* bcs'0 reset request timed out: {request: 00000001, RESET_CTL: https://sof-ci.01.org/sofpr/PR4777/build10384/devicetest/?model=ADLP_RVP_SDW&testcase=verify-kernel-boot-log - [ 3.262181] kernel: cpufreq: cpufreq_online: Failed to initialize policy for cpu: 0 (-19) in daily tests, Others in 9ba12158cbd4, etc. Signed-off-by: Marc Herbert --- test-case/verify-kernel-boot-log.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test-case/verify-kernel-boot-log.sh b/test-case/verify-kernel-boot-log.sh index c37b3a24..e14ccfcd 100755 --- a/test-case/verify-kernel-boot-log.sh +++ b/test-case/verify-kernel-boot-log.sh @@ -27,6 +27,13 @@ main() 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 }