Commit Graph

20 Commits

Author SHA1 Message Date
Costin-Robert Sin
8f08a69c28 Add format test to CI
To enforce uniformity for all PRs, the CI checks if the code
is formatted rigth using `cargo fmt` tool.

Signed-off-by: Costin-Robert Sin <sin.costinrobert@gmail.com>
2022-06-24 00:35:31 +03:00
Al Hoang
d02e27476c add haiku support
* enabled as much functionality and defines that match
  updated libc definitions for haiku
2022-05-14 18:45:18 -05:00
Alan Somers
0c07a9e469 Rewrite the aio module
The existing AIO implementation has some problems:
1) The in_progress field is checked at runtime, not compile time.
2) The mutable field is checked at runtime, not compile time.
3) A downstream lio_listio user must store extra state to track whether
   the whole operation is partially, completely, or not at all
   submitted.
4) Nix does heap allocation itself, rather than allowing the caller to
   choose it.  This can result in double (or triple, or quadruple)
   boxing.
5) There's no easy way to use lio_listio to submit multiple operations with
   a single syscall, but poll each individually.
6) The lio_listio usage is far from transparent and zero-cost.
7) No aio_readv or aio_writev support.
8) priority has type c_int; should be i32
9) aio_return should return a usize instead of an isize, since it only
   uses negative values to indicate errors, which Rust represents via
   the Result type.

This rewrite solves several problems:
1) Unsolved.  I don't think it can be solved without something like
   C++'s guaranteed type elision.  It might require changing the
   signature of Future::poll too.
2) Solved.
3) Solved, by the new in_progress method and by removing the complicated
   lio_listio resubmit code.
4) Solved.
5) Solved.
6) Solved, by removing the lio_listo resubmit code.  It can be
   reimplemented downstream if necessary.  Or even in Nix, but it
   doesn't fit Nix's theme of zero-cost abstractions.
7) Solved.
8) Solved.
9) Solved.

The rewrite includes functions that don't work on FreeBSD, so add CI
testing for FreeBSD 14 too.

By default only enable tests that will pass on FreeBSD 12.3.  But run a
CI job on FreeBSD 14 and set a flag that will enable such tests.
2022-05-14 13:34:11 -06:00
Ryan Zoeller
b637f12bf9 Add support for aarch64-apple-darwin
Replace 'OSX' language with 'macOS', to match Rust's language.
2022-01-29 23:39:21 -06:00
Jonah Petri
6c4b9133f1 uclibc support 2022-01-24 10:06:35 -05:00
Alan Somers
3a2163a21a Check Dragonfly BSD and OpenBSD in CI
Build, but don't test, for these operating systems.  Thanks to
@rtzoeller for the tip.

Also, fix the OpenBSD build.
2021-09-04 16:49:16 -06:00
Alan Somers
f6d2e152bb Fix bors
bors got broken by a spelling change in .cirrus.yml in
d20fe20af7 that wasn't propagated to
bors.toml.
2021-08-26 22:03:20 -06:00
Alan Somers
d20fe20af7 Multiple CI improvements:
* Install cross the easy way, via cargo
* Don't test in release mode.  Nix contains no release-dependent paths,
  and release mode testing has to my knowledge never revealed a bug in
  Nix.
* Add Linux powerpc back to CI, fixed by the latest cross.
* Check the tests even on platforms that can't run them.
* DRY for the Illumos and Redox sections
* Cross-check iOS from a Linux VM instead of OSX
* Revert the workaround for rust-lang/rustup issue 2774
2021-08-22 10:33:07 -06:00
Alan Somers
0163528865 [skip ci] Fix bors configuration
* I never removed 32-bit OSX and iOS targets that were removed from
  Cirrus in PR #1492 .
