Zephyr Course 2026 by iomico
Homework
Task 1
Fill in the 7 stub ZTEST bodies in test_ring_buf.c — module under test: ring_buf, a circular FIFO buffer:
ring_buf_init: 1 test — reinit clears statering_buf_push_pop: 3 tests — single push/pop, FIFO order, full buffer pushring_buf_boundaries: 3 tests — peek non-consuming,pop(NULL),is_fullafter fill
Verify all 8 tests pass:
west twister -T tests/ring_buf -p native_sim
Commit implemented tests and push tag: l8-task1.
Task 2
Run the coverage report focused on the ring_buf module:
Open
twister-out/coverage/index.htmland verify the expected coverage numbers (lines ≥81%, functions 100%, branches ≥64%)
Include the
twister-out/coverage/directory in the commit
Push tag: l8-task2
Resourses