From c7436583f2037955c44c2b3b2a670548d91549d7 Mon Sep 17 00:00:00 2001 From: Fred Oh Date: Fri, 14 Apr 2023 13:34:27 -0700 Subject: [PATCH 1/3] test-case: rename pause-resume to pause-release resume term leads to confusion with system resume. Nothing to do with system suspend/resume test. pause-release is more clear. Signed-off-by: Fred Oh --- ...pause-resume.sh => check-pause-release.sh} | 12 ++++---- ...se-resume.sh => multiple-pause-release.sh} | 28 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) rename test-case/{check-pause-resume.sh => check-pause-release.sh} (93%) rename test-case/{multiple-pause-resume.sh => multiple-pause-release.sh} (88%) diff --git a/test-case/check-pause-resume.sh b/test-case/check-pause-release.sh similarity index 93% rename from test-case/check-pause-resume.sh rename to test-case/check-pause-release.sh index 170aff75..848501f4 100755 --- a/test-case/check-pause-resume.sh +++ b/test-case/check-pause-release.sh @@ -3,16 +3,16 @@ set -e ## -## Case Name: check-pause-resume +## Case Name: check-pause-release ## Preconditions: ## N/A ## Description: -## playback/capture on each pipeline and feak pause/resume with expect +## playback/capture on each pipeline and trigger pause/release with expect ## expect sleep for sleep time then mocks spacebar keypresses ' ' to -## cause resume action +## cause release action ## Case step: ## 1. aplay/arecord on PCM -## 2. use expect to fake pause/resume +## 2. use expect to trigger pause/release ## Expect result: ## no error happen for aplay/arecord ## @@ -26,7 +26,7 @@ OPT_HAS_ARG['t']=1 OPT_VAL['t']="$TPLG" OPT_NAME['m']='mode' OPT_DESC['m']='test mode' OPT_HAS_ARG['m']=1 OPT_VAL['m']='playback' -OPT_NAME['c']='count' OPT_DESC['c']='pause/resume repeat count' +OPT_NAME['c']='count' OPT_DESC['c']='pause/release repeat count' OPT_HAS_ARG['c']=1 OPT_VAL['c']=10 OPT_NAME['f']='file' OPT_DESC['f']='file name' @@ -109,7 +109,7 @@ expect { } "*PAUSE*" { set sleep_t [expr int([expr rand() * $rnd_range]) + $rnd_min ] - puts "\r(\$i/$repeat_count) Wait for \$sleep_t ms before resume" + puts "\r(\$i/$repeat_count) Wait for \$sleep_t ms before release" send " " after \$sleep_t incr i diff --git a/test-case/multiple-pause-resume.sh b/test-case/multiple-pause-release.sh similarity index 88% rename from test-case/multiple-pause-resume.sh rename to test-case/multiple-pause-release.sh index 598990b7..a15ed8f9 100755 --- a/test-case/multiple-pause-resume.sh +++ b/test-case/multiple-pause-release.sh @@ -3,18 +3,18 @@ set -e ## -## Case Name: Run multiple pipeline for pause resume +## Case Name: Run multiple pipeline for pause release ## Preconditions: ## N/A ## Description: -## pickup multiple pipline to do pause resume -## fake pause/resume with expect +## pickup multiple pipline to do pause release +## trigger pause/release with expect ## expect sleep for sleep time then mocks spacebar keypresses ' ' to -## cause resume action +## cause release action ## Case step: ## 1. run 1st pipeline ## 2. pickup any other pipeline -## 3. use expect to fake pause/resume in each pipeline +## 3. use expect to trigger pause/release in each pipeline ## 4. go through with tplg file ## Expect result: ## no errors occur for either process @@ -32,14 +32,14 @@ OPT_HAS_ARG['l']=1 OPT_VAL['l']=5 OPT_NAME['c']='count' OPT_DESC['c']='combine test pipeline count' OPT_HAS_ARG['c']=1 OPT_VAL['c']=2 -OPT_NAME['r']='repeat' OPT_DESC['r']='pause resume repeat count' +OPT_NAME['r']='repeat' OPT_DESC['r']='pause release repeat count' OPT_HAS_ARG['r']=1 OPT_VAL['r']=5 -# pause/resume interval will be a random value bounded by the min and max values below -OPT_NAME['i']='min' OPT_DESC['i']='pause/resume transition min value, unit is ms' +# pause/release interval will be a random value bounded by the min and max values below +OPT_NAME['i']='min' OPT_DESC['i']='pause/release transition min value, unit is ms' OPT_HAS_ARG['i']=1 OPT_VAL['i']='20' -OPT_NAME['a']='max' OPT_DESC['a']='pause/resume transition max value, unit is ms' +OPT_NAME['a']='max' OPT_DESC['a']='pause/release transition max value, unit is ms' OPT_HAS_ARG['a']=1 OPT_VAL['a']='50' OPT_NAME['s']='sof-logger' OPT_DESC['s']="Open sof-logger trace the data will store at $LOG_ROOT" @@ -101,7 +101,7 @@ do done [[ ${#pipeline_combine_lst[@]} -eq 0 ]] && dlogw "pipeline combine is empty" && exit 2 -func_pause_resume_pipeline() +func_pause_release_pipeline() { local idx=${pipeline_idx_lst[$1]} cmd=${cmd_idx_lst[$1]} file=${file_idx_lst[$1]} local channel; channel=$(func_pipeline_parse_value "$idx" channel) @@ -128,7 +128,7 @@ expect { } "*PAUSE*" { set sleep_t [expr int([expr rand() * $rnd_range]) + $rnd_min ] - puts "\r(\$i/$repeat_count) pcm'$pcm' cmd'$cmd' id'$idx': Wait for \$sleep_t ms before resume" + puts "\r(\$i/$repeat_count) pcm'$pcm' cmd'$cmd' id'$idx': Wait for \$sleep_t ms before release" send " " after \$sleep_t incr i @@ -154,7 +154,7 @@ do declare -a pid_lst for idx in $pipeline_combine_str do - func_pause_resume_pipeline "$idx" + func_pause_release_pipeline "$idx" pid_lst=("${pid_lst[@]}" $!) done # wait for expect script finished @@ -176,7 +176,7 @@ do exit 1 fi # now check for all expect quit status - # dump the pipeline combine, because pause resume will have too many operation log + # dump the pipeline combine, because pause release will have too many operation log for idx in $pipeline_combine_str do pipeline_index=${pipeline_idx_lst[$idx]} @@ -188,7 +188,7 @@ do do wait "$pid" || { sof-kernel-log-check.sh "$KERNEL_CHECKPOINT" || true - die "pause resume PID $pid had non-zero exit status" + die "pause release PID $pid had non-zero exit status" } done done From e5f7ac1c5683407cd7bb202acd9d2aafbeef7771 Mon Sep 17 00:00:00 2001 From: Fred Oh Date: Mon, 17 Apr 2023 14:43:42 -0700 Subject: [PATCH 2/3] test-case: add symbolic link for pause-resume tests To support backward compatibility, keep the symbolic link for the time being. check-pause-resume.sh -> check-pause-release.sh multiple-pause-resume.sh -> multiple-pause-release.sh Signed-off-by: Fred Oh --- test-case/check-pause-resume.sh | 1 + test-case/multiple-pause-resume.sh | 1 + 2 files changed, 2 insertions(+) create mode 120000 test-case/check-pause-resume.sh create mode 120000 test-case/multiple-pause-resume.sh diff --git a/test-case/check-pause-resume.sh b/test-case/check-pause-resume.sh new file mode 120000 index 00000000..686bf7bf --- /dev/null +++ b/test-case/check-pause-resume.sh @@ -0,0 +1 @@ +check-pause-release.sh \ No newline at end of file diff --git a/test-case/multiple-pause-resume.sh b/test-case/multiple-pause-resume.sh new file mode 120000 index 00000000..8b47d5e1 --- /dev/null +++ b/test-case/multiple-pause-resume.sh @@ -0,0 +1 @@ +multiple-pause-release.sh \ No newline at end of file From e577e283dd8882a59263d5b86218e9b0049238e9 Mon Sep 17 00:00:00 2001 From: Fred Oh Date: Thu, 20 Apr 2023 15:03:35 -0700 Subject: [PATCH 3/3] run-all-test: rename pause-resume to pause-release Renamed pause-resume to pause-release. Ref link: https://github.com/thesofproject/sof-test/pull/1025 Signed-off-by: Fred Oh --- test-case/run-all-tests.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test-case/run-all-tests.sh b/test-case/run-all-tests.sh index 0b3d7dba..b005b1e1 100755 --- a/test-case/run-all-tests.sh +++ b/test-case/run-all-tests.sh @@ -32,8 +32,8 @@ capture_d1l100r1 playback_d1l1r50 capture_d1l1r50 speaker -pause-resume-playback -pause-resume-capture +pause-release-playback +pause-release-capture volume signal-stop-start-playback signal-stop-start-capture @@ -42,7 +42,7 @@ xrun-injection-capture simultaneous-playback-capture multiple-pipeline-playback multiple-pipeline-capture -multiple-pause-resume +multiple-pause-release kmod-load-unload kmod-load-unload-after-playback suspend-resume @@ -227,13 +227,13 @@ test_speaker() { "$mydir"/test-speaker.sh -l "$medium_loop" } -test_pause-resume-playback() +test_pause-release-playback() { - "$mydir"/check-pause-resume.sh -c "$large_count" -m playback + "$mydir"/check-pause-release.sh -c "$large_count" -m playback } -test_pause-resume-capture() +test_pause-release-capture() { - "$mydir"/check-pause-resume.sh -c "$large_count" -m capture + "$mydir"/check-pause-release.sh -c "$large_count" -m capture } test_volume() { @@ -271,9 +271,9 @@ test_multiple-pipeline-capture() { "$mydir"/multiple-pipeline-capture.sh -l "$medium_loop" } -test_multiple-pause-resume() +test_multiple-pause-release() { - "$mydir"/multiple-pause-resume.sh -l "$small_loop" -r 25 + "$mydir"/multiple-pause-release.sh -l "$small_loop" -r 25 } test_kmod-load-unload() {