From d36353701341df9cfffb4fc4e88c002698d2deda Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 10 Dec 2020 17:56:40 -0700 Subject: [PATCH 1/3] Raise MSRV to 1.40.0 This will shortly be needed for Fuchsia support. --- .cirrus.yml | 10 +++++----- CHANGELOG.md | 3 +++ README.md | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 585dd24f6a..f3b18d6a35 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -12,7 +12,7 @@ task: image: freebsd-11-4-release-amd64 setup_script: - fetch https://sh.rustup.rs -o rustup.sh - - sh rustup.sh -y --profile=minimal --default-toolchain 1.36.0 + - sh rustup.sh -y --profile=minimal --default-toolchain 1.40.0 - $HOME/.cargo/bin/rustup target add i686-unknown-freebsd amd64_test_script: - . $HOME/.cargo/env @@ -42,7 +42,7 @@ task: image: catalina-xcode setup_script: - curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs - - sh rustup.sh -y --profile=minimal --default-toolchain 1.36.0 + - sh rustup.sh -y --profile=minimal --default-toolchain 1.40.0 - . $HOME/.cargo/env - bash ci/install.sh script: @@ -92,7 +92,7 @@ docker_builder: setup_script: - mkdir /tmp/home - curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs - - sh rustup.sh -y --profile=minimal --default-toolchain 1.36.0 + - sh rustup.sh -y --profile=minimal --default-toolchain 1.40.0 - . $HOME/.cargo/env - bash ci/install.sh script: @@ -110,11 +110,11 @@ task: - name: Linux x86_64 env: TARGET: x86_64-unknown-linux-gnu - TOOLCHAIN: 1.36.0 + TOOLCHAIN: 1.40.0 - name: Linux x86_64 musl env: TARGET: x86_64-unknown-linux-musl - TOOLCHAIN: 1.36.0 + TOOLCHAIN: 1.40.0 container: image: rust:1.36 setup_script: diff --git a/CHANGELOG.md b/CHANGELOG.md index a110f6500b..2201504d1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed ### Changed +- Minimum supported Rust version is now 1.40.0. + ([#1356](https://github.com/nix-rust/nix/pull/1356)) + - i686-apple-darwin has been demoted to Tier 2 support, because it's deprecated by Xcode. (#[1350](https://github.com/nix-rust/nix/pull/1350)) diff --git a/README.md b/README.md index 56772c7c76..670fa962ad 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ Tier 3: ## Usage -`nix` requires Rust 1.36.0 or newer. +`nix` requires Rust 1.40.0 or newer. To use `nix`, add this to your `Cargo.toml`: From 668384e94fbccbdc651a094c74cf03cbf801848d Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 10 Dec 2020 19:52:39 -0700 Subject: [PATCH 2/3] Remove a workaround for an old Musl bug 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 --- test/test_unistd.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/test_unistd.rs b/test/test_unistd.rs index a5c6a33278..d169d6e099 100644 --- a/test/test_unistd.rs +++ b/test/test_unistd.rs @@ -1064,13 +1064,7 @@ fn test_ttyname_not_pty() { } #[test] -#[cfg(all(not(target_os = "redox"), not(target_env = "musl")))] +#[cfg(all(not(target_os = "redox")))] fn test_ttyname_invalid_fd() { assert_eq!(ttyname(-1), Err(Error::Sys(Errno::EBADF))); } - -#[test] -#[cfg(all(not(target_os = "redox"), target_env = "musl"))] -fn test_ttyname_invalid_fd() { - assert_eq!(ttyname(-1), Err(Error::Sys(Errno::ENOTTY))); -} From d87e6b28202ce9b3e2bebd1ba93e3df1f1e9fef6 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 14 Dec 2020 19:37:53 -0700 Subject: [PATCH 3/3] Ignore failures of test_aio_suspend on macos On Cirrus-CI, this test frequently fails with EINVAL. The error goes away if I add a line of debugging, so it's probably a timing issue. But I can't debug it myself. Issue #1361 --- test/sys/test_aio.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/sys/test_aio.rs b/test/sys/test_aio.rs index 37ad32578d..3878da94a6 100644 --- a/test/sys/test_aio.rs +++ b/test/sys/test_aio.rs @@ -137,6 +137,9 @@ fn test_fsync_error() { // in Travis's version of glibc or Linux. Either way, we must skip the test. // https://github.com/nix-rust/nix/issues/1099 #[cfg_attr(target_os = "linux", ignore)] +// On Cirrus, aio_suspend is failing with EINVAL +// https://github.com/nix-rust/nix/issues/1361 +#[cfg_attr(target_os = "macos", ignore)] fn test_aio_suspend() { const INITIAL: &[u8] = b"abcdef123456"; const WBUF: &[u8] = b"CDEFG";