-
Notifications
You must be signed in to change notification settings - Fork 109
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
[RFC] Introduce a new ownership design for libtock_unittest
.
#355
Merged
Conversation
This file contains 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
Previously, `libtock_unittest` made use of thread local storage (as well as plentiful use of `Rc`) to support `libtock_platform`'s asynchronous API traits smoothly. However, [those traits were removed](tock#353), allowing us to simplify `libtock_unittest`'s design. This PR deletes the previous design doc titled "Fake Kernel Ownership" and replaces it with a new document that presents a simpler, more-efficient design. I would like to refactor `libtock_unittest` to use this new design, as I believe it will decrease the maintenance burden. As a side benefit, it will improve the effectiveness of fuzzing (by making the tests execute faster) if we add fuzzing in the future. [Rendered](https://www.github.com/jrvanwhy/libtock-rs/tree/unittest-ownership/doc/UnitTestOwnership.md)
jrvanwhy
added
the
significant
Indicates a PR is significant as defined by the code review policy.
label
Jan 12, 2022
hudson-ayers
approved these changes
Jan 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable to me
alistair23
approved these changes
Jan 16, 2022
bors r+ |
hudson-ayers
pushed a commit
that referenced
this pull request
Feb 3, 2022
The only major change from upstream that this preserves is customized external assembly linkage. This should be mostly removed once libtock switches to using `global_asm!` - now that that will be stabilized. This CL is a squash merge of the following commits: 28ebb70 Merge #365 a0440ba Merge #370 abff51c Merge #359 85242dc Merge #364 f1bd0d4 Merge #361 b0f8593 Merge #355 4c7ecb6 Merge #358 6f8b512 Merge #356 73cbbde Merge #357 022984f Merge #353 b2e6471 Merge #352 9eb12c0 Merge #351 This was retrieved with the following command: ``` git log ti50-internal/upstream/master --not \ $(git merge-base --all ti50-internal/upstream/master m/main) \ --first-parent ``` BUG=None TEST=ti50/common make build SOURCE=UPSTREAM(28ebb70) Change-Id: I0aa1606f407a0b4bcf0c76b62261414903479092
jrvanwhy
added a commit
to jrvanwhy/libtock-rs
that referenced
this pull request
Jun 17, 2022
As described in tock#355, I intend to remove the use of thread-local storage in `libtock_unittest`. That requires giving `fake::SyscallDriver` implementations a reference that allows them to schedule upcalls. This PR adds that reference, and updates the `fake::SyscallDrivers` to use it.
jrvanwhy
added a commit
to jrvanwhy/libtock-rs
that referenced
this pull request
Jun 17, 2022
As described in tock#355, I intend to remove the use of thread-local storage in `libtock_unittest`. That requires giving `fake::SyscallDriver` implementations a reference that allows them to schedule upcalls. This PR adds that reference, and updates the `fake::SyscallDrivers` to use it.
jrvanwhy
added a commit
to jrvanwhy/libtock-rs
that referenced
this pull request
Jun 17, 2022
As described in tock#355, I intend to remove the use of thread-local storage in `libtock_unittest`. That requires giving `fake::SyscallDriver` implementations a reference that allows them to schedule upcalls. This PR adds that reference, and updates the `fake::SyscallDrivers` to use it.
jrvanwhy
added a commit
to jrvanwhy/libtock-rs
that referenced
this pull request
Jun 17, 2022
As described in tock#355, I intend to remove the use of thread-local storage in `libtock_unittest`. That requires giving `fake::SyscallDriver` implementations a reference that allows them to schedule upcalls. This PR adds that reference, and updates the `fake::SyscallDrivers` to use it.
jrvanwhy
added a commit
to jrvanwhy/libtock-rs
that referenced
this pull request
Jun 17, 2022
As described in tock#355, I intend to remove the use of thread-local storage in `libtock_unittest`. That requires giving `fake::SyscallDriver` implementations a reference that allows them to schedule upcalls. This PR adds that reference, and updates the `fake::SyscallDrivers` to use it.
bors bot
added a commit
that referenced
this pull request
Jun 27, 2022
414: Implement the driver registration API in `doc/UnitTestOwnership.md`. r=jrvanwhy a=jrvanwhy As described in #355, I intend to remove the use of thread-local storage in `libtock_unittest`. That requires giving `fake::SyscallDriver` implementations a reference that allows them to schedule upcalls. This PR adds that reference, and updates the `fake::SyscallDrivers` to use it. Co-authored-by: Johnathan Van Why <[email protected]>
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.
Previously,
libtock_unittest
made use of thread local storage (as well as plentiful use ofRc
) to supportlibtock_platform
's asynchronous API traits smoothly. However, those traits were removed, allowing us to simplifylibtock_unittest
's design.This PR deletes the previous design doc titled "Fake Kernel Ownership" and replaces it with a new document that presents a simpler, more-efficient design. I would like to refactor
libtock_unittest
to use this new design, as I believe it will decrease the maintenance burden. As a side benefit, it will improve the effectiveness of fuzzing (by making the tests execute faster) if we add fuzzing in the future.Rendered