mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
do not attempt to open cgroup files under Miri
This commit is contained in:
parent
c8a49fc902
commit
51b4ea2ba1
@ -384,6 +384,11 @@ fn cgroup2_quota() -> usize {
|
|||||||
use crate::path::PathBuf;
|
use crate::path::PathBuf;
|
||||||
|
|
||||||
let mut quota = usize::MAX;
|
let mut quota = usize::MAX;
|
||||||
|
if cfg!(miri) {
|
||||||
|
// Attempting to open a file fails under default flags due to isolation.
|
||||||
|
// And Miri does not have parallelism anyway.
|
||||||
|
return quota;
|
||||||
|
}
|
||||||
|
|
||||||
let _: Option<()> = try {
|
let _: Option<()> = try {
|
||||||
let mut buf = Vec::with_capacity(128);
|
let mut buf = Vec::with_capacity(128);
|
||||||
|
Loading…
Reference in New Issue
Block a user