From 9db20e1bce8db1f29937ff016893af4561f2c0b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 00:48:34 +0000 Subject: [PATCH 1/8] chore(deps): bump h2 from 0.3.23 to 0.3.24 Bumps [h2](https://github.com/hyperium/h2) from 0.3.23 to 0.3.24. - [Release notes](https://github.com/hyperium/h2/releases) - [Changelog](https://github.com/hyperium/h2/blob/v0.3.24/CHANGELOG.md) - [Commits](https://github.com/hyperium/h2/compare/v0.3.23...v0.3.24) --- updated-dependencies: - dependency-name: h2 dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9ab891c88..b7b58774b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1475,9 +1475,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b553656127a00601c8ae5590fcfdc118e4083a7924b6cf4ffc1ea4b99dc429d7" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", From ee86f415fb390cdbdbcb75bb2a0d4a1630a5d9c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 00:59:54 +0000 Subject: [PATCH 2/8] chore(deps): bump rayon-core from 1.12.0 to 1.12.1 Bumps [rayon-core](https://github.com/rayon-rs/rayon) from 1.12.0 to 1.12.1. - [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md) - [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.12.0...rayon-core-v1.12.1) --- updated-dependencies: - dependency-name: rayon-core dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9ab891c88..722d87e43c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2875,9 +2875,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", From a07f4f3d441038ad6373e5ba0037bdd27a592649 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 05:27:18 +0000 Subject: [PATCH 3/8] chore(deps): bump the patch group with 6 updates Bumps the patch group with 6 updates: | Package | From | To | | --- | --- | --- | | [env_logger](https://github.com/rust-cli/env_logger) | `0.10.1` | `0.10.2` | | [anstream](https://github.com/rust-cli/anstyle) | `0.6.8` | `0.6.9` | | [hermit-abi](https://github.com/hermitcore/hermit-rs) | `0.3.3` | `0.3.4` | | [pkg-config](https://github.com/rust-lang/pkg-config-rs) | `0.3.28` | `0.3.29` | | [rayon](https://github.com/rayon-rs/rayon) | `1.8.0` | `1.8.1` | | [unicode-bidi](https://github.com/servo/unicode-bidi) | `0.3.14` | `0.3.15` | Updates `env_logger` from 0.10.1 to 0.10.2 - [Release notes](https://github.com/rust-cli/env_logger/releases) - [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-cli/env_logger/compare/v0.10.1...v0.10.2) Updates `anstream` from 0.6.8 to 0.6.9 - [Commits](https://github.com/rust-cli/anstyle/compare/anstream-v0.6.8...anstream-v0.6.9) Updates `hermit-abi` from 0.3.3 to 0.3.4 - [Release notes](https://github.com/hermitcore/hermit-rs/releases) - [Commits](https://github.com/hermitcore/hermit-rs/compare/hermit-abi-0.3.3...hermit-abi-0.3.4) Updates `pkg-config` from 0.3.28 to 0.3.29 - [Changelog](https://github.com/rust-lang/pkg-config-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/pkg-config-rs/compare/0.3.28...0.3.29) Updates `rayon` from 1.8.0 to 1.8.1 - [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md) - [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.0...rayon-core-v1.8.1) Updates `unicode-bidi` from 0.3.14 to 0.3.15 - [Release notes](https://github.com/servo/unicode-bidi/releases) - [Commits](https://github.com/servo/unicode-bidi/commits) --- updated-dependencies: - dependency-name: env_logger dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patch - dependency-name: anstream dependency-type: indirect update-type: version-update:semver-patch dependency-group: patch - dependency-name: hermit-abi dependency-type: indirect update-type: version-update:semver-patch dependency-group: patch - dependency-name: pkg-config dependency-type: indirect update-type: version-update:semver-patch dependency-group: patch - dependency-name: rayon dependency-type: indirect update-type: version-update:semver-patch dependency-group: patch - dependency-name: unicode-bidi dependency-type: indirect update-type: version-update:semver-patch dependency-group: patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 06f654dfff..97a93a55fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -81,9 +81,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628a8f9bd1e24b4e0db2b4bc2d000b001e7dd032d54afa60a68836aeec5aa54a" +checksum = "3fde6067df7359f2d6335ec1a50c1f8f825801687d10da0cc4c6b08e3f6afd15" dependencies = [ "anstyle", "anstyle-parse", @@ -1145,9 +1145,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -1201,7 +1201,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a3cc21c33af89af0930c8cae4ade5e6fdc17b5d2c97b3d2e2edb67a1cf683f3" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "log", ] @@ -1561,9 +1561,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -1904,7 +1904,7 @@ version = "0.3.1" dependencies = [ "anyhow", "clap", - "env_logger 0.10.1", + "env_logger 0.10.2", "errno", "fixedbitset", "libbpf-sys", @@ -2556,9 +2556,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "pnet_base" @@ -2865,9 +2865,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -4171,9 +4171,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" From 8db3599c86bf8cbdeb83d9e1f2f91eb81660e2eb Mon Sep 17 00:00:00 2001 From: Yashodhan <54112038+YJDoc2@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:04:38 +0530 Subject: [PATCH 4/8] Roll up various minor and major version dep upgrade (#2638) * Update minor version uptick deps * Major version upgrade: wasmtime and wasmtime-wasi --- Cargo.lock | 571 +++++++++++++++++++--------------------- crates/youki/Cargo.toml | 4 +- 2 files changed, 276 insertions(+), 299 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 97a93a55fe..08dfc579dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addr2line" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" -dependencies = [ - "gimli 0.27.3", -] - [[package]] name = "addr2line" version = "0.21.0" @@ -189,12 +180,12 @@ version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.21.0", + "addr2line", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.32.2", + "object", "rustc-demangle", ] @@ -317,38 +308,50 @@ dependencies = [ [[package]] name = "cap-fs-ext" -version = "1.0.15" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc48200a1a0fa6fba138b1802ad7def18ec1cdd92f7b2a04e21f1bd887f7b9" +checksum = "88e341d15ac1029aadce600be764a1a1edafe40e03cde23285bc1d261b3a4866" dependencies = [ "cap-primitives", "cap-std", - "io-lifetimes 1.0.11", - "windows-sys 0.48.0", + "io-lifetimes", + "windows-sys 0.52.0", +] + +[[package]] +name = "cap-net-ext" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434168fe6533055f0f4204039abe3ff6d7db338ef46872a5fa39e9d5ad5ab7a9" +dependencies = [ + "cap-primitives", + "cap-std", + "rustix", + "smallvec", ] [[package]] name = "cap-primitives" -version = "1.0.15" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b6df5b295dca8d56f35560be8c391d59f0420f72e546997154e24e765e6451" +checksum = "fe16767ed8eee6d3f1f00d6a7576b81c226ab917eb54b96e5f77a5216ef67abb" dependencies = [ "ambient-authority", "fs-set-times", "io-extras", - "io-lifetimes 1.0.11", + "io-lifetimes", "ipnet", "maybe-owned", - "rustix 0.37.27", - "windows-sys 0.48.0", - "winx 0.35.1", + "rustix", + "windows-sys 0.52.0", + "winx", ] [[package]] name = "cap-rand" -version = "1.0.15" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d25555efacb0b5244cf1d35833d55d21abc916fff0eaad254b8e2453ea9b8ab" +checksum = "20e5695565f0cd7106bc3c7170323597540e772bb73e0be2cd2c662a0f8fa4ca" dependencies = [ "ambient-authority", "rand", @@ -356,26 +359,28 @@ dependencies = [ [[package]] name = "cap-std" -version = "1.0.15" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3373a62accd150b4fcba056d4c5f3b552127f0ec86d3c8c102d60b978174a012" +checksum = "593db20e4c51f62d3284bae7ee718849c3214f93a3b94ea1899ad85ba119d330" dependencies = [ "cap-primitives", "io-extras", - "io-lifetimes 1.0.11", - "rustix 0.37.27", + "io-lifetimes", + "rustix", ] [[package]] name = "cap-time-ext" -version = "1.0.15" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e95002993b7baee6b66c8950470e59e5226a23b3af39fc59c47fe416dd39821a" +checksum = "03261630f291f425430a36f38c847828265bc928f517cdd2004c56f4b02f002b" dependencies = [ + "ambient-authority", "cap-primitives", + "iana-time-zone", "once_cell", - "rustix 0.37.27", - "winx 0.35.1", + "rustix", + "winx", ] [[package]] @@ -611,11 +616,11 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aae6f552c4c0ccfb30b9559b77bc985a387d998e1736cbbe6b14c903f3656cf" +checksum = "7c22542c0b95bd3302f7ed6839869c561f2324bac2fd5e7e99f5cfa65fdc8b92" dependencies = [ - "cranelift-entity 0.97.2", + "cranelift-entity 0.103.0", ] [[package]] @@ -641,19 +646,19 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95551de96900cefae691ce895ff2abc691ae3a0b97911a76b45faf99e432937b" +checksum = "6b3db903ef2e9c8a4de2ea6db5db052c7857282952f9df604aa55d169e6000d8" dependencies = [ "bumpalo", - "cranelift-bforest 0.97.2", - "cranelift-codegen-meta 0.97.2", - "cranelift-codegen-shared 0.97.2", + "cranelift-bforest 0.103.0", + "cranelift-codegen-meta 0.103.0", + "cranelift-codegen-shared 0.103.0", "cranelift-control", - "cranelift-entity 0.97.2", - "cranelift-isle 0.97.2", - "gimli 0.27.3", - "hashbrown 0.13.2", + "cranelift-entity 0.103.0", + "cranelift-isle 0.103.0", + "gimli 0.28.1", + "hashbrown 0.14.3", "log", "regalloc2 0.9.3", "smallvec", @@ -671,11 +676,11 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a3ad7b2bb03de3383f258b00ca29d80234bebd5130cb6ef3bae37ada5baab0" +checksum = "6590feb5a1d6438f974bf6a5ac4dddf69fca14e1f07f3265d880f69e61a94463" dependencies = [ - "cranelift-codegen-shared 0.97.2", + "cranelift-codegen-shared 0.103.0", ] [[package]] @@ -686,15 +691,15 @@ checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" [[package]] name = "cranelift-codegen-shared" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915918fee4142c85fb04bafe0bcd697e2fd6c15a260301ea6f8d2ea332a30e86" +checksum = "7239038c56fafe77fddc8788fc8533dd6c474dc5bdc5637216404f41ba807330" [[package]] name = "cranelift-control" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e447d548cd7f4fcb87fbd10edbd66a4f77966d17785ed50a08c8f3835483c8" +checksum = "f7dc9c595341404d381d27a3d950160856b35b402275f0c3990cd1ad683c8053" dependencies = [ "arbitrary", ] @@ -721,11 +726,12 @@ checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" [[package]] name = "cranelift-entity" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d8ab3352a1e5966968d7ab424bd3de8e6b58314760745c3817c2eec3fa2f918" +checksum = "44e3ee532fc4776c69bcedf7e62f9632cbb3f35776fa9a525cdade3195baa3f7" dependencies = [ "serde", + "serde_derive", ] [[package]] @@ -742,11 +748,11 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bffa38431f7554aa1594f122263b87c9e04abc55c9f42b81d37342ac44f79f0" +checksum = "a612c94d09e653662ec37681dc2d6fd2b9856e6df7147be0afc9aabb0abf19df" dependencies = [ - "cranelift-codegen 0.97.2", + "cranelift-codegen 0.103.0", "log", "smallvec", "target-lexicon", @@ -760,34 +766,34 @@ checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" [[package]] name = "cranelift-isle" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84cef66a71c77938148b72bf006892c89d6be9274a08f7e669ff15a56145d701" +checksum = "85db9830abeb1170b7d29b536ffd55af1d4d26ac8a77570b5d1aca003bf225cc" [[package]] name = "cranelift-native" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f33c7e5eb446e162d2d10b17fe68e1f091020cc2e4e38b5501c21099600b0a1b" +checksum = "301ef0edafeaeda5771a5d2db64ac53e1818ae3111220a185677025fe91db4a1" dependencies = [ - "cranelift-codegen 0.97.2", + "cranelift-codegen 0.103.0", "libc", "target-lexicon", ] [[package]] name = "cranelift-wasm" -version = "0.97.2" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f7b64fa6a8c5b980eb6a17ef22089e15cb9f779f1ed3bd3072beab0686c09" +checksum = "380f0abe8264e4570ac615fc31cef32a3b90a77f7eb97b08331f9dd357b1f500" dependencies = [ - "cranelift-codegen 0.97.2", - "cranelift-entity 0.97.2", - "cranelift-frontend 0.97.2", - "itertools 0.10.5", + "cranelift-codegen 0.103.0", + "cranelift-entity 0.103.0", + "cranelift-frontend 0.103.0", + "itertools", "log", "smallvec", - "wasmparser 0.107.0", + "wasmparser 0.118.1", "wasmtime-types", ] @@ -1178,6 +1184,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + [[package]] name = "fastrand" version = "2.0.1" @@ -1191,20 +1203,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" dependencies = [ "cfg-if", - "rustix 0.38.28", + "rustix", "windows-sys 0.52.0", ] -[[package]] -name = "file-per-thread-logger" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3cc21c33af89af0930c8cae4ade5e6fdc17b5d2c97b3d2e2edb67a1cf683f3" -dependencies = [ - "env_logger 0.10.2", - "log", -] - [[package]] name = "filetime" version = "0.2.23" @@ -1271,13 +1273,13 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "fs-set-times" -version = "0.19.2" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d167b646a876ba8fda6b50ac645cfd96242553cbaf0ca4fccaa39afcbf0801f" +checksum = "033b337d725b97690d86893f9de22b67b80dcc4e9ad815f348254c38119db8fb" dependencies = [ - "io-lifetimes 1.0.11", - "rustix 0.38.28", - "windows-sys 0.48.0", + "io-lifetimes", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -1445,28 +1447,22 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ - "fallible-iterator", + "fallible-iterator 0.2.0", "indexmap 1.9.3", "stable_deref_trait", ] [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" dependencies = [ - "fallible-iterator", - "indexmap 1.9.3", + "fallible-iterator 0.3.0", + "indexmap 2.1.0", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - [[package]] name = "glob" version = "0.3.1" @@ -1530,6 +1526,9 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash 0.8.7", +] [[package]] name = "heapless" @@ -1740,23 +1739,12 @@ dependencies = [ [[package]] name = "io-extras" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fde93d48f0d9277f977a333eca8313695ddd5301dc96f7e02aeddcb0dd99096f" -dependencies = [ - "io-lifetimes 1.0.11", - "windows-sys 0.48.0", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +checksum = "c301e73fb90e8a29e600a9f402d095765f74310d582916a952f618836a1bd1ed" dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", + "io-lifetimes", + "windows-sys 0.52.0", ] [[package]] @@ -1787,7 +1775,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ "hermit-abi", - "rustix 0.38.28", + "rustix", "windows-sys 0.52.0", ] @@ -1800,15 +1788,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.10" @@ -1817,9 +1796,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "ittapi" -version = "0.3.5" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a5c0b993601cad796222ea076565c5d9f337d35592f8622c753724f06d7271" +checksum = "6b996fe614c41395cdaedf3cf408a9534851090959d90d54a535f675550b64b1" dependencies = [ "anyhow", "ittapi-sys", @@ -1828,9 +1807,9 @@ dependencies = [ [[package]] name = "ittapi-sys" -version = "0.3.5" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7b5e473765060536a660eed127f758cf1a810c73e49063264959c60d1727d9" +checksum = "52f5385394064fa2c886205dba02598013ce83d3e92d33dbdc0c52fe0e7bf4fc" dependencies = [ "cc", ] @@ -2016,12 +1995,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.12" @@ -2080,7 +2053,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.28", + "rustix", ] [[package]] @@ -2322,24 +2295,15 @@ dependencies = [ "libc", ] -[[package]] -name = "object" -version = "0.30.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" -dependencies = [ - "crc32fast", - "hashbrown 0.13.2", - "indexmap 1.9.3", - "memchr", -] - [[package]] name = "object" version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ + "crc32fast", + "hashbrown 0.14.3", + "indexmap 2.1.0", "memchr", ] @@ -2616,12 +2580,11 @@ dependencies = [ [[package]] name = "predicates" -version = "3.0.4" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0" +checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" dependencies = [ "anstyle", - "itertools 0.11.0", "predicates-core", ] @@ -2702,7 +2665,7 @@ dependencies = [ "hex", "lazy_static", "procfs-core", - "rustix 0.38.28", + "rustix", ] [[package]] @@ -3149,22 +3112,6 @@ dependencies = [ "semver 1.0.21", ] -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes 1.0.11", - "itoa", - "libc", - "linux-raw-sys 0.3.8", - "once_cell", - "windows-sys 0.48.0", -] - [[package]] name = "rustix" version = "0.38.28" @@ -3173,8 +3120,10 @@ checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ "bitflags 2.4.2", "errno", + "itoa", "libc", - "linux-raw-sys 0.4.12", + "linux-raw-sys", + "once_cell", "windows-sys 0.52.0", ] @@ -3566,9 +3515,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.11.2" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" [[package]] name = "socket2" @@ -3710,18 +3659,18 @@ dependencies = [ [[package]] name = "system-interface" -version = "0.25.9" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10081a99cbecbc363d381b9503563785f0b02735fccbb0d4c1a2cb3d39f7e7fe" +checksum = "0682e006dd35771e392a6623ac180999a9a854b1d4a6c12fb2e804941c2b1f58" dependencies = [ "bitflags 2.4.2", "cap-fs-ext", "cap-std", "fd-lock", - "io-lifetimes 2.0.3", - "rustix 0.38.28", - "windows-sys 0.48.0", - "winx 0.36.3", + "io-lifetimes", + "rustix", + "windows-sys 0.52.0", + "winx", ] [[package]] @@ -3765,7 +3714,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall", - "rustix 0.38.28", + "rustix", "windows-sys 0.52.0", ] @@ -4264,11 +4213,12 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "8.2.10" +version = "8.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a78365c3f8ca9dc5428a9f5c6349558c3f9f3eeb65e3fc00b6a981379462947" +checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" dependencies = [ "anyhow", + "cfg-if", "rustversion", "time 0.3.31", ] @@ -4456,9 +4406,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-cap-std-sync" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2fe3aaf51c1e1a04a490e89f0a9cab789d21a496c0ce398d49a24f8df883a58" +checksum = "154528979a211aa28d969846e883df75705809ed9bcc70aba61460683ea7355b" dependencies = [ "anyhow", "async-trait", @@ -4468,10 +4418,9 @@ dependencies = [ "cap-time-ext", "fs-set-times", "io-extras", - "io-lifetimes 1.0.11", - "is-terminal", + "io-lifetimes", "once_cell", - "rustix 0.37.27", + "rustix", "system-interface", "tracing", "wasi-common", @@ -4480,17 +4429,17 @@ dependencies = [ [[package]] name = "wasi-common" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74e9a2c8bfda59870a8bff38a31b9ba80b6fdb7abdfd2487177b85537d2e8a8" +checksum = "3d888b611fee7d273dd057dc009d2dd3132736f36710ffd65657ac83628d1e3b" dependencies = [ "anyhow", - "bitflags 1.3.2", + "bitflags 2.4.2", "cap-rand", "cap-std", "io-extras", "log", - "rustix 0.37.27", + "rustix", "thiserror", "tracing", "wasmtime", @@ -4589,9 +4538,9 @@ checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-encoder" -version = "0.29.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18c41dbd92eaebf3612a39be316540b8377c871cb9bde6b064af962984912881" +checksum = "0ad2b51884de9c7f4fe2fd1043fccb8dcad4b1e29558146ee57a144d15779f3f" dependencies = [ "leb128", ] @@ -4908,11 +4857,11 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.107.0" +version = "0.118.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +checksum = "95ee9723b928e735d53000dec9eae7b07a60e490c85ab54abb66659fc61bfcd9" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.1.0", "semver 1.0.21", ] @@ -4939,9 +4888,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc104ced94ff0a6981bde77a0bc29aab4af279914a4143b8d1af9fd4b2c9d41" +checksum = "a8e539fded2495422ea3c4dfa7beeddba45904eece182cf315294009e1a323bf" dependencies = [ "anyhow", "async-trait", @@ -4950,18 +4899,19 @@ dependencies = [ "cfg-if", "encoding_rs", "fxprof-processed-profile", - "indexmap 1.9.3", + "indexmap 2.1.0", "libc", "log", - "object 0.30.4", + "object", "once_cell", "paste", - "psm", "rayon", "serde", + "serde_derive", "serde_json", "target-lexicon", - "wasmparser 0.107.0", + "wasm-encoder 0.38.1", + "wasmparser 0.118.1", "wasmtime-cache", "wasmtime-component-macro", "wasmtime-component-util", @@ -4977,27 +4927,27 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b28e5661a9b5f7610a62ab3c69222fa161f7bd31d04529e856461d8c3e706b" +checksum = "660ba9143e15a2acd921820df221b73aee256bd3ca2d208d73d8adc9587ccbb9" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f58ddfe801df3886feaf466d883ea37e941bcc6d841b9f644a08c7acabfe7f8" +checksum = "a3ce373743892002f9391c6741ef0cb0335b55ec899d874f311222b7e36f4594" dependencies = [ "anyhow", "base64", "bincode", "directories-next", - "file-per-thread-logger", "log", - "rustix 0.37.27", + "rustix", "serde", + "serde_derive", "sha2", "toml 0.5.11", "windows-sys 0.48.0", @@ -5006,14 +4956,14 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39725d9633fb064bd3a6d83c5ea5077289256de0862d3d96295822edb13419c0" +checksum = "12ef32643324e564e1c359e9044daa06cbf90d7e2d6c99a738d17a12959f01a5" dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser", @@ -5021,66 +4971,69 @@ dependencies = [ [[package]] name = "wasmtime-component-util" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1153feafc824f95dc69472cb89a3396b3b05381f781a7508b01840f9df7b1a51" +checksum = "8c87d06c18d21a4818f354c00a85f4ebc62b2270961cd022968452b0e4dbed9d" [[package]] name = "wasmtime-cranelift" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc1e39ce9aa0fa0b319541ed423960b06cfa7343eca1574f811ea34275739c2" +checksum = "2d648c8b4064a7911093b02237cd5569f71ca171d3a0a486bf80600b19e1cba2" dependencies = [ "anyhow", - "cranelift-codegen 0.97.2", + "cfg-if", + "cranelift-codegen 0.103.0", "cranelift-control", - "cranelift-entity 0.97.2", - "cranelift-frontend 0.97.2", + "cranelift-entity 0.103.0", + "cranelift-frontend 0.103.0", "cranelift-native", "cranelift-wasm", - "gimli 0.27.3", + "gimli 0.28.1", "log", - "object 0.30.4", + "object", "target-lexicon", "thiserror", - "wasmparser 0.107.0", + "wasmparser 0.118.1", "wasmtime-cranelift-shared", "wasmtime-environ", + "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-cranelift-shared" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd32739326690e51c76551d7cbf29d371e7de4dc7b37d2d503be314ab5b7d04" +checksum = "290a89027688782da8ff60b12bb95695494b1874e0d0ba2ba387d23dace6d70c" dependencies = [ "anyhow", - "cranelift-codegen 0.97.2", + "cranelift-codegen 0.103.0", "cranelift-control", "cranelift-native", - "gimli 0.27.3", - "object 0.30.4", + "gimli 0.28.1", + "object", "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b60e4ae5c9ae81750d8bc59110bf25444aa1d9266c19999c3b64b801db3c73" +checksum = "61eb64fb3e0da883e2df4a13a81d6282e072336e6cb6295021d0f7ab2e352754" dependencies = [ "anyhow", - "cranelift-entity 0.97.2", - "gimli 0.27.3", - "indexmap 1.9.3", + "cranelift-entity 0.103.0", + "gimli 0.28.1", + "indexmap 2.1.0", "log", - "object 0.30.4", + "object", "serde", + "serde_derive", "target-lexicon", "thiserror", - "wasm-encoder 0.29.0", - "wasmparser 0.107.0", + "wasm-encoder 0.38.1", + "wasmparser 0.118.1", "wasmprinter", "wasmtime-component-util", "wasmtime-types", @@ -5088,35 +5041,38 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd40c8d869916ee6b1f3fcf1858c52041445475ca8550aee81c684c0eb530ca" +checksum = "40ecf1d3a838b0956b71ad3f8cb80069a228339775bf02dd35d86a5a68bbe443" dependencies = [ + "anyhow", "cc", "cfg-if", - "rustix 0.37.27", + "rustix", "wasmtime-asm-macros", + "wasmtime-versioned-export-macros", "windows-sys 0.48.0", ] [[package]] name = "wasmtime-jit" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655b23a10eddfe7814feb548a466f3f25aa4bb4f43098a147305c544a2de28e1" +checksum = "f485336add49267d8859e8f8084d2d4b9a4b1564496b6f30ba5b168d50c10ceb" dependencies = [ - "addr2line 0.19.0", + "addr2line", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.27.3", + "gimli 0.28.1", "ittapi", "log", - "object 0.30.4", + "object", "rustc-demangle", - "rustix 0.37.27", + "rustix", "serde", + "serde_derive", "target-lexicon", "wasmtime-environ", "wasmtime-jit-debug", @@ -5127,20 +5083,21 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e46b7e98979a69d3df093076bde8431204e3c96a770e8d216fea365c627d88a4" +checksum = "65e119affec40edb2fab9044f188759a00c2df9c3017278d047012a2de1efb4f" dependencies = [ - "object 0.30.4", + "object", "once_cell", - "rustix 0.37.27", + "rustix", + "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb1e7c68ede63dc7a98c3e473162954e224951854e229c8b4e74697fe17dbdd" +checksum = "6b6d197fcc34ad32ed440e1f9552fd57d1f377d9699d31dee1b5b457322c1f8a" dependencies = [ "cfg-if", "libc", @@ -5149,63 +5106,86 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843e33bf9e0f0c57902c87a1dea1389cc23865c65f007214318dbdfcb3fd4ae5" +checksum = "794b2bb19b99ef8322ff0dd9fe1ba7e19c41036dfb260b3f99ecce128c42ff92" dependencies = [ "anyhow", "cc", "cfg-if", "encoding_rs", - "indexmap 1.9.3", + "indexmap 2.1.0", "libc", "log", "mach", "memfd", - "memoffset 0.8.0", + "memoffset 0.9.0", "paste", - "rand", - "rustix 0.37.27", + "psm", + "rustix", "sptr", + "wasm-encoder 0.38.1", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-fiber", "wasmtime-jit-debug", + "wasmtime-versioned-export-macros", + "wasmtime-wmemcheck", "windows-sys 0.48.0", ] [[package]] name = "wasmtime-types" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7473a07bebd85671bada453123e3d465c8e0a59668ff79f5004076e6a2235ef5" +checksum = "d995db8bb56f2cd8d2dc0ed5ffab94ffb435283b0fe6747f80f7aab40b2d06a1" dependencies = [ - "cranelift-entity 0.97.2", + "cranelift-entity 0.103.0", "serde", + "serde_derive", "thiserror", - "wasmparser 0.107.0", + "wasmparser 0.118.1", +] + +[[package]] +name = "wasmtime-versioned-export-macros" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55c5565959287c21dd0f4277ae3518dd2ae62679f655ee2dbc4396e19d210db" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", ] [[package]] name = "wasmtime-wasi" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff7b3b3272ad5b4ba63c9aac6248da6f06a8227d0c0d6017d89225d794e966c" +checksum = "ccd8370078149d49a3a47e93741553fd79b700421464b6a27ca32718192ab130" dependencies = [ "anyhow", "async-trait", - "bitflags 1.3.2", + "bitflags 2.4.2", + "bytes", "cap-fs-ext", + "cap-net-ext", "cap-rand", "cap-std", "cap-time-ext", "fs-set-times", + "futures", "io-extras", + "io-lifetimes", "libc", - "rustix 0.37.27", + "log", + "once_cell", + "rustix", "system-interface", "thiserror", + "tokio", "tracing", + "url", "wasi-cap-std-sync", "wasi-common", "wasmtime", @@ -5215,16 +5195,16 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351c9d4e60658dd0cf616c12c5508f86cc2cefcc0cff307eed0a31b23d3c0b70" +checksum = "2c6f945ff9bad96e0a69973d74f193c19f627c8adbf250e7cb73ae7564b6cc8a" dependencies = [ "anyhow", - "cranelift-codegen 0.97.2", - "gimli 0.27.3", - "object 0.30.4", + "cranelift-codegen 0.103.0", + "gimli 0.28.1", + "object", "target-lexicon", - "wasmparser 0.107.0", + "wasmparser 0.118.1", "wasmtime-cranelift-shared", "wasmtime-environ", "winch-codegen", @@ -5232,15 +5212,22 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f114407efbd09e4ef67053b6ae54c16455a821ef2f6096597fcba83b7625e59c" +checksum = "f328b2d4a690270324756e886ed5be3a4da4c00be0eea48253f4595ad068062b" dependencies = [ "anyhow", "heck 0.4.1", + "indexmap 2.1.0", "wit-parser", ] +[[package]] +name = "wasmtime-wmemcheck" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67761d8f8c0b3c13a5d34356274b10a40baba67fe9cfabbfc379a8b414e45de2" + [[package]] name = "wast" version = "35.0.2" @@ -5334,7 +5321,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.28", + "rustix", ] [[package]] @@ -5346,19 +5333,19 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.28", + "rustix", "windows-sys 0.48.0", ] [[package]] name = "wiggle" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63f150c6e39ef29a58139564c5ed7a0ef34d6df8a8eecd4233af85a576968d9" +checksum = "0afb26cd3269289bb314a361ff0a6685e5ce793b62181a9fe3f81ace15051697" dependencies = [ "anyhow", "async-trait", - "bitflags 1.3.2", + "bitflags 2.4.2", "thiserror", "tracing", "wasmtime", @@ -5367,28 +5354,28 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f31e961fb0a5ad3ff10689c85f327f4abf10b4cac033b9d7372ccbb106aea24" +checksum = "cef2868fed7584d2b552fa317104858ded80021d23b073b2d682d3c932a027bd" dependencies = [ "anyhow", "heck 0.4.1", "proc-macro2", "quote", "shellexpand", - "syn 1.0.109", + "syn 2.0.48", "witx", ] [[package]] name = "wiggle-macro" -version = "10.0.2" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a28ae3d6b90f212beca7fab5910d0a3b1a171290c06eaa81bb39f41e6f74589" +checksum = "31ae1ec11a17ea481539ee9a5719a278c9790d974060fbf71db4b2c05378780b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", "wiggle-generate", ] @@ -5425,17 +5412,17 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.8.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf2ac354be169bb201de7867b84f45d91d0ef812f67f11c33f74a7f5a24e56" +checksum = "58e58c236a6abdd9ab454552b4f29e16cfa837a86897c1503313b2e62e7609ec" dependencies = [ "anyhow", - "cranelift-codegen 0.97.2", - "gimli 0.27.3", + "cranelift-codegen 0.103.0", + "gimli 0.28.1", "regalloc2 0.9.3", "smallvec", "target-lexicon", - "wasmparser 0.107.0", + "wasmparser 0.118.1", "wasmtime-environ", ] @@ -5642,17 +5629,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winx" -version = "0.35.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c52a121f0fbf9320d5f2a9a5d82f6cb7557eda5e8b47fc3e7f359ec866ae960" -dependencies = [ - "bitflags 1.3.2", - "io-lifetimes 1.0.11", - "windows-sys 0.48.0", -] - [[package]] name = "winx" version = "0.36.3" @@ -5665,18 +5641,19 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.8.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6daec9f093dbaea0e94043eeb92ece327bbbe70c86b1f41aca9bbfefd7f050f0" +checksum = "df4913a2219096373fd6512adead1fb77ecdaa59d7fc517972a7d30b12f625be" dependencies = [ "anyhow", "id-arena", - "indexmap 1.9.3", + "indexmap 2.1.0", "log", - "pulldown-cmark", "semver 1.0.21", + "serde", + "serde_derive", + "serde_json", "unicode-xid", - "url", ] [[package]] @@ -5707,8 +5684,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "914566e6413e7fa959cc394fb30e563ba80f3541fbd40816d4c05a0fc3f2a0f1" dependencies = [ "libc", - "linux-raw-sys 0.4.12", - "rustix 0.38.28", + "linux-raw-sys", + "rustix", ] [[package]] diff --git a/crates/youki/Cargo.toml b/crates/youki/Cargo.toml index 755d216733..21a3fd710a 100644 --- a/crates/youki/Cargo.toml +++ b/crates/youki/Cargo.toml @@ -44,8 +44,8 @@ caps = "0.5.5" wasmer = { version = "4.0.0", optional = true } wasmer-wasix = { version = "0.9.0", optional = true } wasmedge-sdk = { version = "0.13.2", optional = true } -wasmtime = { version = "10.0.2", optional = true } -wasmtime-wasi = { version = "10.0.2", optional = true } +wasmtime = { version = "16.0.0", optional = true } +wasmtime-wasi = { version = "16.0.0", optional = true } tracing = { version = "0.1.40", features = ["attributes"] } tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] } tracing-journald = "0.3.0" From 8386337bc01bcfb1da26b7ff308577468950090b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 01:18:14 +0000 Subject: [PATCH 5/8] chore(deps): bump the patch group with 2 updates Bumps the patch group with 2 updates: [anstream](https://github.com/rust-cli/anstyle) and [rustix](https://github.com/bytecodealliance/rustix). Updates `anstream` from 0.6.9 to 0.6.11 - [Commits](https://github.com/rust-cli/anstyle/compare/anstream-v0.6.9...anstream-v0.6.11) Updates `rustix` from 0.38.28 to 0.38.30 - [Release notes](https://github.com/bytecodealliance/rustix/releases) - [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.28...v0.38.30) --- updated-dependencies: - dependency-name: anstream dependency-type: indirect update-type: version-update:semver-patch dependency-group: patch - dependency-name: rustix dependency-type: indirect update-type: version-update:semver-patch dependency-group: patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 08dfc579dd..c07ecf1e3f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,9 +72,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fde6067df7359f2d6335ec1a50c1f8f825801687d10da0cc4c6b08e3f6afd15" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -3114,9 +3114,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ "bitflags 2.4.2", "errno", From 09e39894340e4b8cbbc2df6bcd50ce3f302cf634 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 01:40:39 +0000 Subject: [PATCH 6/8] chore(deps): bump linux-raw-sys from 0.4.12 to 0.4.13 Bumps [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) from 0.4.12 to 0.4.13. - [Commits](https://github.com/sunfishcode/linux-raw-sys/compare/v0.4.12...v0.4.13) --- updated-dependencies: - dependency-name: linux-raw-sys dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 08dfc579dd..c65d4bb05e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1997,9 +1997,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" From 3f08ae716735f09986822e5129cee30aec2aed32 Mon Sep 17 00:00:00 2001 From: Jorge Prendes Date: Sat, 20 Jan 2024 01:16:08 +0000 Subject: [PATCH 7/8] add docker-in-docker e2e test (#2645) Signed-off-by: Jorge Prendes --- .github/workflows/e2e.yaml | 24 ++++++++++++++++++++++++ justfile | 3 +++ tests/dind/daemon.json | 7 +++++++ tests/dind/run.sh | 20 ++++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 tests/dind/daemon.json create mode 100755 tests/dind/run.sh diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index e732a29320..fb2f3f628a 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -182,3 +182,27 @@ jobs: run: chmod +x ./youki - name: Run tests run: just test-rootless-podman + + docker-in-docker: + runs-on: ${{ matrix.os }} + needs: [youki-build] + timeout-minutes: 5 + strategy: + matrix: + # ubuntu 20.04 has cgroups-v1 + # ubuntu 22.04 has cgroups-v2 + os: [ "ubuntu-22.04", "ubuntu-20.04" ] + steps: + - uses: actions/checkout@v3 + - name: Install just + uses: taiki-e/install-action@just + - name: Download youki binary + uses: actions/download-artifact@v3 + with: + name: youki-x86_64-musl + - name: Add the permission to run + run: chmod +x ./youki + - name: Run tests + run: just test-dind + + diff --git a/justfile b/justfile index 59ebf1b90d..853a0cf1bc 100644 --- a/justfile +++ b/justfile @@ -65,6 +65,9 @@ validate-contest-runc: contest test-rootless-podman: {{ cwd }}/tests/rootless-tests/run.sh {{ cwd }}/youki +# test docker-in-docker works with youki +test-dind: + {{ cwd }}/tests/dind/run.sh # run containerd integration tests containerd-test: youki-dev diff --git a/tests/dind/daemon.json b/tests/dind/daemon.json new file mode 100644 index 0000000000..a1cdbedd14 --- /dev/null +++ b/tests/dind/daemon.json @@ -0,0 +1,7 @@ +{ + "runtimes": { + "youki": { + "path": "/usr/bin/youki" + } + } +} \ No newline at end of file diff --git a/tests/dind/run.sh b/tests/dind/run.sh new file mode 100755 index 0000000000..0aced7203a --- /dev/null +++ b/tests/dind/run.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +ROOT=$(git rev-parse --show-toplevel) + +docker run --privileged -dq \ + --name youki-test-dind \ + -v $ROOT/youki:/usr/bin/youki \ + -v $ROOT/tests/dind/daemon.json:/etc/docker/daemon.json \ + docker:dind > /dev/null + +trap "docker rm -f youki-test-dind > /dev/null" EXIT + +# wait for docker to start +timeout 30s \ + grep -q -m1 "/var/run/docker.sock" \ + <(docker logs -f youki-test-dind 2>&1) + +docker exec -i youki-test-dind \ + docker run -q --runtime=youki hello-world From 2723aa446be4b4988216e0cb546736198ded0642 Mon Sep 17 00:00:00 2001 From: "rongfu.leng" <1275177125@qq.com> Date: Sun, 21 Jan 2024 16:31:16 +0800 Subject: [PATCH 8/8] add schedule entity (#2495) * add schedule entity dd:qSigned-off-by: lengrongfu <1275177125@qq.com> Signed-off-by: lengrongfu * Fix if condition for nice value check Signed-off-by: Yashodhan Joshi * Remove the old integration tests files Signed-off-by: Yashodhan Joshi --------- Signed-off-by: lengrongfu Signed-off-by: Yashodhan Joshi Co-authored-by: Yashodhan Joshi --- Cargo.lock | 11 ++++ crates/libcontainer/Cargo.toml | 1 + .../src/container/tenant_builder.rs | 58 ++++++++++++++++- crates/libcontainer/src/error.rs | 2 + .../src/process/container_init_process.rs | 64 ++++++++++++++++++- tests/contest/contest/src/main.rs | 4 ++ tests/contest/contest/src/tests/mod.rs | 1 + .../contest/src/tests/scheduler/mod.rs | 3 + .../src/tests/scheduler/scheduler_policy.rs | 56 ++++++++++++++++ tests/contest/runtimetest/Cargo.toml | 1 + tests/contest/runtimetest/src/main.rs | 2 + tests/contest/runtimetest/src/tests.rs | 56 +++++++++++++++- 12 files changed, 255 insertions(+), 4 deletions(-) create mode 100644 tests/contest/contest/src/tests/scheduler/mod.rs create mode 100644 tests/contest/contest/src/tests/scheduler/scheduler_policy.rs diff --git a/Cargo.lock b/Cargo.lock index c82f10a467..f099bc2743 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1915,6 +1915,7 @@ dependencies = [ "libc", "libcgroups", "libseccomp", + "nc", "nix 0.27.1", "oci-spec", "once_cell", @@ -2184,6 +2185,15 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nc" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83c88ca23498aaa86177921d95ade67290248f9ef71f7416dc47d07cdc3c72a1" +dependencies = [ + "cc", +] + [[package]] name = "nix" version = "0.26.4" @@ -3066,6 +3076,7 @@ name = "runtimetest" version = "0.0.1" dependencies = [ "anyhow", + "nc", "nix 0.27.1", "oci-spec", ] diff --git a/crates/libcontainer/Cargo.toml b/crates/libcontainer/Cargo.toml index 2764bfe3f8..3653871a7a 100644 --- a/crates/libcontainer/Cargo.toml +++ b/crates/libcontainer/Cargo.toml @@ -53,6 +53,7 @@ regex = "1.10.2" thiserror = "1.0.56" tracing = { version = "0.1.40", features = ["attributes"] } safe-path = "0.1.0" +nc = "0.8.18" [dev-dependencies] oci-spec = { version = "~0.6.4", features = ["proptests", "runtime"] } diff --git a/crates/libcontainer/src/container/tenant_builder.rs b/crates/libcontainer/src/container/tenant_builder.rs index 4adcc0e76f..a503cc6ff8 100644 --- a/crates/libcontainer/src/container/tenant_builder.rs +++ b/crates/libcontainer/src/container/tenant_builder.rs @@ -4,7 +4,7 @@ use nix::unistd::{self, close, pipe2, read, Pid}; use oci_spec::runtime::{ Capabilities as SpecCapabilities, Capability as SpecCapability, LinuxBuilder, LinuxCapabilities, LinuxCapabilitiesBuilder, LinuxNamespace, LinuxNamespaceBuilder, - LinuxNamespaceType, Process, ProcessBuilder, Spec, + LinuxNamespaceType, LinuxSchedulerPolicy, Process, ProcessBuilder, Spec, }; use procfs::process::Namespace; @@ -222,6 +222,62 @@ impl TenantContainerBuilder { } } } + + if let Some(sc) = process.scheduler() { + let policy = sc.policy(); + if let Some(nice) = sc.nice() { + // https://man7.org/linux/man-pages/man2/sched_setattr.2.html#top_of_page + if (*policy == LinuxSchedulerPolicy::SchedBatch + || *policy == LinuxSchedulerPolicy::SchedOther) + && (*nice < -20 || *nice > 19) + { + tracing::error!( + ?nice, + "invalid scheduler.nice: '{}', must be within -20 to 19", + nice + ); + Err(ErrInvalidSpec::Scheduler)?; + } + } + if let Some(priority) = sc.priority() { + if *priority != 0 + && (*policy != LinuxSchedulerPolicy::SchedFifo + && *policy != LinuxSchedulerPolicy::SchedRr) + { + tracing::error!(?policy,"scheduler.priority can only be specified for SchedFIFO or SchedRR policy"); + Err(ErrInvalidSpec::Scheduler)?; + } + } + if *policy != LinuxSchedulerPolicy::SchedDeadline { + if let Some(runtime) = sc.runtime() { + if *runtime != 0 { + tracing::error!( + ?runtime, + "scheduler runtime can only be specified for SchedDeadline policy" + ); + Err(ErrInvalidSpec::Scheduler)?; + } + } + if let Some(deadline) = sc.deadline() { + if *deadline != 0 { + tracing::error!( + ?deadline, + "scheduler deadline can only be specified for SchedDeadline policy" + ); + Err(ErrInvalidSpec::Scheduler)?; + } + } + if let Some(period) = sc.period() { + if *period != 0 { + tracing::error!( + ?period, + "scheduler period can only be specified for SchedDeadline policy" + ); + Err(ErrInvalidSpec::Scheduler)?; + } + } + } + } } utils::validate_spec_for_new_user_ns(spec)?; diff --git a/crates/libcontainer/src/error.rs b/crates/libcontainer/src/error.rs index cda150addd..f0555c9626 100644 --- a/crates/libcontainer/src/error.rs +++ b/crates/libcontainer/src/error.rs @@ -92,4 +92,6 @@ pub enum ErrInvalidSpec { AppArmorNotEnabled, #[error("invalid io priority or class.")] IoPriority, + #[error("invalid scheduler config for process")] + Scheduler, } diff --git a/crates/libcontainer/src/process/container_init_process.rs b/crates/libcontainer/src/process/container_init_process.rs index f55c04ec8c..eb2e5f2ebd 100644 --- a/crates/libcontainer/src/process/container_init_process.rs +++ b/crates/libcontainer/src/process/container_init_process.rs @@ -7,13 +7,18 @@ use crate::{ capabilities, hooks, namespaces::Namespaces, process::channel, rootfs::RootFS, tty, user_ns::UserNamespaceConfig, utils, }; +use nc; use nix::mount::MsFlags; use nix::sched::CloneFlags; use nix::sys::stat::Mode; use nix::unistd::setsid; use nix::unistd::{self, Gid, Uid}; -use oci_spec::runtime::{IOPriorityClass, LinuxIOPriority, LinuxNamespaceType, Spec, User}; +use oci_spec::runtime::{ + IOPriorityClass, LinuxIOPriority, LinuxNamespaceType, LinuxSchedulerFlag, LinuxSchedulerPolicy, + Scheduler, Spec, User, +}; use std::collections::HashMap; +use std::mem; use std::os::unix::io::AsRawFd; use std::{ env, fs, @@ -74,6 +79,8 @@ pub enum InitProcessError { WorkloadValidation(#[from] workload::ExecutorValidationError), #[error("invalid io priority class: {0}")] IoPriorityClass(String), + #[error("call exec sched_setattr error: {0}")] + SchedSetattr(String), } type Result = std::result::Result; @@ -288,6 +295,8 @@ pub fn container_init_process( set_io_priority(syscall.as_ref(), proc.io_priority())?; + setup_scheduler(proc.scheduler())?; + // set up tty if specified if let Some(csocketfd) = args.console_socket { tty::setup_console(&csocketfd).map_err(|err| { @@ -741,6 +750,59 @@ fn set_io_priority(syscall: &dyn Syscall, io_priority_op: &Option) -> Result<()> { + if let Some(sc) = sc_op { + let policy: u32 = match *sc.policy() { + LinuxSchedulerPolicy::SchedOther => 0, + LinuxSchedulerPolicy::SchedFifo => 1, + LinuxSchedulerPolicy::SchedRr => 2, + LinuxSchedulerPolicy::SchedBatch => 3, + LinuxSchedulerPolicy::SchedIso => 4, + LinuxSchedulerPolicy::SchedIdle => 5, + LinuxSchedulerPolicy::SchedDeadline => 6, + }; + let mut flags_value: u64 = 0; + if let Some(flags) = sc.flags() { + for flag in flags { + match *flag { + LinuxSchedulerFlag::SchedResetOnFork => flags_value |= 0x01, + LinuxSchedulerFlag::SchedFlagReclaim => flags_value |= 0x02, + LinuxSchedulerFlag::SchedFlagDLOverrun => flags_value |= 0x04, + LinuxSchedulerFlag::SchedFlagKeepPolicy => flags_value |= 0x08, + LinuxSchedulerFlag::SchedFlagKeepParams => flags_value |= 0x10, + LinuxSchedulerFlag::SchedFlagUtilClampMin => flags_value |= 0x20, + LinuxSchedulerFlag::SchedFlagUtilClampMax => flags_value |= 0x40, + } + } + } + let mut a = nc::sched_attr_t { + size: mem::size_of::().try_into().unwrap(), + sched_policy: policy, + sched_flags: flags_value, + sched_nice: sc.nice().unwrap_or(0), + sched_priority: sc.priority().unwrap_or(0) as u32, + sched_runtime: sc.runtime().unwrap_or(0), + sched_deadline: sc.deadline().unwrap_or(0), + sched_period: sc.period().unwrap_or(0), + sched_util_min: 0, + sched_util_max: 0, + }; + // TODO when nix or libc support this function, replace nx crates. + unsafe { + let result = nc::sched_setattr(0, &mut a, 0); + match result { + Ok(_) => {} + Err(err) => { + tracing::error!(?err, "error setting scheduler"); + Err(InitProcessError::SchedSetattr(err.to_string()))?; + } + } + }; + } + Ok(()) +} + #[cfg(feature = "libseccomp")] fn sync_seccomp( fd: Option, diff --git a/tests/contest/contest/src/main.rs b/tests/contest/contest/src/main.rs index 9cabe35ae0..9b7373848a 100644 --- a/tests/contest/contest/src/main.rs +++ b/tests/contest/contest/src/main.rs @@ -10,6 +10,7 @@ use crate::tests::linux_ns_itype::get_ns_itype_tests; use crate::tests::mounts_recursive::get_mounts_recursive_test; use crate::tests::pidfile::get_pidfile_test; use crate::tests::readonly_paths::get_ro_paths_test; +use crate::tests::scheduler::get_scheduler_test; use crate::tests::seccomp::get_seccomp_test; use crate::tests::seccomp_notify::get_seccomp_notify_test; use crate::tests::sysctl::get_sysctl_test; @@ -103,6 +104,8 @@ fn main() -> Result<()> { let mounts_recursive = get_mounts_recursive_test(); let intel_rdt = get_intel_rdt_test(); let sysctl = get_sysctl_test(); + #[allow(unused_variables)] + let scheduler = get_scheduler_test(); tm.add_test_group(Box::new(cl)); tm.add_test_group(Box::new(cc)); @@ -123,6 +126,7 @@ fn main() -> Result<()> { tm.add_test_group(Box::new(mounts_recursive)); tm.add_test_group(Box::new(intel_rdt)); tm.add_test_group(Box::new(sysctl)); + // tm.add_test_group(Box::new(scheduler)); tm.add_cleanup(Box::new(cgroups::cleanup_v1)); tm.add_cleanup(Box::new(cgroups::cleanup_v2)); diff --git a/tests/contest/contest/src/tests/mod.rs b/tests/contest/contest/src/tests/mod.rs index c0d738e226..099cf7ff49 100644 --- a/tests/contest/contest/src/tests/mod.rs +++ b/tests/contest/contest/src/tests/mod.rs @@ -8,6 +8,7 @@ pub mod linux_ns_itype; pub mod mounts_recursive; pub mod pidfile; pub mod readonly_paths; +pub mod scheduler; pub mod seccomp; pub mod seccomp_notify; pub mod sysctl; diff --git a/tests/contest/contest/src/tests/scheduler/mod.rs b/tests/contest/contest/src/tests/scheduler/mod.rs new file mode 100644 index 0000000000..b3ad07cab9 --- /dev/null +++ b/tests/contest/contest/src/tests/scheduler/mod.rs @@ -0,0 +1,3 @@ +mod scheduler_policy; + +pub use scheduler_policy::get_scheduler_test; diff --git a/tests/contest/contest/src/tests/scheduler/scheduler_policy.rs b/tests/contest/contest/src/tests/scheduler/scheduler_policy.rs new file mode 100644 index 0000000000..fbfed9c89a --- /dev/null +++ b/tests/contest/contest/src/tests/scheduler/scheduler_policy.rs @@ -0,0 +1,56 @@ +use anyhow::{Context, Result}; +use oci_spec::runtime::{ + LinuxSchedulerPolicy, ProcessBuilder, SchedulerBuilder, Spec, SpecBuilder, +}; +use test_framework::{test_result, Test, TestGroup, TestResult}; + +use crate::utils::test_inside_container; + +fn create_spec(policy: LinuxSchedulerPolicy, execute_test: &str) -> Result { + let sc = SchedulerBuilder::default() + .policy(policy) + .nice(1i32) + .build() + .unwrap(); + SpecBuilder::default() + .process( + ProcessBuilder::default() + .args( + ["runtimetest", execute_test] + .iter() + .map(|s| s.to_string()) + .collect::>(), + ) + .scheduler(sc) + .build()?, + ) + .build() + .context("failed to create spec") +} + +fn scheduler_policy_other_test() -> TestResult { + let spec = test_result!(create_spec( + LinuxSchedulerPolicy::SchedOther, + "scheduler_policy_other" + )); + test_inside_container(spec, &|_| Ok(())) +} + +fn scheduler_policy_batch_test() -> TestResult { + let spec = test_result!(create_spec( + LinuxSchedulerPolicy::SchedBatch, + "scheduler_policy_batch" + )); + test_inside_container(spec, &|_| Ok(())) +} + +pub fn get_scheduler_test() -> TestGroup { + let mut scheduler_policy_group = TestGroup::new("set_scheduler_policy"); + let policy_fifo_test = Test::new("policy_other", Box::new(scheduler_policy_other_test)); + let policy_rr_test = Test::new("policy_batch", Box::new(scheduler_policy_batch_test)); + + scheduler_policy_group.add(vec![Box::new(policy_fifo_test)]); + scheduler_policy_group.add(vec![Box::new(policy_rr_test)]); + + scheduler_policy_group +} diff --git a/tests/contest/runtimetest/Cargo.toml b/tests/contest/runtimetest/Cargo.toml index f32550467b..63dab30b97 100644 --- a/tests/contest/runtimetest/Cargo.toml +++ b/tests/contest/runtimetest/Cargo.toml @@ -7,4 +7,5 @@ edition = "2021" oci-spec = { version = "0.6.4", features = ["runtime"] } nix = "0.27.1" anyhow = "1.0" +nc = "0.8.18" diff --git a/tests/contest/runtimetest/src/main.rs b/tests/contest/runtimetest/src/main.rs index cbeb53a284..65e0ed5e34 100644 --- a/tests/contest/runtimetest/src/main.rs +++ b/tests/contest/runtimetest/src/main.rs @@ -35,6 +35,8 @@ fn main() { "mounts_recursive" => tests::validate_mounts_recursive(&spec), "seccomp" => tests::validate_seccomp(&spec), "sysctl" => tests::validate_sysctl(&spec), + "scheduler_policy_other" => tests::validate_scheduler_policy(&spec), + "scheduler_policy_batch" => tests::validate_scheduler_policy(&spec), _ => eprintln!("error due to unexpected execute test name: {execute_test}"), } } diff --git a/tests/contest/runtimetest/src/tests.rs b/tests/contest/runtimetest/src/tests.rs index 4275b8af7b..20c501c2dc 100644 --- a/tests/contest/runtimetest/src/tests.rs +++ b/tests/contest/runtimetest/src/tests.rs @@ -2,8 +2,9 @@ use crate::utils::{self, test_read_access, test_write_access}; use anyhow::{bail, Result}; use nix::errno::Errno; use nix::unistd::getcwd; -use oci_spec::runtime::Spec; +use oci_spec::runtime::{LinuxSchedulerPolicy, Spec}; use std::fs::{self, read_dir}; +use std::mem; use std::path::Path; ////////// ANCHOR: example_hello_world @@ -296,7 +297,9 @@ pub fn validate_sysctl(spec: &Spec) { .trim() .to_string(), Err(e) => { - return eprintln!("error due to fail to read the file {key_path:?}, error: {e}") + return eprintln!( + "error due to fail to read the file {key_path:?}, error: {e}" + ); } }; if &actual_value != expected_value { @@ -307,3 +310,52 @@ pub fn validate_sysctl(spec: &Spec) { } } } + +pub fn validate_scheduler_policy(spec: &Spec) { + let proc = spec.process().as_ref().unwrap(); + let sc = proc.scheduler().as_ref().unwrap(); + println!("schedul is {:?}", spec); + let size = mem::size_of::().try_into().unwrap(); + let mut get_sched_attr = nc::sched_attr_t { + size: 0, + sched_policy: 0, + sched_flags: 0, + sched_nice: 0, + sched_priority: 0, + sched_runtime: 0, + sched_deadline: 0, + sched_period: 0, + sched_util_min: 0, + sched_util_max: 0, + }; + unsafe { + match nc::sched_getattr(0, &mut get_sched_attr, size, 0) { + Ok(_) => { + println!("sched_getattr get success"); + } + Err(e) => { + return eprintln!("error due to fail to get sched attr error: {e}"); + } + }; + } + println!("get_sched_attr is {:?}", get_sched_attr); + let sp = get_sched_attr.sched_policy; + let want_sp: u32 = match *sc.policy() { + LinuxSchedulerPolicy::SchedOther => 0, + LinuxSchedulerPolicy::SchedFifo => 1, + LinuxSchedulerPolicy::SchedRr => 2, + LinuxSchedulerPolicy::SchedBatch => 3, + LinuxSchedulerPolicy::SchedIso => 4, + LinuxSchedulerPolicy::SchedIdle => 5, + LinuxSchedulerPolicy::SchedDeadline => 6, + }; + println!("want_sp {:?}", want_sp); + if sp != want_sp { + return eprintln!("error due to sched_policy want {want_sp}, got {sp}"); + } + let sn = get_sched_attr.sched_nice; + let want_sn = sc.nice().unwrap(); + if sn != want_sn { + eprintln!("error due to sched_nice want {want_sn}, got {sn}") + } +}