diff --git a/case-lib/lib.sh b/case-lib/lib.sh index c15633d5..13c5b350 100644 --- a/case-lib/lib.sh +++ b/case-lib/lib.sh @@ -327,6 +327,13 @@ die() exit 1 } +skip_test() +{ + dlogi "$@" + # See func_exit_handler() + exit 2 +} + is_sof_used() { grep -q "sof" /proc/asound/cards; @@ -357,12 +364,7 @@ is_zephyr() logger_disabled() { - # disable logger when firmware type is zephyr or -s is set to 0 - if is_zephyr || [[ ${OPT_VAL['s']} -ne 1 ]]; then - return 0 - else - return 1 - fi + [[ ${OPT_VAL['s']} -eq 0 ]] || is_zephyr } print_module_params() diff --git a/test-case/check-runtime-pm-double-active.sh b/test-case/check-runtime-pm-double-active.sh index 350d6ea6..10cb48d2 100755 --- a/test-case/check-runtime-pm-double-active.sh +++ b/test-case/check-runtime-pm-double-active.sh @@ -61,7 +61,7 @@ loop_count=${OPT_VAL['l']} [[ -z $tplg ]] && dloge "Miss tplg file to run" && exit 2 [[ $(sof-dump-status.py --dsp_status 0) == "unsupported" ]] && - dlogi "platform doesn't support runtime pm, skip test case" && exit 2 + skip_test "platform doesn't support runtime pm, skip test case" declare -A APP_LST DEV_LST APP_LST['playback']='aplay' diff --git a/test-case/check-runtime-pm-status.sh b/test-case/check-runtime-pm-status.sh index 519ce878..f125557f 100755 --- a/test-case/check-runtime-pm-status.sh +++ b/test-case/check-runtime-pm-status.sh @@ -57,7 +57,7 @@ loop_count=${OPT_VAL['l']} [[ -z $tplg ]] && die "Miss tplg file to run" [[ $(sof-dump-status.py --dsp_status 0) == "unsupported" ]] && - dlogi "platform doesn't support runtime pm, skip test case" && exit 2 + skip_test "platform doesn't support runtime pm, skip test case" declare -A APP_LST DEV_LST APP_LST['playback']='aplay' diff --git a/test-case/check-sof-logger.sh b/test-case/check-sof-logger.sh index aa3d2b88..4de6487b 100755 --- a/test-case/check-sof-logger.sh +++ b/test-case/check-sof-logger.sh @@ -148,6 +148,11 @@ reload_drivers() main() { + if is_zephyr; then + disable_kernel_check_point + skip_test "The SOF logger does not work with Zephyr yet, see issue #4420" + fi + reload_drivers run_loggers || diff --git a/test-case/check-xrun-injection.sh b/test-case/check-xrun-injection.sh index a95a351a..35acc279 100755 --- a/test-case/check-xrun-injection.sh +++ b/test-case/check-xrun-injection.sh @@ -96,7 +96,7 @@ do xrun_injection="/proc/asound/card0/$pcm/sub0/xrun_injection" # check xrun injection file - [[ ! -e $xrun_injection ]] && dloge "XRUN DEBUG is not enabled in kernel, skip the test." && exit 2 + [[ ! -e $xrun_injection ]] && skip_test "XRUN DEBUG is not enabled in kernel, skip the test." dlogi "Testing: test xrun injection on PCM:$pcm,$pipeline_type. Interval time: $interval" dlogc "$cmd -D$dev -r $rate -c $channel -f $fmt $dummy_file -q" $cmd -D$dev -r $rate -c $channel -f $fmt $dummy_file -q &