mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
Merge pull request #3909 from sylvestre/issue-3899
Bump Min Rust and fix test_closes_file_descriptors (Issue 3899)
This commit is contained in:
commit
f617652f48
7 changed files with 292 additions and 217 deletions
|
@ -1 +1 @@
|
||||||
msrv = "1.56.1"
|
msrv = "1.59.0"
|
||||||
|
|
2
.github/workflows/CICD.yml
vendored
2
.github/workflows/CICD.yml
vendored
|
@ -13,7 +13,7 @@ env:
|
||||||
PROJECT_NAME: coreutils
|
PROJECT_NAME: coreutils
|
||||||
PROJECT_DESC: "Core universal (cross-platform) utilities"
|
PROJECT_DESC: "Core universal (cross-platform) utilities"
|
||||||
PROJECT_AUTH: "uutils"
|
PROJECT_AUTH: "uutils"
|
||||||
RUST_MIN_SRV: "1.56.1" ## MSRV v1.56.1
|
RUST_MIN_SRV: "1.59.0" ## MSRV v1.59.0
|
||||||
# * style job configuration
|
# * style job configuration
|
||||||
STYLE_FAIL_ON_FAULT: true ## (bool) fail the build if a style job contains a fault (error or warning); may be overridden on a per-job basis
|
STYLE_FAIL_ON_FAULT: true ## (bool) fail the build if a style job contains a fault (error or warning); may be overridden on a per-job basis
|
||||||
|
|
||||||
|
|
474
Cargo.lock
generated
474
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
||||||
# coreutils (uutils)
|
# coreutils (uutils)
|
||||||
# * see the repository LICENSE, README, and CONTRIBUTING files for more information
|
# * see the repository LICENSE, README, and CONTRIBUTING files for more information
|
||||||
|
|
||||||
# spell-checker:ignore (libs) libselinux gethostid
|
# spell-checker:ignore (libs) libselinux gethostid procfs
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "coreutils"
|
name = "coreutils"
|
||||||
|
@ -16,6 +16,7 @@ repository = "https://github.com/uutils/coreutils"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"]
|
keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"]
|
||||||
categories = ["command-line-utilities"]
|
categories = ["command-line-utilities"]
|
||||||
|
rust-version = "1.59.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
@ -401,6 +402,7 @@ atty = "0.2"
|
||||||
hex-literal = "0.3.1"
|
hex-literal = "0.3.1"
|
||||||
|
|
||||||
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dev-dependencies]
|
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dev-dependencies]
|
||||||
|
procfs = "0.14"
|
||||||
rlimit = "0.8.3"
|
rlimit = "0.8.3"
|
||||||
|
|
||||||
[target.'cfg(unix)'.dev-dependencies]
|
[target.'cfg(unix)'.dev-dependencies]
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
[](https://deps.rs/repo/github/uutils/coreutils)
|
[](https://deps.rs/repo/github/uutils/coreutils)
|
||||||
|
|
||||||
[](https://codecov.io/gh/uutils/coreutils)
|
[](https://codecov.io/gh/uutils/coreutils)
|
||||||

|

|
||||||
|
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ Both can also be generated locally, the instructions for that can be found in th
|
||||||
### Rust Version
|
### Rust Version
|
||||||
|
|
||||||
uutils follows Rust's release channels and is tested against stable, beta and nightly.
|
uutils follows Rust's release channels and is tested against stable, beta and nightly.
|
||||||
The current Minimum Supported Rust Version (MSRV) is `1.56.1`.
|
The current Minimum Supported Rust Version (MSRV) is `1.59.0`.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,10 @@ highlight = "all"
|
||||||
skip = [
|
skip = [
|
||||||
# blake2d_simd
|
# blake2d_simd
|
||||||
{ name = "arrayvec", version = "=0.7.2" },
|
{ name = "arrayvec", version = "=0.7.2" },
|
||||||
|
# chrono
|
||||||
|
{ name = "time", version = "=0.1.44" },
|
||||||
|
# chrono => time (the same as the line above)
|
||||||
|
{ name = "wasi", "version" = "0.10.0+wasi-snapshot-preview1" },
|
||||||
# bindgen 0.59.2
|
# bindgen 0.59.2
|
||||||
{ name = "clap", version = "=2.34.0" },
|
{ name = "clap", version = "=2.34.0" },
|
||||||
{ name = "strsim", version = "=0.8.0" },
|
{ name = "strsim", version = "=0.8.0" },
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// spell-checker:ignore (flags) reflink (fs) tmpfs (linux) rlimit Rlim NOFILE clob btrfs ROOTDIR USERDIR
|
// spell-checker:ignore (flags) reflink (fs) tmpfs (linux) rlimit Rlim NOFILE clob btrfs ROOTDIR USERDIR procfs
|
||||||
|
|
||||||
use crate::common::util::*;
|
use crate::common::util::*;
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
|
@ -1379,12 +1379,27 @@ fn test_cp_reflink_insufficient_permission() {
|
||||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_closes_file_descriptors() {
|
fn test_closes_file_descriptors() {
|
||||||
|
use procfs::process::Process;
|
||||||
|
let me = Process::myself().unwrap();
|
||||||
|
|
||||||
|
// The test suite runs in parallel, we have pipe, sockets
|
||||||
|
// opened by other tests.
|
||||||
|
// So, we take in account the various fd to increase the limit
|
||||||
|
let number_file_already_opened: u64 = me.fd_count().unwrap().try_into().unwrap();
|
||||||
|
let limit_fd: u64 = number_file_already_opened + 9;
|
||||||
|
|
||||||
|
// For debugging purposes:
|
||||||
|
for f in me.fd().unwrap() {
|
||||||
|
let fd = f.unwrap();
|
||||||
|
println!("{:?} {:?}", fd, fd.mode());
|
||||||
|
}
|
||||||
|
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
.arg("-r")
|
.arg("-r")
|
||||||
.arg("--reflink=auto")
|
.arg("--reflink=auto")
|
||||||
.arg("dir_with_10_files/")
|
.arg("dir_with_10_files/")
|
||||||
.arg("dir_with_10_files_new/")
|
.arg("dir_with_10_files_new/")
|
||||||
.with_limit(Resource::NOFILE, 9, 9)
|
.with_limit(Resource::NOFILE, limit_fd, limit_fd)
|
||||||
.succeeds();
|
.succeeds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue