tests/util: Bump rlimit version to 0.9.1 to be able to use prlimit on android

This commit is contained in:
Joining7943 2023-01-30 08:53:28 +01:00
parent 9fdce975fd
commit 2b5b0c82c1
3 changed files with 5 additions and 5 deletions

4
Cargo.lock generated
View file

@ -1833,9 +1833,9 @@ dependencies = [
[[package]] [[package]]
name = "rlimit" name = "rlimit"
version = "0.8.3" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7278a1ec8bfd4a4e07515c589f5ff7b309a373f987393aef44813d9dcf87aa3" checksum = "f8a29d87a652dc4d43c586328706bb5cdff211f3f39a530f240b53f7221dab8e"
dependencies = [ dependencies = [
"libc", "libc",
] ]

View file

@ -482,7 +482,7 @@ rstest = "0.16.0"
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dev-dependencies] [target.'cfg(any(target_os = "linux", target_os = "android"))'.dev-dependencies]
procfs = { version = "0.14", default-features = false } procfs = { version = "0.14", default-features = false }
rlimit = "0.8.3" rlimit = "0.9.1"
[target.'cfg(unix)'.dev-dependencies] [target.'cfg(unix)'.dev-dependencies]
nix = { workspace=true, features=["process", "signal", "user"] } nix = { workspace=true, features=["process", "signal", "user"] }

View file

@ -8,7 +8,7 @@
#![allow(dead_code)] #![allow(dead_code)]
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
#[cfg(target_os = "linux")] #[cfg(any(target_os = "linux", target_os = "android"))]
use rlimit::prlimit; use rlimit::prlimit;
use rstest::rstest; use rstest::rstest;
#[cfg(unix)] #[cfg(unix)]
@ -1406,7 +1406,7 @@ impl UCommand {
let child = command.spawn().unwrap(); let child = command.spawn().unwrap();
#[cfg(target_os = "linux")] #[cfg(any(target_os = "linux", target_os = "android"))]
for &(resource, soft_limit, hard_limit) in &self.limits { for &(resource, soft_limit, hard_limit) in &self.limits {
prlimit( prlimit(
child.id() as i32, child.id() as i32,