Repin the two backends, which fixed a defect this suite could not see - #21
Merged
Conversation
… suite could not see
openkal-linux 0.7.1 and openkal-macos 0.6.1 correct `kal_timeout_read` and
`kal_timeout_write`, which decoded a borrowed `kal_stream` handle with the
decoder for an owned one and so waited upon the descriptor below the one they
transferred upon.
Five lines: `README.md`, `examples/portable/mcpp.toml` and `kit/mcpp.toml`. What
a reader copies first is the line in a README, and these had to move with the
release rather than after it.
--- and the suite could not have caught it ----------------------------------
`conformance/src/sections/timeout.cpp` states three observations and each is a
disjunction that the defect satisfies:
r >= 0 || r == -kal_err_again || r == -kal_err_not_supported
A bounded read of the standard input is permitted to expire, so an
implementation that expires because it waited on the wrong object is
indistinguishable there from one that is right. That is not an oversight in
those lines -- there is no stream the suite can be sure has bytes waiting, and
inventing one requires an interface the section does not import.
Both backends now carry the observation in their own suites, where a channel can
be made: sixteen channels, each written to, each read with a bound, and the
count reported. Whether the suite here should gain the same observation --
`openkal.process` is optional, so it would have to be conditional -- is left to
a change of its own rather than folded into a repin.
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.
openkal-linux 0.7.1 and openkal-macos 0.6.1 correct
kal_timeout_readandkal_timeout_write, which decoded a borrowedkal_streamhandle withokl::unpack/okm::unpack— the decoder for an owned handle. Those backends pack an owned handle as(generation << 32) | (fd + 1), so a bare descriptorNhas exactly the shape of a packed handle namingN-1and the decode succeeded. The wait was performed upon descriptorN-1and the transfer uponN.Five lines here:
README.md,examples/portable/mcpp.toml,kit/mcpp.toml. What a reader copies first is the line in a README, and these move with the release rather than after it.And the suite could not have caught it
conformance/src/sections/timeout.cppstates three observations of the two operations, and each is a disjunction the defect satisfies:A bounded read of the standard input is permitted to expire, so an implementation that expires because it waited upon the wrong object is indistinguishable here from one that is right.
That is not carelessness in those lines. The section imports
openkal.streamandopenkal.timeoutand nothing else, and there is no stream it can be sure has bytes waiting — so the honest observation is not expressible with what it has.Both backends now carry it in their own suites, where a channel can be made: sixteen channels, each written to, each read with a bound, and the count reported rather than the first failure. Measured against the old implementation,
0 of 16 bounded reads transferred.Whether this suite should gain the same observation is left to a change of its own. It would have to import
openkal.processand be conditional on it, since that interface is optional, and folding an optional-interface question into a repin would make both harder to review.Index entries: mcpplibs/mcpp-index#283.