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

Add BSD to CI. #2338

Merged
merged 5 commits into from
Nov 14, 2024
Merged

Add BSD to CI. #2338

merged 5 commits into from
Nov 14, 2024

Conversation

ncruces
Copy link
Collaborator

@ncruces ncruces commented Nov 14, 2024

This adds FreeBSD, OpenBSD, and NetBSD to CI.

The weird regex (imports|sysfs) skips the following packages:

  • internal/sysfs
  • experimental/sysfs
  • imports/assemblyscript
  • imports/assemblyscript/example
  • imports/emscripten
  • imports/wasi_snapshot_preview1
  • imports/wasi_snapshot_preview1/example

Mostly, sysfs and WASI need further work, even on FreeBSD.

I propose we merge this as is, if for no other reason, to ensure no regressions. Later, we can figure out what needs to be fixed/skipped. Most of the issues are WASI details/intricacies.

Instead of using the regex, we should probably skip specific WASI tests. Either based on GOOS, or some supports_X (test?) flags. A bunch of tests fail because of non-portable stat fields; others because of reduced file time resolution; etc.

Users of these OSes that interested in fixing the actual behaviour are encouraged to do so, then whitelist tests.

Also: the fact wazero works and is used in these OSes with little to no complaints suggests these details don't matter that much in actual usage. WASI is complicated, our implementation of it is already very complex. It's also a preview.

@ncruces ncruces requested a review from mathetake as a code owner November 14, 2024 16:46
Signed-off-by: Nuno Cruces <[email protected]>
@mathetake
Copy link
Member

  • internal/integration_test/engine
  • internal/integration_test/fuzzcases

I think we need these two to pass to say the core is working - what's the failing tests in there?

@ncruces
Copy link
Collaborator Author

ncruces commented Nov 14, 2024

A few more notes.

This uses cross-platform-actions/action which in my experience is the best option for these OSes.

I'm planing a follow up PR that uses vmactions for other OSes, but that is a bit slower than these, and adds a bit more infrastructure (we need a templated custom action for a matrix run). We can do DragonFly BSD, illumos and Solaris that way, though.

We can also use cross-platform-actions/action to test arm64. It would be slower (CPU emulation), which compounds with the interpreter for additional overhead.

I am not testing multiple Go versions, nor am I installing a specific Go version; instead, I use the preinstalled GitHub Go version. Both these actions start a VM and rsync stuff into the VM. They don't know what exactly to copy, and they aren't very configurable here. If we install Go, they end up copying the entire local Linux Go installation into the VM for no reason.

@ncruces
Copy link
Collaborator Author

ncruces commented Nov 14, 2024

  • internal/integration_test/engine
  • internal/integration_test/fuzzcases

I think we need these two to pass to say the core is working - what's the failing tests in there?

fuzzcases repeatedly crashes OpenBSD with an out of memory: https://github.com/ncruces/wazero/actions/runs/11840657747/job/32995009277

engine does the same to all 3 OSes (two of the VMs simply die with no error message):
https://github.com/ncruces/wazero/actions/runs/11840579279/job/32994741104

I can try to isolate the test cases. If you have any hints/suspicions, it'd be helpful.

@mathetake
Copy link
Member

ok then we might need to try -short as some cases use incredible amount of memory:

Signed-off-by: Nuno Cruces <[email protected]>
@ncruces
Copy link
Collaborator Author

ncruces commented Nov 14, 2024

Yeah, that fixes it!

(sorry for the additional PR, it was meant to be on my fork, to run CI)

@ncruces
Copy link
Collaborator Author

ncruces commented Nov 14, 2024

Updated the initial comment, for more visibility of the current state of play.

I'd like to highlight this:

Users of these OSes that interested in fixing the actual WASI behaviour are encouraged to do so, then whitelist tests.

They can run the tests locally with make test and fix things much more easily that we can.

Signed-off-by: Nuno Cruces <[email protected]>
Copy link
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

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

Can you reflect the state of OS support in https://github.com/tetratelabs/wazero?tab=readme-ov-file#platform ?

Signed-off-by: Nuno Cruces <[email protected]>
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@mathetake mathetake merged commit c5e90c5 into tetratelabs:main Nov 14, 2024
43 checks passed
@ncruces ncruces deleted the ci branch November 15, 2024 09:57
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.

2 participants