diff --git a/tools/test/qa/tests/stability_test/sim.sh b/tools/test/qa/tests/stability_test/sim.sh new file mode 100755 index 000000000000..284af36e569b --- /dev/null +++ b/tools/test/qa/tests/stability_test/sim.sh @@ -0,0 +1,30 @@ +aplay -Dhw:0,1 -f dat -c 2 /dev/zero & +# Get its PID +PID_1=$! + +arecord -Dhw:0,1 -f dat -c 2 /dev/null & +# Get its PID +PID_2=$! + +aplay -Dhw:0,0 -f dat -c 2 /dev/zero & +# Get its PID +PID_3=$! + +# Wait for 5 seconds +sleep 5 +# Kill them +kill $PID_1 +RET_1=$? +kill $PID_2 +RET_2=$? +kill $PID_3 +RET_3=$? + +if [ $RET_1 -ne 0 ] || [ $RET_2 -ne 0 ] || [ $RET_3 -ne 0 ] +#if [ $RET_1 -ne 0 ] || [ $RET_2 -ne 0 ] +then + echo "stopping failed!" + exit -1 +else + exit 0 +fi diff --git a/tools/test/qa/tests/stability_test/stress_sim.sh b/tools/test/qa/tests/stability_test/stress_sim.sh new file mode 100755 index 000000000000..46da9b6fcb7e --- /dev/null +++ b/tools/test/qa/tests/stability_test/stress_sim.sh @@ -0,0 +1,12 @@ +i=0 +MAXLOOPS=1000 +while [ $i -lt $MAXLOOPS ]; do + echo "iterate $i ..." + ./sim.sh + if [ $? -eq 0 ]; then + let i+=1 + else + exit 1 + fi + sleep 1 +done