From 635ee815e998460b50e23518304c3caf157179cc Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Wed, 30 Jun 2021 16:32:48 -0700 Subject: [PATCH 1/3] lib.sh: simplify is_zephyr() Less is more. Signed-off-by: Marc Herbert --- case-lib/lib.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/case-lib/lib.sh b/case-lib/lib.sh index c15633d5..bfffa83e 100644 --- a/case-lib/lib.sh +++ b/case-lib/lib.sh @@ -357,12 +357,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() From 2b206099cf4e92bd2ca7b60a72d40e7ad19088f9 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Wed, 30 Jun 2021 16:42:22 -0700 Subject: [PATCH 2/3] Add new skip_test() function and use it "exit 2" was not very intuitive Signed-off-by: Marc Herbert --- case-lib/lib.sh | 7 +++++++ test-case/check-runtime-pm-double-active.sh | 2 +- test-case/check-runtime-pm-status.sh | 2 +- test-case/check-xrun-injection.sh | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/case-lib/lib.sh b/case-lib/lib.sh index bfffa83e..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; 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-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 & From f72e2976a61e3abe969ca0e5eb84d54250c728a3 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Wed, 30 Jun 2021 16:48:34 -0700 Subject: [PATCH 3/3] check-sof-logger: SKIP test if is_zephyr() See https://github.com/thesofproject/sof/issues/4420 Signed-off-by: Marc Herbert --- test-case/check-sof-logger.sh | 5 +++++ 1 file changed, 5 insertions(+) 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 ||