-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Describe the bug
Some SOF tests modify machine state by setting controls to some arbitrary values and not resetting them after.
Tests I've detected on a quick look-through:
check-keyword-detection.shsets the volume at 40 and does not seem to reset it after.check-volume-levels.shmodifies a lot ofamixercontrols and should be looked at when handling this issue.volume-basic-test.shcalls thereset_sof_volumefunction rather than the fullset_alsa_settings.- Note that this issue directly had its hand in the FAILs mentioned in this PR.
verify-bootsequence.sh can theoretically mess up the settings if the test crashes, but I'd like to mention it as an example for a possible new approach of a common test runner. Were we to alsactl store -f FILE the machine state before each test and then alsactl restore -f FILE after, we would be able to avoid such issues.
To Reproduce
For example, run volume-basic-test.sh and then a check-alsabat.sh test on a RT712. The latter will currently fail.
Expected behavior
Test leaves the machine in the same state as it was before the test.
Detail Info (for the aforementioned example)
- Branch name and commit hash of the 3 repositories: sof (firmware/topology), linux (kernel driver) and sof-test (test case)
- Kernel: 02394a2ff051
- SOF: 9eed235129cb
- SOF-TEST: 396efce
- Test report ID (if you find it from test report)
- ID: N/A
- Test DUT Model (or a brief describtion about the device)
- MODEL: PTLH_SDW_RT712
- Test TPLG
- TPLG: sof-ptl-rt712-l2-rt1320-l1
- Test case (what test script and how you run it)
- TESTCASE:
TPLG=<topology_dir>/sof-ipc4-tplg/sof-ptl-rt712-l2-rt1320-l1.tplg MODEL=PTLH_SDW_RT712 SOF_TEST_INTERVAL=5 ~/sof-test/test-case/volume-basic-test.sh -l 50, thenTPLG=<topology_dir>/sof-ipc4-tplg/sof-ptl-rt712-l2-rt1320-l1.tplg MODEL=PTLH_SDW_RT712 SOF_TEST_INTERVAL=5 ~/sof-test/test-case/check-alsabat.sh -p hw:sofsoundwire,0 -c hw:sofsoundwire,1 -C 2 -F 599
- TESTCASE: