Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a functional host/test mock of pico/util/queue.h (intended to support FTP-related tests) and updates shared typedefs to provide a compatible queue_t definition outside pico-sdk builds.
Changes:
- Implement a simple ring-buffer queue mock (init/add/remove/peek/full/empty/level) with heap-backed storage.
- Add
queue_free()to release mock queue memory. - Expand the host/test
queue_tplaceholder intypedefs.hfrom a dummy byte to a real struct layout.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/test_mocks/pico/util/queue.h | Implements a heap-backed ring-buffer queue for host tests. |
| src/common/typedefs.h | Updates queue_t (and related typedef gating) for non-pico-sdk builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
devYaoYH
approved these changes
Apr 2, 2026
Contributor
devYaoYH
left a comment
There was a problem hiding this comment.
Looks good, let's just clarify pico-sdk's naming in the struct. (element_size, count, level)
…-software into mocks/add-queue-mock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We need a queue mock for tests, specifically related to FTP. This is a simple queue to stand in for pico-sdk's version. Note that pico-sdk's version is thread-safe, but we do not have that here.