Skip to content

tests: expect avail_min to default to period_size - #284

Open
slyon wants to merge 1 commit into
tinyalsa:masterfrom
slyon:fix-avail-min-default
Open

slyon wants to merge 1 commit into
tinyalsa:masterfrom
slyon:fix-avail-min-default

Conversation

@slyon

@slyon slyon commented Oct 27, 2026

Copy link
Copy Markdown

Since commit 5a2ae9c ("pcm: fix for mmap usecase"), pcm_open() sets pcm->config.avail_min to the period size if the caller passed 0. The PcmOutTest fixture's kDefaultConfig still leaves avail_min at 0, so PcmOutTest.GetConfig, which memcmp()s the config returned by pcm_get_config() against kDefaultConfig, always fails. Set avail_min explicitly to the value pcm_open() would pick anyway, which doesn't change the behaviour of any other test using this fixture.

Since commit 5a2ae9c ("pcm: fix for mmap usecase"), pcm_open() sets
pcm->config.avail_min to the period size if the caller passed 0. The
PcmOutTest fixture's kDefaultConfig still leaves avail_min at 0, so
PcmOutTest.GetConfig, which memcmp()s the config returned by
pcm_get_config() against kDefaultConfig, always fails. Set avail_min
explicitly to the value pcm_open() would pick anyway, which doesn't change
the behaviour of any other test using this fixture.

Signed-off-by: Lukas Märdian <lukas.maerdian@oss.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant