tokio-rs / io-uring

The `io_uring` library for Rust
Apache License 2.0
1.16k stars 129 forks source link

tests/net: relax FD assertion for socket opcode check #226

Closed lucab closed 1 year ago

lucab commented 1 year ago

This tweaks the socket opcode test in order to relax FD assertions. Checking for exact FD number can race when other threads are also opening/closing FDs, so just perform non-exact sanity checks instead.

Closes: https://github.com/tokio-rs/io-uring/issues/208

FrankReh commented 1 year ago

And I thought this crate had to do the tests on a single thread. Turns out it was the tokio-uring crate were we limited it to a single thread for reasons like this. In that crate, we added a .cargo/config.toml file to set the test threads to 1.

FrankReh commented 1 year ago

Thanks for the fix!