Skip to content

Commit 6845681

Browse files
author
Erdem Simsek
committed
[nrf fromtree] tests: drivers: Trigger drop event for proper clean-up
Add I2S_TRIGGER_DROP call in the error test to ensure proper cleanup after stopping the I2S device. This validates that the drop trigger is properly handled in error conditions and resources are released. Signed-off-by: Erdem Simsek <[email protected]> (cherry picked from commit aec9da060b93d8c9e039233cc75d695d0eb8d007)
1 parent d68571f commit 6845681

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/drivers/i2s/i2s_api/src/test_i2s_errors.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ ZTEST_USER(i2s_errors, test_i2s_config_attempt_in_wrong_state)
7676
err = i2s_trigger(dev_i2s, I2S_DIR_TX, I2S_TRIGGER_STOP);
7777
zassert_equal(err, 0, "I2S_TRIGGER_STOP unexpected error: %d", err);
7878

79+
err = i2s_trigger(dev_i2s, I2S_DIR_TX, I2S_TRIGGER_DROP);
80+
zassert_equal(err, 0, "I2S_TRIGGER_DROP unexpected error: %d", err);
81+
7982
zassert_not_equal(
8083
config_err, 0,
8184
"I2S configuration should not be possible in states other than I2S_STATE_READY");

0 commit comments

Comments
 (0)