-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Clean up libc-test/build.rs for FreeBSD and enable testing FreeBSD12 on CI #1346
Conversation
@gnzlbg: no appropriate reviewer found, use r? to override |
@asomers @myfreeweb it appears that EVFILT_EMPTY is not available in FreeBSD 11, but the comment in the build.rs says that the constant was added in that FreeBSD version. Is the comment incorrect? |
Yep, that's wrong https://svnweb.freebsd.org/base?view=revision&revision=312277 |
The title of this PR seems misleading. Tests were never disabled on FreeBSD, were they? It seems like what this PR actually does is enable nightly tests, |
There are many tests for many constants, functions, structs, etc. that were disabled at some point or another. Some of them were disabled in #1337 to unbreak CI. This PR goes through all disabled tests, and re-enables all that can be made to work. |
The latest logs show the failures that occur. Most of them appear upgradeable or easily "ignored". |
Nonetheless, until #570 is fixed we should be targetting FreeBSD 11 (though we can update the image from 11.1 to 11.2). Upgrading the test image to 12.0 will cause a net reduction in test coverage. |
Please revert those latest changes! They'll break all Rust programs on FreeBSD 11. Prior to those changes, Rust could run on both FreeBSD 11 and FreeBSD 12, it just couldn't use some of 12's newer features. |
.cirrus.yml
Outdated
- rustup target add i686-unknown-freebsd | ||
test_script: | ||
- . $HOME/.cargo/env | ||
- sh ci/run.sh i686-unknown-freebsd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that this will fail. Because while FreeBSD amd64 can run i386 binaries, it doesn't include i386 headers, and libc's CI tests need to interrogate those headers. Testing FreeBSD i386 in CI will require an actual i386 environment, either a VM or a jail on an amd64 host.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we would use qemu-user
for this, we need something like that to test aarch64-unknown-freebsd
and friends as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qemu isn't necessary for running i386 binaries on an amd64 host; that capability is builtin. All you need is an i386 jail, or even a chroot. See https://github.com/nix-rust/nix/blob/master/.cirrus.yml for an example of testing i386 binaries for a project that doesn't need headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do need headers, so that .cirrus.yml
does not help much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR can't be merged until the FreeBSD 12-specific changes are reverted, because they'll break Rust on FreeBSD 11.
Not all changes break Rust on FreeBSD 11 (e.g. It would be more useful if you could be more specific about which precise changes break what. |
FWIW "WIP" means work in progress. No need to panic about this getting merged. |
There's no UB here; that's a compiler concept. Currently, using libc on FreeBSD 12 is safe thanks to ELF symbol versioning. For example, libc sets |
Part of re-enabling all FreeBSD tests is figuring out what's broken. The code used to figure out what is broken does not necessarily have to be merged into libc, I don't know how you are jumping to the conclusion that the |
How is the undefined behavior avoided here? |
The |
I don't think there's any UB issues here, since
|
From your comment in the other issue, for |
d1e5373
to
0a953a1
Compare
So @asomers slowly this is taking a finished form, I'd like to hear your feedback. Basically, what I've done is split the freebsd module into two modules, one for freebsd11 and one for freebsd12. The FreeBSD11 is always used by default, and there are no direct options to compile the freebsd12 one. In libc's CI, we define the LIBC_CI env variable, and if that's defined, and the host system is a FreeBSD 12 system, then the freebsd12 module is compiled and tested, which only triggers in the FreeBSD 12 cirrus images. There are some API wise, would it make sense to do something different for |
So our API wrapper for |
67db2d9
to
0840ee1
Compare
Clean up libc-test/build.rs for FreeBSD and enable testing FreeBSD12 on CI
💔 Test failed - checks-travis |
@bors: retry |
Clean up libc-test/build.rs for FreeBSD and enable testing FreeBSD12 on CI
💔 Test failed - checks-travis |
@bors: r+ |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 7437d0a has been approved by |
Clean up libc-test/build.rs for FreeBSD and enable testing FreeBSD12 on CI
💥 Test timed out |
@bors: retry |
Clean up libc-test/build.rs for FreeBSD and enable testing FreeBSD12 on CI
For some reason bors does not like this PR. It runs green on all CI, but then bors fails to receive the notification that everything succeeds, and times out. Maybe closing and re-opening the PR helps, otherwise I'll merge it manually. |
💔 Test failed - checks-travis |
The aarch64-android build is timing out. That's probably why homu isn't merging. |
That is happening very intermittently (e.g. master is green). The problem here is that even when the travis job was green homu was still not merging this PR. I don't know why, but in the queue it went from "pending" (as in CI is running) back to "approved" (as in, CI needs to run) every time the travis job finished green =/ |
I thought maybe pulling it off the queue and re-adding it (by closing and re-opening the PR) would maybe fix that, but it didn't =/ |
You changed the name of the Cirrus-CI task. Do you need to make a matching change in homu's configuration, too? |
doesn't homu pick up all tasks automatically independently of their name?(I also added a new task here) |
It can't, because it wouldn't know that a task existed until that task started. You wouldn't want homu to merge a PR before a CI task had started. |
There is a PR in rust-central-station to fix that |
No description provided.