add num_cpus crate test
This commit is contained in:
parent
963f08b702
commit
00b382d1a5
4 changed files with 8 additions and 1 deletions
1
test_dependencies/Cargo.lock
generated
1
test_dependencies/Cargo.lock
generated
|
@ -107,6 +107,7 @@ dependencies = [
|
|||
"getrandom 0.1.16",
|
||||
"getrandom 0.2.7",
|
||||
"libc",
|
||||
"num_cpus",
|
||||
"page_size",
|
||||
"rand",
|
||||
"tokio",
|
||||
|
|
|
@ -12,6 +12,7 @@ edition = "2021"
|
|||
tokio = { version = "1.0", features = ["full"] }
|
||||
libc = "0.2"
|
||||
page_size = "0.4.1"
|
||||
num_cpus = "1.10.1"
|
||||
|
||||
getrandom_1 = { package = "getrandom", version = "0.1" }
|
||||
getrandom_2 = { package = "getrandom", version = "0.2" }
|
||||
|
|
5
tests/pass/crates/num_cpus.rs
Normal file
5
tests/pass/crates/num_cpus.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
//@compile-flags: -Zmiri-disable-isolation
|
||||
|
||||
fn main() {
|
||||
assert_eq!(num_cpus::get(), 1);
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
use rand::{rngs::SmallRng, Rng, SeedableRng};
|
||||
// mac-os `getrandom_1` does some pointer shenanigans
|
||||
//@compile-flags: -Zmiri-permissive-provenance
|
||||
use rand::{rngs::SmallRng, Rng, SeedableRng};
|
||||
|
||||
fn main() {
|
||||
// Test `getrandom` directly (in multiple different versions).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue