Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtio: Callback chaining and testing #72765

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

teburd
Copy link
Collaborator

@teburd teburd commented May 14, 2024

Callbacks were a bit neglected in terms of test coverage, especially when used in chains. It was clear from the code that chained callbacks may not actually work, and callback ordering then was hard to verify. Test callbacks chained to transactions work as expected.

The test iodev had built up some cruft over time and in the process showed a few bugs once callback chaining was fixed so the test iodev now better matches typical iodev implementations at this point.

Fixes #72740

@zephyrbot zephyrbot requested a review from yperess May 14, 2024 19:48
@teburd teburd requested review from ubieda and MaureenHelm May 14, 2024 19:55
@teburd teburd marked this pull request as draft May 14, 2024 19:57
@teburd
Copy link
Collaborator Author

teburd commented May 14, 2024

Converted back to draft as twister revealed a few issues still on certain platforms

@teburd teburd marked this pull request as ready for review May 14, 2024 20:32
@teburd
Copy link
Collaborator Author

teburd commented May 14, 2024

Update: ok I believe I've corrected the issue, though the behavior is as it was before, I'm wondering if this is the right behavior @yperess

Imagine I have 3 chained submissions and cancel the one in the middle before submit is called, the first one should report success, the next two should be cancelled, should they report anything?

I guess more critically, why is cancelling before submit a special case, can you help clarify this @yperess? Thanks!

Callbacks were a bit neglected in terms of test coverage, especially
when used in chains. It was clear from the code that chained callbacks
may not actually work, and callback ordering then was hard to verify.
Test callbacks chained to transactions work as expected.

The test iodev had built up some cruft over time and in the process
showed a few bugs once callback chaining was fixed so the test iodev now
better matches typical iodev implementations at this point.

Cancellation testing now includes an added case for cancelling a the
second submission in the chain prior to calling submit noting that no
completions notifications should be given back for those.

Signed-off-by: Tom Burdick <[email protected]>
@teburd teburd added the bug The issue is a bug, or the PR is fixing a bug label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: RTIO bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rtio: Possibly missed callback when linking
4 participants