You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] multiple-pause-resume misses failure due to random wait times #694
BTW both bash and expect have wait $pid commands to check the exit status of aplay / arecord commands. We should use wait every time some command is in the background, example in bash:
timeout -k 5 12 aplay -d 10 -bla -blah & aplayPID=$!# do other thingswait$aplayPID|| die "aplay ... failed"# or just set -e, see #312
It's "green failure crime" to ignore the exit status of audio commands in an audio test suite!
See help wait, man timeout and sof-test/test-case/check-volume-levels.sh for an example.
expressions such as "set sleep_t [expr int([expr rand() * $rnd_range]) + $rnd_min ]" should be used to fuzz the sleep duration.
For CI we do want the sleep times to be a predictable pattern with a known/controlled seed that's reset to the same value every time the script is run.
@plbossart on the one hand, using a known seed will be good because the wait times will be pre-determined. But on the other hand, if this known seed causes the failure to be missed, we will always miss this. The problem I pointed out is because of the difference in behaviour when one DMIC PCM is stopped while the other is paused/unpaused. I feel like there's no point is randomizing the wait time at all.
BTW both bash and expect have wait $pid commands to check the exit status of aplay / arecord commands. We should use wait every time some command is in the background,
Just filed Collect exit status of (aplay) commands started in the background#702
Activity
marc-hb commentedon Jun 7, 2021
BTW both
bashandexpecthavewait $pidcommands to check the exit status ofaplay/arecordcommands. We should usewaitevery time some command is in the background, example in bash:It's "green failure crime" to ignore the exit status of audio commands in an audio test suite!
See
help wait,man timeoutandsof-test/test-case/check-volume-levels.shfor an example.See also #312
ranj063 commentedon Jun 7, 2021
thesofproject/sof#4304 should have been caught earlier with this test
plbossart commentedon Jun 8, 2021
expressions such as "set sleep_t [expr int([expr rand() * $rnd_range]) + $rnd_min ]" should be used to fuzz the sleep duration.
For CI we do want the sleep times to be a predictable pattern with a known/controlled seed that's reset to the same value every time the script is run.
Different requirements -> different solutions.
marc-hb commentedon Jun 8, 2021
Control uses of rand() in test scripts#301plbossart commentedon Jun 8, 2021
Can't believe it's been nearly a year since we discussed this random seed thing...
ranj063 commentedon Jun 8, 2021
@plbossart on the one hand, using a known seed will be good because the wait times will be pre-determined. But on the other hand, if this known seed causes the failure to be missed, we will always miss this. The problem I pointed out is because of the difference in behaviour when one DMIC PCM is stopped while the other is paused/unpaused. I feel like there's no point is randomizing the wait time at all.
marc-hb commentedon Jun 8, 2021
The explanation is here:
marc-hb commentedon Jun 10, 2021
Just filed
Collect exit status of (aplay) commands started in the background#702marc-hb commentedon Mar 15, 2024
Should resurrect: