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

Enabled accept errors in net-sim testing #3668

Merged
merged 11 commits into from Mar 18, 2022
Merged

Conversation

coot
Copy link
Contributor

@coot coot commented Mar 16, 2022

Fixes #3315

  • ouroboros-network-framework: added todo
  • sim-net: removed IOErrThrowOrReturn as an abstraction leak
  • sim-net: reset channel when accept errors
  • net-sim: added abiAcceptFailure
  • net-sim: refactor TestError
  • net-sim: fix prop_connect_to_accepting_socket
  • Fixed some typos

Copy link
Contributor

@bolt12 bolt12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@coot coot force-pushed the coot/test-accept-errors branch 2 times, most recently from db16632 to 5528e75 Compare March 17, 2022 08:49
coot added 11 commits March 17, 2022 09:50
`toBearerInfo` should be defined in the same module as 'AbsBearerInfo'.
`IOErrThrowOrReturn` was used to instruct the `accept` call to either
throw or return an exception. However, the implementation of a snocket's
`accept` has to guarantee that the lower level `accept` call (e.g. OS)
has proper exception handling which guarantees that all thrown
exceptions are caught.  For this reason we should not instruct the
`net-sim` implementation to leak exceptions and throw them but always
return them.
The simulation needs to reset the channel if an exception is returned by
the accept call or we will leak a socket.
This allows us to include 'biAcceptFailure' field of 'BearerInfo'.
The property should not fail when it's expected to fail, e.g. when
'abiAcceptFailure' is provided, 'accept' call is expected to throw an
exception.
`cmTracer` and `inboundTracer` were mismatched.
`mkConnection` returns a pair of channels: local -> remote and remote ->
local.  The second one had misconfigured connection id, resulting in
confusing log messages.
@coot
Copy link
Contributor Author

coot commented Mar 17, 2022

@bolt12 I removed the commit 8c6ed3d, I realised that it is not only harmful but also not needed at all.

@coot
Copy link
Contributor Author

coot commented Mar 18, 2022

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Mar 18, 2022

Build succeeded:

@iohk-bors iohk-bors bot merged commit 818845b into master Mar 18, 2022
@iohk-bors iohk-bors bot deleted the coot/test-accept-errors branch March 18, 2022 08:44
coot added a commit that referenced this pull request May 16, 2022
3668: Enabled accept errors in net-sim testing r=coot a=coot

Fixes #3315

- ouroboros-network-framework: added todo
- sim-net: removed IOErrThrowOrReturn as an abstraction leak
- sim-net: reset channel when accept errors
- net-sim: added abiAcceptFailure
- net-sim: refactor TestError
- net-sim: fix prop_connect_to_accepting_socket
- Fixed some typos


Co-authored-by: Marcin Szamotulski <coot@coot.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prop_multinode_Sim: in presence of accept IO errors
2 participants