From a6c92c00fe06530bdae71da5c44c54de94f52189 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Fri, 28 Jul 2023 21:29:20 +0900 Subject: [PATCH] Update CI config - Remove duplicate target from cross-test - Remove needless --test-threads=1 (already specified by RUST_TEST_THREADS=1) - Remove --cfg tokio_no_ipv6 as setup-cross-toolchain-action supports it --- .github/workflows/ci.yml | 18 ++++++------------ tokio/src/loom/std/parking_lot.rs | 3 +-- tokio/tests/tcp_connect.rs | 1 - tokio/tests/tcp_socket.rs | 1 - 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4bf03933fe..7b2e8bee71b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -439,9 +439,6 @@ jobs: - target: armv7-unknown-linux-gnueabihf - target: aarch64-unknown-linux-gnu rustflags: --cfg tokio_taskdump - - # Run a platform without AtomicU64 and no const Mutex::new - - target: armv5te-unknown-linux-gnueabi steps: - uses: actions/checkout@v3 - name: Install Rust stable @@ -464,10 +461,10 @@ jobs: run: | set -euxo pipefail cargo nextest run -p tokio --all-features --target ${{ matrix.target }} - cargo test --doc -p tokio --all-features --target ${{ matrix.target }} -- --test-threads 1 + cargo test --doc -p tokio --all-features --target ${{ matrix.target }} env: RUST_TEST_THREADS: 1 - RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_ipv6 --cfg tokio_no_tuning_tests ${{ matrix.rustflags }} + RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_tuning_tests ${{ matrix.rustflags }} cross-test-without-parking_lot: needs: basics @@ -481,9 +478,6 @@ jobs: - target: armv7-unknown-linux-gnueabihf - target: aarch64-unknown-linux-gnu rustflags: --cfg tokio_taskdump - - # Run a platform without AtomicU64 and no const Mutex::new - - target: armv5te-unknown-linux-gnueabi steps: - uses: actions/checkout@v3 - name: Install Rust stable @@ -510,10 +504,10 @@ jobs: run: | set -euxo pipefail cargo nextest run -p tokio --features full,test-util --target ${{ matrix.target }} - cargo test --doc -p tokio --features full,test-util --target ${{ matrix.target }} -- --test-threads 1 + cargo test --doc -p tokio --features full,test-util --target ${{ matrix.target }} env: RUST_TEST_THREADS: 1 - RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_ipv6 --cfg tokio_no_parking_lot --cfg tokio_no_tuning_tests ${{ matrix.rustflags }} + RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_parking_lot --cfg tokio_no_tuning_tests ${{ matrix.rustflags }} # See https://github.com/tokio-rs/tokio/issues/5187 no-atomic-u64-test: @@ -541,7 +535,7 @@ jobs: - name: test tokio --all-features run: | cargo nextest run -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --all-features - cargo test --doc -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --all-features -- --test-threads 1 + cargo test --doc -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --all-features env: RUST_TEST_THREADS: 1 RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings --cfg tokio_no_atomic_u64 --cfg tokio_no_tuning_tests @@ -566,7 +560,7 @@ jobs: # https://github.com/tokio-rs/tokio/pull/5356 # https://github.com/tokio-rs/tokio/issues/5373 - - name: Check with const_mutex_new + - name: Check run: cargo hack check -p tokio --feature-powerset --depth 2 --keep-going env: RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings --cfg tokio_no_atomic_u64 diff --git a/tokio/src/loom/std/parking_lot.rs b/tokio/src/loom/std/parking_lot.rs index e3af258d116..9b9a81d35b0 100644 --- a/tokio/src/loom/std/parking_lot.rs +++ b/tokio/src/loom/std/parking_lot.rs @@ -52,8 +52,7 @@ impl Mutex { } #[inline] - #[cfg(all(feature = "parking_lot", not(all(loom, test))))] - #[cfg_attr(docsrs, doc(cfg(all(feature = "parking_lot",))))] + #[cfg(not(all(loom, test)))] pub(crate) const fn const_new(t: T) -> Mutex { Mutex(PhantomData, parking_lot::const_mutex(t)) } diff --git a/tokio/tests/tcp_connect.rs b/tokio/tests/tcp_connect.rs index 03f7b34ff43..269ba8ef695 100644 --- a/tokio/tests/tcp_connect.rs +++ b/tokio/tests/tcp_connect.rs @@ -35,7 +35,6 @@ async fn connect_v4() { } #[tokio::test] -#[cfg(not(tokio_no_ipv6))] async fn connect_v6() { let srv = assert_ok!(TcpListener::bind("[::1]:0").await); let addr = assert_ok!(srv.local_addr()); diff --git a/tokio/tests/tcp_socket.rs b/tokio/tests/tcp_socket.rs index b431196f1c6..faead95c0bb 100644 --- a/tokio/tests/tcp_socket.rs +++ b/tokio/tests/tcp_socket.rs @@ -24,7 +24,6 @@ async fn basic_usage_v4() { } #[tokio::test] -#[cfg(not(tokio_no_ipv6))] async fn basic_usage_v6() { // Create server let addr = assert_ok!("[::1]:0".parse());