rust-embedded / rust-embedded/embedded-hal-mock
Sub-sequences that don't require any ordering
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 146
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
Currently the "expectations" list for I2C/SPI bus mocks assert an absolute ordering. This is overly restrictive in some cases and locks the test to the process implementation rather than allowing the actual driver requirements to be encoded
Example
An I2C device initialisation that I have goes something like this
- a wakeup/unlock sequence (fixed order)
- transfer of configuration (a number of registers in any order)
- a sleep/lock sequence (fixed order)
With the current crate version, I'm pretty sure my test would have to encode a fixed ordering of operations for that second step. Allowing an unordered set of transactions to occur instead would be beneficial to encode what I actually want to test
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the expectations list and the I2C/SPI mock APIs described in the issue. Define how fixed-order wakeup and sleep sequences can surround an unordered group of configuration transactions, then add coverage showing that the group accepts any order while the surrounding sequences remain ordered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100