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 NetBSD CI #3965

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

nathaniel-bennett
Copy link
Contributor

@nathaniel-bennett nathaniel-bennett commented Oct 14, 2024

Description

This PR adds NetBSD to the CI for both stable and MSRV targets and resolves current build/test failures resulting from NetBSD modules.

Resolves #3890

@rustbot
Copy link
Collaborator

rustbot commented Oct 14, 2024

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Oct 14, 2024

Some changes occurred in OpenBSD module

cc @semarie

Some changes occurred in OpenBSD module

cc @semarie

@nathaniel-bennett
Copy link
Contributor Author

Looks like this assertion in ctest2 fails during the build process for libc-test:
https://github.com/JohnTitor/ctest2/blob/80f9cc420ed2739631f1604f44744107ad10d9a0/src/lib.rs#L2107

Based on context, it looks like some variadic function in the NetBSD module is tripping up the testing harness. I'm willing to bet it's esetfunc:
https://github.com/rust-lang/libc/blob/fbec9289b33627d03b72701a296095c9e91354fd/src/unix/bsd/netbsdlike/netbsd/mod.rs#L2953C1-L2955C72

...as it's the only function in the entirety of the libc crate that passes a variadic function as a parameter.

Potential solutions:

  1. Refactor ctest2 to handle variadic functions as parameters.
  2. Configure build.rs to ignore esetfunc until (1.) is accomplished.

I've gone ahead and opted for 2. at the moment, since I have no experience with the ctest2 crate and wouldn't be able to perform that refactor.

@nathaniel-bennett
Copy link
Contributor Author

It appears that adding an exception to the libc-test/build.rs script doesn't fix this assertion; removing esetfunc from semver/netbsd.txt similarly fails to fix the issue.

I've temporarily opted to remove the esetfunc function entirely to get past that build error and see if the rest of CI works as normal; obviously this is a breaking change, so we may want to fix ctest2 and re-add it before 1.0 is released.

@nathaniel-bennett
Copy link
Contributor Author

Source for changing sendmmsg/recvmmsg flags parameter from int to unsigned int:

https://github.com/NetBSD/src/blob/da7ff22a4ae89b32ca9e90ca20e7d0d434e8cdd2/sys/sys/socket.h#L651-L654

@nathaniel-bennett
Copy link
Contributor Author

Documentation on kevent now using a void pointer for its udata field:

https://github.com/NetBSD/src/blob/da7ff22a4ae89b32ca9e90ca20e7d0d434e8cdd2/sys/sys/event.h#L66

@nathaniel-bennett
Copy link
Contributor Author

Documentation that uucred using a short type instead of an int for its cr_ngroups field:

https://github.com/NetBSD/src/blob/da7ff22a4ae89b32ca9e90ca20e7d0d434e8cdd2/sys/sys/ucred.h#L48

@nathaniel-bennett
Copy link
Contributor Author

Documentation that sockaddr_dl uses a separate dl_addr struct with an address field of 24 bytes, not 12:

https://github.com/NetBSD/src/blob/da7ff22a4ae89b32ca9e90ca20e7d0d434e8cdd2/sys/net/if_dl.h#L66-L91

@nathaniel-bennett
Copy link
Contributor Author

Documentation of correct utmpx fields (thereby removing incomplete type __exit_status):

https://github.com/NetBSD/src/blob/da7ff22a4ae89b32ca9e90ca20e7d0d434e8cdd2/include/utmpx.h#L103-L118

@nathaniel-bennett
Copy link
Contributor Author

Looks like there are a ton of CI failures scattered across the NetBSD module--too many for me to try to resolve at the moment. I'll try to knock out some more later this week in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add NetBSD to CI
3 participants