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

Skip network tests when network is unavailable #275

Open
talex5 opened this issue Aug 9, 2022 · 7 comments
Open

Skip network tests when network is unavailable #275

talex5 opened this issue Aug 9, 2022 · 7 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@talex5
Copy link
Collaborator

talex5 commented Aug 9, 2022

The network tests can't be run in some cases:

  • Docker containers don't have IPv6 loopback by default.
  • opam-repo-ci's sandbox on macos prevents using any loopback devices.

This is probably best done by extending MDX. We could perhaps have an exception Mdx_skip_block to indicate that the current block's output should be ignored, or a skip-if=TEST label at the top of the block.

From #274.

@create2000
Copy link
Contributor

Hello, @talex5 @patricoferris -- Is this issue still open?

@talex5
Copy link
Collaborator Author

talex5 commented Oct 21, 2024

Yes. This would be a good first step: realworldocaml/mdx#393

@create2000
Copy link
Contributor

Thank you @talex5 -- I'll have to wait for @patricoferris to assign me the issue.

@patricoferris
Copy link
Collaborator

Assigned :))

@create2000
Copy link
Contributor

Hello @talex5 and @patricoferris -- A couple of clarifications are needed. I have been trying understand where to begin from. Since it talks of network tests and extending the MDX, I want to be sure if it's the network.md file i am to work with. Also, I would appreciate directions to any link where i can read more on MDX and to know how best to impement the skip network logic. Thanks

@talex5
Copy link
Collaborator Author

talex5 commented Oct 23, 2024

To get started, you can try running the tests under Docker, using the Dockerfile in the repository. e.g.

docker build . -t eio
docker run -it --rm eio
opam install --deps-only -t eio_main eio_linux eio_posix eio
make

I just tried this, and it seems that Docker does provide IPv6 now (at least on the loopback interface). However, it now blocks uring:

$ dune runtest ./lib_eio_linux/tests/
...
@@ -133,6 +129,5 @@ Signalling an exited child does nothing:
   in
   ignore (Promise.await (Process.exit_status child) : Unix.process_status);
   Process.signal child Sys.sigkill;;
-FOO=bar
-- : unit = ()
+Exception: Failure "io_uring is not available (permission denied)".

So probably the tests will need changing to Eio_linux.run ~fallback:skip, where skip raises some Mdx_skip exception.

Note: this is marked "good first issue" as it doesn't require much knowledge of Eio and the changes needed here are simple. However, adding the skip feature to MDX might be more difficult!

@create2000
Copy link
Contributor

Hello @patricoferris -- I am making my Outreachy final application and I am asked to create a project timeline. Following the Project details, I came up with a timeline. I want to share it with you so if there's any correction before I submit, or something you want me to insert or remove. Here's the link: https://docs.google.com/document/d/108a5nU0J9Z2tFIUR09lwPmwww4796qpFVx3nZNSKilc/edit?usp=drivesdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants