-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
Describe the bug
video_closest_frmival()
is expecting the driver to increment fie.index
. This is not the correct API and having this in video_common.c
and video_emul_imager.c
is misleading. The tests is also wrong.
To Reproduce
The CI passes while it should fail as the test is testing the wrong thing:
zephyr/tests/drivers/video/api/src/video_emul.c
Lines 84 to 86 in 493be79
/* Do a first enumeration of frame intervals, expected to work */ | |
zexpect_ok(video_enum_frmival(imager_dev, VIDEO_EP_OUT, &fie)); | |
zexpect_equal(fie.index, 1, "fie's index should increment by one at every iteration"); |
Expected behavior
The driver does not increment fie.index
, the caller does.
Impact
No public code currently uses it, but developers building new code will be confused.
Logs and console output
Environment (please complete the following information):
CI
Additional context
A PR to fix it is already proposed here:
But only one commit out of it is for the actual fix and can be split: