diff options
author | Alan Somers <asomers@gmail.com> | 2020-12-02 17:47:35 -0700 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2020-12-06 22:35:30 -0700 |
commit | bf7a5fd606ba48c789bdaf95da2779e46e5f83c6 (patch) | |
tree | 5ff9c603b744eff0c5d1763df5220a661087bb5f /test/test_unistd.rs | |
parent | a1eb89568e50132339b5e8a1d5166fb5b5f9b0e8 (diff) | |
download | nix-bf7a5fd606ba48c789bdaf95da2779e46e5f83c6.zip |
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
Diffstat (limited to 'test/test_unistd.rs')
-rw-r--r-- | test/test_unistd.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_unistd.rs b/test/test_unistd.rs index 34f7f561..de696718 100644 --- a/test/test_unistd.rs +++ b/test/test_unistd.rs @@ -26,6 +26,8 @@ use std::path::Path; use tempfile::{tempdir, tempfile}; use libc::{_exit, off_t}; +use crate::*; + #[test] #[cfg(not(any(target_os = "netbsd")))] fn test_fork_and_waitpid() { @@ -990,8 +992,9 @@ fn test_setfsuid() { let nobody = User::from_name("nobody").unwrap().unwrap(); // create a temporary file with permissions '-rw-r-----' - let file = tempfile::NamedTempFile::new().unwrap(); + let file = tempfile::NamedTempFile::new_in("/var/tmp").unwrap(); let temp_path = file.into_temp_path(); + dbg!(&temp_path); let temp_path_2 = (&temp_path).to_path_buf(); let mut permissions = fs::metadata(&temp_path).unwrap().permissions(); permissions.set_mode(640); |