Age | Commit message (Collapse) | Author |
|
|
|
|
|
* Fix race conditions in the tests. Two tests were grabbing a mutex but
immediately dropping it. Thank you, Clippy.
* Remove vestigial Windows support. Remove some code added to support
Windows in 2015. Nix is no longer intended to ever run on Windows.
* Various other minor Clippy lints.
|
|
|
|
Travis didn't compile check tests on platforms that couldn't run tests
in CI, so they bitrotted. Let's see how bad they are.
Most annoyingly, 32-bit Android defines mode_t as 16 bits, but
stat.st_mode as 32-bits.
|
|
Co-authored-by: Dominik Hassler <hadfl@omnios.org>
Co-authored-by: Joshua M. Clulow <josh@sysmgr.org>
|
|
Closes #1339.
|
|
Allow nix to compile on Fuchsia by conditionally avoiding libc
functionality that does not exist for Fuchsia.
|
|
In older versions of Musl, ttyname_r would wrongly return ENOTTY instead
of EBADF. We expected that bug in our test suite. But Rust
1.37.0 updated Musl to 1.1.22, which fixes the problem. This change
reverts our workaround.
https://www.openwall.com/lists/musl/2018/09/15/2
https://github.com/rust-lang/rust/commit/aaf66987931dfe06a547b9f68cb709e9b6265b5c
|
|
On Cirrus-CI, these tests frequently segfault. It's probably indicative
of a real bug, not just a problem in the tests. But for now we need to
skip them to get CI working.
Issue #555
|
|
The test was assuming that once dropped, a temporary file's file
descriptor would be invalid. But it might not be, because another file
might be opened with the same file descriptor. Instead, use an
obviously invalid file descriptor.
|
|
Ensure that the exec functions' arguments are valid for 'static.
Previously they were short-lived temporaries.
|
|
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
|
|
When run in Cirrus-CI's environment, the tests generate copious SIGRT_1
signals. This commit ensures that test_alarm will ignore them.
|
|
|
|
Fix tests. No change in documentation.
Resolves #1030.
|
|
|
|
1224: Update the Linux CI environment to Ubuntu Bionic r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
Co-authored-by: Alan Somers <asomers@axcient.com>
|
|
|
|
|
|
1255: Remove several deprecated constants and functions r=asomers a=asomers
* `unistd::daemon` on Apple
* `unistd::pipe2` on Apple
* `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` on Apple
* `sys::event::FilterFlag::NOTE_REAP` on Apple
* `sys::ptrace::ptrace` on Android and Linux
All have been deprecated for more than two releases and one year.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
|
|
* `unistd::daemon` on Apple
* `unistd::pipe2` on Apple
* `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` on Apple
* `sys::event::FilterFlag::NOTE_REAP` on Apple
* `sys::ptrace::ptrace` on Android and Linux
All have been deprecated for more than two releases and one year.
|
|
|
|
- Make sure all tests pass the CI
- Redox does not (yet) have passwd functions, so remove it
|
|
|
|
TODO: Fix them in Relibc
|
|
|
|
|
|
|
|
This adds the linkat function which is part of POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/linkat.html
and widely implmented on Unix-Family platforms.
Add back trailing whitespace removed on previous force push
|
|
ignore mkfifoat in OSX and andriod
|
|
|
|
|
|
`assert_eq!` gives more debug info when the test fails by default than
`assert!`. This should help make debugging easier.
|
|
Travis is now using Seccomp, and Docker's default Seccomp policy
disables execveat (though, weirdly, not fexecve). It also prohibits any
operations on AF_ALG sockets.
While I'm here, replace close/dup with dup2, which is more reliable.
Also, drop the fork mutex earlier. This way all of the exeve tests will
run, even if one fails.
https://docs.docker.com/engine/security/seccomp/
|
|
|
|
This adds the unlinkat function, which is part of POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlinkat.html
and widely implmented on Unix-family platforms.
Implement unlinkat - Update comments to unlink at and breakup tests
Changes made based on comments from pull request #1058
Implement unlinkat - Update should_panic for more precise check
Updae should_panic attribute for more precise check. Also remove
some dead code and note the pull request ID.
Implement unlinkat - Update error handling to use unwrap_err
The previous patch failed testing on two targets that returned EPERM
as the Sys error instead of EISDIR. This patch changes from using the
should_panic attribute to using the unwrap_err and matching against
the result.
Implement Unlinkat - Passing tests should not print anything. Fix.
Implement unlinkat - Update location of commit comment in the CHANGELOG
Implement unlinkat - Remove newline
|
|
* kmod tests must run exclusively, because they load and unload a module
with a constant name.
* A few tests were doing some variant of chdir, but weren't taking the
CWD_MTX.
* The kmod tests read files by path relative to CWD, so they need the
CWD_MTX. But they don't need it exclusively, so convert the CWD_MTX
into an RwLock.
* Tests that do change the cwd need to change it back when they're done.
|
|
* On Linux, it requires the CAP_SYS_PACCT capability.
* Reenable the test on FreeBSD, because our FreeBSD CI environment is no
longer jailed (since we switched from BuildBot to CirrusCI), but check
at runtime whether the process is jailed.
* test_acct needs the FORK_MTX because it uses Command::new .
* Fix a race condition. acct(2) isn't synchronous. It starts a kernel
thread but does not wait for it to become ready. Fix it by running
the test command within the polling loop.
|
|
|
|
1) lutimes doesn't exist on OpenBSD so it needs to be under conditional
compilation.
The only "reference" that I could find related to this is the discussion
here: https://github.com/rust-lang/libc/pull/790 .
2) fexecve doesn't exist on OpenBSD so add conditional compilation for it
in unistd and in related tests.
The only "reference" that I could find is a mention that fexecve is
not implemented on OpenBSD in the manual pages for signal(3) and
sigaction(2):
Official repository (search for "fexecve"):
https://cvsweb.openbsd.org/src/lib/libc/sys/sigaction.2?rev=1.75&content-type=text/x-cvsweb-markup
Github mirror:
https://github.com/openbsd/src/blob/master/lib/libc/sys/sigaction.2#L619
3) AIO doesn't work on OpenBSD so put test_aio_drop under conditional
compilation.
4) Add relevant changelog entries.
P.S. On OpenBSD remains the issue of test_scm_rights which builds
correctly but fails at runtime.
|
|
Some tests have been disabled and will need further review.
|
|
|
|
|
|
|
|
This patch adds a wrapper for the acct(2) syscall, with two functions
for enabling and disabling process accounting.
|
|
These are mostly to ensure that all the platforms we care about in our
CI can reference these primitives.
|
|
This also adds a test for truncate (obviously) but, while doing so, also
adds a test for the already-existing ftruncate.
|