* I never added Fuchsia (PR #1285) .
* I never added illumos (PR #1394) .
* never added Linux x32 (PR #1366) .
2021-08-18 08:31:47 -06:00
Alan Somers
d0c344063a Fix duplicate entry in bors.toml
Also, sort the entries alphabetically, since that's how Github displays
them.
2020-12-18 07:44:53 -07:00
Alan Somers
0143165503 [skip ci] Update docs and build badges for the Travis -> Cirrus move 2020-12-10 19:51:12 -07:00
Alan Somers
bf7a5fd606 Switch all builds from Travis to Cirrus
Travis has been super-slow lately (> 6 hours per build).  Cirrus is much
faster: about 20 minutes.  Cirrus also has slightly better test
coverage, mainly because it doesn't use SECCOMP.

Also,

* Fix the Redox CI build.  The old Travis configuration didn't actually
  build for Redox, so we never noticed that Redox can't be built with a
  stable compiler.  Thanks to @coolreader18 for finding this.

* Disable the udp_offload tests on cross-tested platforms.  These tests
  are failing with ENOPROTOOPT in Cirrus-CI.  I suspect it's due to a
  lack of support in QEMU.  These tests were skipped on Travis because
  its kernel was too old.

* Fix require_kernel_version on Cirrus-CI.  Cirrus reports the Linux
  kernel version as 4.19.112+, which the semver crate can't handle.

* Fix test_setfsuid on Cirrus.  When run on Cirrus, it seems like the
  file in /tmp gets deleted as soon as it's closed.  Probably an
  overzealous temporary file cleaner.  Use /var/tmp, because no
  temporary file cleaner should run in there.

* Skip mount tests on Cirrus.  They fail for an unknown reason.
Issue #1351

* Skip the AF_ALG tests on Cirrus-CI
Issue #1352
2020-12-06 22:35:30 -07:00
Alan Somers
3e52d0974d Update the FreeBSD test image to 11.4-release 2020-07-03 10:45:01 -06:00
Alan Somers
4a8399179c Update the FreeBSD CI image to an 11.3 snapshot
11.2 is EOL.
2020-04-19 15:00:28 -06:00
Alan Somers
593922fb60 Switch FreeBSD CI builds from BuildBot to cirrus-ci.com
This change does the following:
1) Adds a CI build on cirrus-ci.com
2) Switches FreeBSD's CI from a jail to a full VM
3) Switches FreeBSD i386's CI from a 32-bit jail to simply using a
   cross-compiled binary on a 64-bit VM.
4) Switches FreeBSD i386's CI from using stable rust to 1.24.1 (back
   when I added buildbot, rustup didn't support i686-unknown-freebsd)
5) Switches bors to gate on cirrus-ci rather than buildbot

This change does _not_ disable buildbot.  That must happen outside of
git.

Fixes #996
2018-12-29 12:54:46 -07:00
Alan Somers
ec6fe0629d Move i686-unknown-freebsd builds from Travis to BuildBot 2017-07-29 19:04:17 -06:00
Alan Somers
c14c3bf8dc Change the FreeBSD builder's name to "amd64_fbsd11" 2017-07-29 16:29:54 -06:00
Alan Somers
9286ab69f7 Integrate the FreeBSD BuildBot
* Gate Bors on the FreeBSD 11 build
* Remove the testless FreeBSD build from Travis
* Promote x86_64-unknown-freebsd to Tier 1

Fixes #603
2017-06-04 16:07:07 -06:00
Michael Howell
935bbddd44 Raise the bors timeout to four hours
bors's timeout should always be twice a long as the test suite takes.
This is to allow Travis to fast-fail a test; if one of the builders
immediately reports a failure, then bors will move on to the next batch,
leaving the slower builders to work through the already-doomed run and
the next one.

At the time this was written, nix's test suite took about an hour to run.
The timeout was raised to four hours, instead of two, to give nix room
to grow and time for delays on Travis's end.
2017-04-18 14:03:27 -07:00
Kamal Marhubi
11c17ccd61 Replace homu with bors-ng
@homu has served us well, but is unmaintained. bors will serve us in
its stead.

Fixes https://github.com/nix-rust/nix/issues/580
2017-04-15 18:44:48 -04:00