From 7a5de0c98afe9497aa74b3bba124e2fda55ce82c Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 7 Jun 2022 16:01:44 -0400 Subject: [PATCH 1/3] silence another clippy lint --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 982d3873d573..7d8eb92ac58e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,8 @@ clippy::new_without_default, clippy::single_match, clippy::useless_format, - clippy::derive_partial_eq_without_eq + clippy::derive_partial_eq_without_eq, + clippy::too_many_arguments )] extern crate rustc_apfloat; From aa68111c60d6fe1a58638cf8c407509972627a67 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 7 Jun 2022 16:03:32 -0400 Subject: [PATCH 2/3] gate bors on clippy --- .github/workflows/ci.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41cf159e0c80..2bfc58be28d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,22 +86,8 @@ jobs: - name: Test run: bash ./ci.sh - fmt: - name: formatting (ignored by bors) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install latest nightly - run: | - rustup toolchain install nightly --component rustfmt - rustup override set nightly - - name: Formatting (miri, ui_test) - run: cargo fmt --all --check - - name: Formatting (cargo-miri) - run: cargo fmt --manifest-path cargo-miri/Cargo.toml --all --check - clippy: - name: clippy (ignored by bors) + name: clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -117,6 +103,20 @@ jobs: - name: Clippy (cargo-miri) run: cargo clippy --manifest-path cargo-miri/Cargo.toml --all-targets -- -D warnings + fmt: + name: formatting (ignored by bors) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install latest nightly + run: | + rustup toolchain install nightly --component rustfmt + rustup override set nightly + - name: Formatting (miri, ui_test) + run: cargo fmt --all --check + - name: Formatting (cargo-miri) + run: cargo fmt --manifest-path cargo-miri/Cargo.toml --all --check + # These jobs doesn't actually test anything, but they're only used to tell # bors the build completed, as there is no practical way to detect when a # workflow is successful listening to webhooks only. @@ -126,7 +126,7 @@ jobs: end-success: name: bors build finished runs-on: ubuntu-latest - needs: [build] + needs: [build, clippy] if: github.event.pusher.name == 'bors' && success() steps: - name: mark the job as a success @@ -134,7 +134,7 @@ jobs: end-failure: name: bors build finished runs-on: ubuntu-latest - needs: [build] + needs: [build, clippy] if: github.event.pusher.name == 'bors' && (failure() || cancelled()) steps: - name: mark the job as a failure @@ -144,7 +144,7 @@ jobs: cron-fail-notify: name: cronjob failure notification runs-on: ubuntu-latest - needs: [build] + needs: [build, clippy] if: github.event_name == 'schedule' && (failure() || cancelled()) steps: - name: Install zulip-send From 2b35dd514e249bcd7d570a3443335236b4a5d9b1 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 7 Jun 2022 17:03:11 -0400 Subject: [PATCH 3/3] linux-futex test: ensure we join all threads --- tests/pass/concurrency/linux-futex.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/pass/concurrency/linux-futex.rs b/tests/pass/concurrency/linux-futex.rs index 8a67e0b525a9..b2791a428566 100644 --- a/tests/pass/concurrency/linux-futex.rs +++ b/tests/pass/concurrency/linux-futex.rs @@ -132,7 +132,7 @@ fn wait_wake() { static FUTEX: i32 = 0; - thread::spawn(move || { + let t = thread::spawn(move || { thread::sleep(Duration::from_millis(200)); unsafe { assert_eq!(libc::syscall( @@ -155,6 +155,7 @@ fn wait_wake() { } assert!((200..1000).contains(&start.elapsed().as_millis())); + t.join().unwrap(); } fn wait_wake_bitset() { @@ -162,7 +163,7 @@ fn wait_wake_bitset() { static FUTEX: i32 = 0; - thread::spawn(move || { + let t = thread::spawn(move || { thread::sleep(Duration::from_millis(200)); unsafe { assert_eq!(libc::syscall( @@ -202,6 +203,7 @@ fn wait_wake_bitset() { } assert!((400..1000).contains(&start.elapsed().as_millis())); + t.join().unwrap(); } fn main() {