Verify that only non-technical breaking changes are applied to libc
Closes#270 .
cc @alexcrichton so this would be a solution to #270 that uses rust-semverver to check that the API of `libc` contains only non-technical breaking changes.
This is a WIP and uses a fork of `rust-semverver` for now, but I've sent PRs upstream already. This is the only idea I have for solving #270 . `rust-semverver` is not perfect, but it can deal with functions, consts, and simple structs just fine, and that's pretty much everything that libc uses.
cc @ibabushkin
Some other notes:
* we have to compile `rust-semverver` for each toolchain version, and it depends on `cargo` so we have to build ~160 dependencies. Using `cache: cargo` breaks everything.
Add arm-uclibc definitions
I used `buildroot-2017.05` to build armv7 cross compiler, `uclibc-1.0.24` and `libc-test`. I've executed `libc-test` on armv7-based SoC, using modified `libc-test` to account for the environment. Modified libc-test is not included in this PR because it is too dependent on cross compilation and execution environment.
cleanup libc-test for OpenBSD
here a cleanup for libc-test for OpenBSD
Some elements (compat for old and now unsupported OpenBSD versions) could be removed, but I think it is better to address them after this PR is merged.
the testsuite for OpenBSD still pass with it (well, with #1280)
r? @gnzlbg
openbsd: glob_t recently changed to conform posix (use size_t)
on openbsd, upcoming stable version have changed glob_t definition to follow posix definition (using `size_t` instead of `int` on some fields)
the change preserves bitrig definition
r? @gnzlbg
Implement more extra_traits
Finishing the implementation of rust-lang/rust#57715 now that all platforms are tested in CI. I plan to expand this CI to all platforms that need this treatment (solarish, empscripten, freebsd, and netbsd), but thought I'd get the part I've already started running in CI since I can't test this changes locally.
Clean libc-test for apple targets
This cleans up the build.rs of `libc-test` for apple targets.
I wanted to update the docker containers of some targets so that we can start testing newer currently-skipped APIs properly, but it is impossible to figure out which headers and APIs are skipped for each target, which has to change if we update the glibc version in one Linux container but not the other (updating them all at once is just madness).
This PR separates the testing of apple targets into its own self-contained function. This allows seeing exactly which headers are included, and which items are skipped. A lot of work will be required to separate the testing of all major platforms and make the script reasonable.
During the clean up, I discovered that, at least for apple targets, deprecated but not removed APIs are not tested. I re-enabled testing for those, and fixed `daemon`, which was not properly linking its symbol. I also added the `#[deprecated]` attribute to the `#[deprecated]` APIs of the apple targets. The attribute is available since Rust 1.9.0 and the min. Rust version we support is Rust 1.13.0.
Many other APIs are also currently not tested "because they are weird" which I interpret as "the test failed for an unknown reason", as a consequence:
* the signatures of execv, execve, and execvp are incorrect (see https://github.com/rust-lang/libc/issues/1272)
* the `sig_t` type is called `sighandler_t` in libc for some reason: https://github.com/rust-lang/libc/issues/1273
This probably explains why some other things, like the `sa_handler`/`sa_sigaction` fields of `sigaction` were skipped. The field is actually a union, which can be either a `sig_t` for the `sa_handler` field, or some other type for the `sa_sigaction` field, but because the distinction was not made, the field was not checked.
The latest ctest version can check volatile pointers, so a couple of skipped tests are now tested using this feature.
This cleans up the build.rs of `libc-test` for apple targets.
I wanted to update the docker containers of some targets so that we can start
testing newer currently-skipped APIs properly, but it is impossible to figure
out which headers and APIs are skipped for each target.
This PR separates the testing of apple targets into its own self-contained
function. This allows seeing exactly which headers are included, and which items
are skipped. A lot of work will be required to separate the testing of all major
platforms and make the script reasonable.
During the clean up, I discovered that, at least for apple targets, deprecated
but not removed APIs are not tested. I re-enabled testing for those, and fixed
`daemon`, which was not properly linking its symbol. I also added the
`#[deprecated]` attribute to the `#[deprecated]` APIs of the apple targets. The
attribute is available since Rust 1.9.0 and the min. Rust version we support is
Rust 1.13.0.
Many other APIs are also currently not tested "because they are weird" which I
interpret as "the test failed for an unknown reason", as a consequence:
* the signatures of execv, execve, and execvp are incorrect (see
https://github.com/rust-lang/libc/issues/1272)
* the `sig_t` type is called `sighandler_t` in libc for some reason:
https://github.com/rust-lang/libc/issues/1273
This probably explains why some other things, like the
`sa_handler`/`sa_sigaction` fields of `sigaction` were skipped. The field is
actually a union, which can be either a `sig_t` for the `sa_handler` field, or
some other type for the `sa_sigaction` field, but because the distinction was
not made, the field was not checked.
The latest ctest version can check volatile pointers, so a couple of skipped
tests are now tested using this feature.