Commit Graph
170 Commits
Author SHA1 Message Date
Carl Lerche c1c8d1033d Merge remote-tracking branch 'origin/tokio-1.38.x' into forward-port-1.38.x 2025-04-04 08:18:13 -07:00
Carl Lerche 7b6ccb515f chore: backport CI fixes 2025-04-02 14:34:28 -07:00
Alice Ryhl fd2048dad1 ci: split miri jobs into unit and integration tests (#7071) 2025-01-06 15:39:06 +01:00
tiif 2052938a9f ci: run doc tests with miri (#7060) 2025-01-02 13:14:30 +00:00
Fancy2209 9d42b977df misc: get haiku working 2024-12-30 03:36:40 -06:00
Alice Ryhl e0d1293fac ci: add instructions that explain how to fix spellcheck errors (#7016) 2024-12-05 12:28:27 +01:00
Alice Ryhl c032ea0203 ci: detect trailing whitespace (#7013) 2024-12-04 17:23:13 +01:00
Hayden Stainsby b5c227d51f tracing: move tracing instrumentation tests into tokio tests (#7007)
In #6112, tests for the tracing instrumentation were introduced. They
had to live in their own test crate under `tokio/tests` because the
`tracing-mock` crate that the tests use had not yet been published to
crates.io.

Now `tracing-mock` has been published to crates.io and so the separate
test crate and separate job to run it are no longer necessary. The
tracing instrumentation tests can be placed in with the other
integration tests in the `tokio` crate.

The tests themselves have also been updated to match the changes in the
`tracing-mock` API since the version which was being used.
2024-12-04 07:47:48 +01:00
Alice Ryhl 5dda72d338 ci: pin valgrind to rustc 1.82 (#6998) 2024-11-29 21:50:01 +09:00
tiif 4047d7962a miri: add annotations for tests with miri ignore (#6981) 2024-11-20 11:44:28 +01:00
Jonas Fassbender 772e0ca8a6 docs: fix documentation build on Windows (#6945) 2024-11-14 01:28:55 +09:00
Taiki Endo 0dbdd196b6 ci: update cargo-check-external-types to 0.1.13 (#6949) 2024-11-02 16:50:00 +09:00
Taiki Endo 0c01fd23b4 ci: use patched version of cargo-check-external-types to fix CI failure (#6937) 2024-10-26 10:27:59 +02:00
Alice Ryhl ebe241647e ci: use cargo deny (#6931) 2024-10-23 18:48:07 +02:00
Alice Ryhl 32e0b4325f ci: freeze FreeBSD and wasm-unknown-unknown on rustc 1.81 (#6911)
Signed-off-by: Alice Ryhl <[email protected]>
2024-10-18 13:14:17 +02:00
Russell Cohen c9e998e4b3 ci: print the correct sort order of the dictionary on failure (#6905) 2024-10-17 10:45:38 +02:00
tiif 161b8c80d5 ci: test more things with miri (#6885) 2024-10-11 09:44:50 +02:00
Dirkjan Ochtman 3297052763 ci: test Quinn in CI (#6719) 2024-07-25 11:37:46 +02:00
Alice Ryhl 15cd5146d4 chore: increase MSRV to 1.70 (#6645) 2024-07-22 18:01:27 +00:00
Alice Ryhl 35c6fd9924 ci: set RUSTUP_WINDOWS_PATH_ADD_BIN=1 (#6568) 2024-05-17 13:03:22 +02:00
Alice Ryhl 2a0df5fb05 ci: bump nightly to nightly-2024-05-05 (#6538) 2024-05-05 15:43:11 +00:00
Motoyuki Kimura 3c8d8e60ca chore: fix latest rust-1.78.0 warnings (#6528) 2024-05-03 11:23:25 +02:00
LongYinan 9ed595767d wasm: support rt-multi-thread with wasm32-wasi-preview1-threads (#6510) 2024-04-24 09:45:54 +02:00
Siech0 3936ebdfe4 chore: update CI to clippy 1.77 (#6443) 2024-03-30 15:49:42 +09:00
Motoyuki Kimura 4c453e9790 readme: add description about benchmarks (#6425) 2024-03-23 18:11:41 +03:30
Patrick McGleenon a2096049ee ci: downgrade to QEMU 7.2 for cross-compile builds (#6361) (#6363) 2024-02-23 12:08:57 +09:00
Patrick McGleenonandRafael Bachmann e392c4ff1e chore: update CI to clippy 1.76 (#6334)
Co-authored-by: Rafael Bachmann <[email protected]>
2024-02-10 10:45:40 +01:00
M.Amin Rayej 53f9e5a357 ci: make sure dictionary words are sorted and unique (#6316) 2024-01-31 16:11:54 +03:30
Owen Leung 131e7b4e49 ci: add spellchecking (#6297) 2024-01-29 10:53:43 +01:00
M.Amin Rayej 58edfc61ab ci: verify that tests work with panic=abort (#6283) 2024-01-16 16:10:23 +01:00
Taiki Endo 84c5674c60 ci: update clippy version to 1.75 (#6273) 2024-01-07 02:33:37 +09:00
Taiki Endo 9780bf491f ci: update cargo-check-external-types to 0.1.10 (#6274) 2024-01-07 00:53:08 +09:00
Taiki Endo d6ba535ceb ci: update actions/checkout action to v4 (#6272) 2024-01-06 20:30:28 +09:00
Hayden Stainsby ed32cd194c task: add tests for tracing instrumentation of tasks (#6112)
Tokio is instrumented with traces which can be used to analyze the
behavior of the runtime during execution or post-mortem. The
instrumentation is optional. This is where tokio-console collections
information.

There are currently no tests for the instrumentation.

In order to provide more stability to the instrumentation and prepare
for future changes, tests are added to verify the current behavior. The
tests are written using the `tracing-mock` crate. As this crate is still
unreleased, a separate test create has been added under `tokio/tests`
which is outside the workspace. This allows us to pull in both `tracing`
and `tracing-mock` from the tracing repository on GitHub without
affecting the rest of the tokio repository.

This change adds initial tests for the task instrumentation. Further
tests will be added in subsequent commits.

Once `tracing-mock` is published on crates.io (tokio-rs/tracing#539),
these tests can be moved in with the "normal" tokio integration tests.
The decision to add these tests now is due to the release of
`tracing-mock` taking a while, so it would be better to have tests while
we wait.
2023-10-31 10:02:00 +01:00
Nikolay Arhipov f3949cc56d tokio: added vita target support (#6094) 2023-10-25 14:44:41 +02:00
Alice Ryhl 58acb56a17 ci: update nightly to 2023-10-21 (#6103) 2023-10-24 14:15:25 +00:00
Eliza Weisman d1dae25cd2 ci: drop MIPS targets from cross-check (#5951)
Currently, Tokio runs cross-compilation checks for the
`mips-unknown-linux-gnu` and `mipsel-unknown-linux-musl` target triples.
However, Rust has recently demoted these targets from Tier 2 support to
Tier 3 (see rust-lang/compiler-team#648). Therefore, MIPS toolchains may
not always be available, even in stable releases. This is currently
[breaking our CI builds][1], as Rust 1.72.0 does not contain a standard
library for `mips-unknown-linux-gnu`.

This branch removes these builds from the cross-compilation check's
build matrix. Tokio may still build successfully for MIPS targets, but
we can't easily guarantee support when the stable Rust release train may
or may not be able to build for MIPS targets.

[1]: https://github.com/tokio-rs/tokio/actions/runs/5970263562/job/16197657405?pr=5947#step:3:80
2023-08-25 14:40:32 -07:00
Carl Lerche dd23f08c3a rt(alt): fix memory leak and increase max preemption when running Loom CI tests (#5911)
The memory leak was caused by a bug during shutdown where some state was leaked.
2023-08-10 09:18:10 -07:00
Taiki Endo e5e88551d2 Update CI config (#5893) 2023-08-02 01:04:11 +09:00
Jiahao XU efe3ab679a sync: make const_new methods always available (#5885)
Since MSRV is bumped to 1.63, `Mutex::new` is now usable in const context.

Also use `assert!` in const function to ensure correctness instead of
silently truncating the value and remove cfg `tokio_no_const_mutex_new`.

Signed-off-by: Jiahao XU <[email protected]>
2023-07-28 13:46:21 +02:00
Jiahao XU c445e467ce tokio: bump MSRV to 1.63 (#5887) 2023-07-27 10:57:19 +02:00
Carl Lerche 4165601b1b rt: initial implementation of new threaded runtime (#5823)
This patch includes an initial implementation of a new multi-threaded
runtime. The new runtime aims to increase the scheduler throughput by
speeding up how it dispatches work to peer worker threads. This
implementation improves most benchmarks by about ~10% when the number of
threads is below 16. As threads increase, mutex contention deteriorates
performance.

Because the new scheduler is not yet ready to replace the old one, the
patch introduces it as an unstable runtime flavor with a warning that it
isn't production ready. Work to improve the scalability of the runtime
will most likely require more intrusive changes across Tokio, so I am
opting to merge with master to avoid larger conflicts.
2023-07-21 11:56:34 -07:00
Jiahao XU fc69666f8a Speedup CI (#5691)
- Pass `--no-deps` to `cargo-clippy`
 - Use `dtolnay/rust-toolchain@stale` instead of
   `dtolnay/rust-toolchain@master`
 - Use dtolnay/rust-toolchain instead of `rustup` directly
 - Use `cargo-nextest` in job test to speedup testing
 - Use `cargo-nextest` in job test-unstable to speedup testing
 - Use `cargo-nextest` in job test-unstable-taskdump to speedup testing
 - Use `cargo-nextest` in job no-atomic-u64 to speedup testing
 - Use `cargo-nextest` in job check-unstable-mt-counters
 - Run `cargo check --benches` for `benches/` in job test
   Since the benchmark is not run
 - Run `cargo-check` instead of `cargo-build` in job test-parking_lot
   since no test is run
 - Run `cargo-check` instead of `cargo-build` in job no-atomic-u64
 - Run `Swatinem/rust-cache@v2` after `taiki-e/install-action@v2` to
   avoid caching pre-built artifacts downloaded by it.
 - Use `Swatinem/rust-cache@v2` in job no-atomic-u64
 - Add concurrenty group to cancel outdated CI
 - Use `taiki-e/setup-cross-toolchain-action@v1` in job cross-test

   instead of cross, so that we can use `cargo-nextest` to run tests in
   parallel.

   Also use `Swatinem/rust-cache@v2` to cache artifacts.
 - Use `Swatinem/rust-cache@v2` in job cross-check to speedup ci.
 - Fix job `cross-test`: Use `armv5te-unknown-linux-gnueabi` for no-atomic-u64

   testing instead of `arm-unknown-linux-gnueabihf`, which actually has
   atomic-u64
 - Rm use of `cross` in job `cross-check`

   Since it does not run any test, it does not need the `cross-rs`
   toolchain as tokio does not use any external C/C++ library that require
   `gcc`/`clang` to compile.
 - Add more recognizable name for steps in job cross-test
 - Split job `test` into `test-{tokio-full, workspace-all-features,
   integration-tests-per-feature}`
 - Split job `no-atomic-u64` into `no-atomic-u64-{test, check}`
 - Parallelize job `features` by using matrix
 - Split `cross-test` into `cross-test-{with, without}-parking_lot`
 - Speedup job `cross-test-*` and `no-atomic-u64-test` by running
   `cargo-test` with `-- --test-threads 1` since `qemu` userspace
   emulation has problems running binaries with many threads.
 - Speedup workflow `stress-test.yml` and job `valgrind` in workflow `ci.yml`
   by passing `--fair-sched=yes` to `valgrind`.
 - Speedup job `test-hyper`: Cache `./hyper/target`
   instead of caching `./target`, which is non-existent.
 - Set `RUST_TEST_THREADS=1` to make sure `libtest` only use one thread
   so that qemu will be happy with the tests.
   This is applied to `cross-test-with(out)-parking_lot, no-atomic-u64-test`.
 - Apply suggestions from code review

Signed-off-by: Jiahao XU <[email protected]>
2023-07-02 16:56:38 +09:00
Alice Ryhl bb4512eae0 ci: reenable semver check (#5845) 2023-07-01 16:54:38 +02:00
Carl Lerche 0c7d8d10fb ci: disable tuning tests for cross tests (#5836) 2023-06-29 10:23:13 -07:00
Andrew Mackenzie fb0d305a7a ci: build tokio for redox-os (#5800) 2023-06-19 19:33:17 +02:00
Taiki Endo af6c87a045 chore: upgrade remaining 2018 edition crates to 2021 edition (#5788) 2023-06-12 02:21:50 +09:00
Taiki Endo 6257712d68 ci: update cargo-check-external-types to 0.1.7 (#5786) 2023-06-11 19:02:12 +09:00
Taiki Endo c5d52c17ae chore: enable cargo v2 resolver to prevent dev-deps from enabling log feature of mio (#5787) 2023-06-11 17:34:22 +09:00
Alice Ryhl a2941e48be ci: temporarily disable semver check (#5774) 2023-06-08 10:36:25 +02:00