From 3144355967e4ba0f3e7ed8aff92945a4b1aaf66d Mon Sep 17 00:00:00 2001 From: omprakaash Date: Sat, 16 Mar 2024 03:28:40 +0000 Subject: [PATCH] Update nix to 0.28.0 Signed-off-by: omprakaash Signed-off-by: om prakaash --- Cargo.lock | 411 +++++++++++++++++- crates/libcgroups/Cargo.toml | 2 +- crates/libcgroups/src/v1/memory.rs | 2 +- crates/libcontainer/Cargo.toml | 2 +- .../src/container/builder_impl.rs | 2 +- .../src/container/tenant_builder.rs | 24 +- .../process/container_intermediate_process.rs | 20 +- crates/libcontainer/src/process/fork.rs | 13 +- crates/libcontainer/src/seccomp/mod.rs | 2 +- crates/libcontainer/src/syscall/linux.rs | 4 +- crates/youki/Cargo.toml | 2 +- tests/contest/contest/Cargo.toml | 2 +- .../src/tests/seccomp_notify/seccomp_agent.rs | 15 +- tests/contest/runtimetest/Cargo.toml | 2 +- tests/contest/runtimetest/src/tests.rs | 4 +- 15 files changed, 474 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 58f8f3d5d..9efce5c93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -126,9 +126,15 @@ checksum = "70033777eb8b5124a81a1889416543dddef2de240019b674c81285a2635a7e1e" [[package]] name = "anyhow" +<<<<<<< HEAD version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" +======= +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +>>>>>>> 1123b433 (Update nix to 0.28.0) [[package]] name = "arbitrary" @@ -219,7 +225,7 @@ dependencies = [ "bitflags 2.5.0", "cexpr", "clang-sys", - "itertools", + "itertools 0.12.1", "lazy_static", "lazycell", "proc-macro2", @@ -527,7 +533,11 @@ dependencies = [ "flate2", "libcgroups", "libcontainer", +<<<<<<< HEAD "nix 0.27.1", +======= + "nix 0.28.0", +>>>>>>> 1123b433 (Update nix to 0.28.0) "num_cpus", "oci-spec", "once_cell", @@ -610,11 +620,19 @@ dependencies = [ [[package]] name = "cranelift-bforest" +<<<<<<< HEAD version = "0.107.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebf72ceaf38f7d41194d0cf6748214d8ef7389167fe09aad80f87646dbfa325b" dependencies = [ "cranelift-entity 0.107.2", +======= +version = "0.105.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "496c993b62bdfbe9b4c518b8b3e1fdba9f89ef89fcccc050ab61d91dfba9fbaf" +dependencies = [ + "cranelift-entity 0.105.4", +>>>>>>> 1123b433 (Update nix to 0.28.0) ] [[package]] @@ -640,6 +658,7 @@ dependencies = [ [[package]] name = "cranelift-codegen" +<<<<<<< HEAD version = "0.107.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ee7fde5cd9173f00ce02c491ee9e306d64740f4b1a697946e0474f389999e13" @@ -651,6 +670,19 @@ dependencies = [ "cranelift-control", "cranelift-entity 0.107.2", "cranelift-isle 0.107.2", +======= +version = "0.105.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b922abb6be41fc383f5e9da65b58d32d0d0a32c87dfe3bbbcb61a09119506c" +dependencies = [ + "bumpalo", + "cranelift-bforest 0.105.4", + "cranelift-codegen-meta 0.105.4", + "cranelift-codegen-shared 0.105.4", + "cranelift-control", + "cranelift-entity 0.105.4", + "cranelift-isle 0.105.4", +>>>>>>> 1123b433 (Update nix to 0.28.0) "gimli 0.28.1", "hashbrown 0.14.3", "log", @@ -670,11 +702,19 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" +<<<<<<< HEAD version = "0.107.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b49bec6a517e78d4067500dc16acb558e772491a2bcb37301127448adfb8413c" dependencies = [ "cranelift-codegen-shared 0.107.2", +======= +version = "0.105.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634c2ed9ef8a04ca42535a3e2e7917e4b551f2f306f4df2d935a6e71e346c167" +dependencies = [ + "cranelift-codegen-shared 0.105.4", +>>>>>>> 1123b433 (Update nix to 0.28.0) ] [[package]] @@ -685,6 +725,7 @@ checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" [[package]] name = "cranelift-codegen-shared" +<<<<<<< HEAD version = "0.107.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ead4ea497b2dc2ac31fcabd6d5d0d5dc25b3964814122e343724bdf65a53c843" @@ -694,6 +735,17 @@ name = "cranelift-control" version = "0.107.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f81e8028c8d711ea7592648e70221f2e54acb8665f7ecd49545f021ec14c3341" +======= +version = "0.105.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00cde1425b4da28bb0d5ff010030ea9cc9be7aded342ae099b394284f17cefce" + +[[package]] +name = "cranelift-control" +version = "0.105.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1622125c99f1864aaf44e57971770c4a918d081d4b4af0bb597bdf624660ed66" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "arbitrary", ] @@ -720,9 +772,15 @@ checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" [[package]] name = "cranelift-entity" +<<<<<<< HEAD version = "0.107.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32acd0632ba65c2566e75f64af9ef094bb8d90e58a9fbd33d920977a9d85c054" +======= +version = "0.105.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea97887aca1c0cbe7f8513874dc3603e9744fb1cfa78840ca8897bd2766bd35b" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "serde", "serde_derive", @@ -742,11 +800,19 @@ dependencies = [ [[package]] name = "cranelift-frontend" +<<<<<<< HEAD version = "0.107.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a395a704934aa944ba8939cac9001174b9ae5236f48bc091f89e33bb968336f6" dependencies = [ "cranelift-codegen 0.107.2", +======= +version = "0.105.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cdade4c14183fe41482071ed77d6a38cb95a17c7a0a05e629152e6292c4f8cb" +dependencies = [ + "cranelift-codegen 0.105.4", +>>>>>>> 1123b433 (Update nix to 0.28.0) "log", "smallvec", "target-lexicon", @@ -760,6 +826,7 @@ checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" [[package]] name = "cranelift-isle" +<<<<<<< HEAD version = "0.107.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b325ce81c4ee7082dc894537eb342c37898e14230fe7c02ea945691db3e2dd01" @@ -771,12 +838,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea11f5ac85996fa093075d66397922d4f56085d5d84ec13043d0cd4f159c6818" dependencies = [ "cranelift-codegen 0.107.2", +======= +version = "0.105.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbbe4d3ad7bd4bf4a8d916c8460b441cf92417f5cdeacce4dd1d96eee70b18a2" + +[[package]] +name = "cranelift-native" +version = "0.105.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c46be4ed1fc8f36df4e2a442b8c30a39d8c03c1868182978f4c04ba2c25c9d4f" +dependencies = [ + "cranelift-codegen 0.105.4", +>>>>>>> 1123b433 (Update nix to 0.28.0) "libc", "target-lexicon", ] [[package]] name = "cranelift-wasm" +<<<<<<< HEAD version = "0.107.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4f175d4e299a8edabfbd64fa93c7650836cc8ad7f4879f9bd2632575a1f12d0" @@ -785,6 +866,16 @@ dependencies = [ "cranelift-entity 0.107.2", "cranelift-frontend 0.107.2", "itertools", +======= +version = "0.105.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d4c4a785a7866da89d20df159e3c4f96a5f14feb83b1f5998cfd5fe2e74d06" +dependencies = [ + "cranelift-codegen 0.105.4", + "cranelift-entity 0.105.4", + "cranelift-frontend 0.105.4", + "itertools 0.10.5", +>>>>>>> 1123b433 (Update nix to 0.28.0) "log", "smallvec", "wasmparser 0.202.0", @@ -1228,9 +1319,15 @@ checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fastrand" +<<<<<<< HEAD version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +======= +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +>>>>>>> 1123b433 (Update nix to 0.28.0) [[package]] name = "fd-lock" @@ -1825,10 +1922,25 @@ dependencies = [ "either", ] +[[package]] +<<<<<<< HEAD +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +======= +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" +>>>>>>> 1123b433 (Update nix to 0.28.0) checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] @@ -1898,12 +2010,22 @@ dependencies = [ [[package]] name = "libbpf-sys" +<<<<<<< HEAD version = "1.4.1+v1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d45233915cb9e961ddf073fc1e4a31b786d63180eed9b88dba823f688ce2df7" dependencies = [ "cc", "nix 0.27.1", +======= +version = "1.4.0+v1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4ee5f6d35341ad5d492fd92466c45ff11d6e8104ffa8208f62450875c93e258" +dependencies = [ + "cc", + "nix 0.27.1", + "num_cpus", +>>>>>>> 1123b433 (Update nix to 0.28.0) "pkg-config", ] @@ -1925,7 +2047,11 @@ dependencies = [ "libbpf-sys", "libc", "mockall", +<<<<<<< HEAD "nix 0.27.1", +======= + "nix 0.28.0", +>>>>>>> 1123b433 (Update nix to 0.28.0) "oci-spec", "procfs", "quickcheck", @@ -1952,7 +2078,11 @@ dependencies = [ "libcgroups", "libseccomp", "nc", +<<<<<<< HEAD "nix 0.27.1", +======= + "nix 0.28.0", +>>>>>>> 1123b433 (Update nix to 0.28.0) "oci-spec", "once_cell", "prctl", @@ -2238,7 +2368,10 @@ dependencies = [ "bitflags 2.5.0", "cfg-if", "libc", +<<<<<<< HEAD "memoffset 0.9.1", +======= +>>>>>>> 1123b433 (Update nix to 0.28.0) ] [[package]] @@ -2251,6 +2384,10 @@ dependencies = [ "cfg-if", "cfg_aliases", "libc", +<<<<<<< HEAD +======= + "memoffset 0.9.1", +>>>>>>> 1123b433 (Update nix to 0.28.0) ] [[package]] @@ -2493,7 +2630,11 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ +<<<<<<< HEAD "fixedbitset 0.4.2", +======= + "fixedbitset", +>>>>>>> 1123b433 (Update nix to 0.28.0) "indexmap 2.2.6", ] @@ -3123,7 +3264,11 @@ dependencies = [ "anyhow", "libc", "nc", +<<<<<<< HEAD "nix 0.27.1", +======= + "nix 0.28.0", +>>>>>>> 1123b433 (Update nix to 0.28.0) "oci-spec", ] @@ -3346,9 +3491,15 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" +<<<<<<< HEAD version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +======= +version = "1.0.198" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "serde_derive", ] @@ -3376,9 +3527,15 @@ dependencies = [ [[package]] name = "serde_derive" +<<<<<<< HEAD version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +======= +version = "1.0.198" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "proc-macro2", "quote", @@ -3387,9 +3544,15 @@ dependencies = [ [[package]] name = "serde_json" +<<<<<<< HEAD version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +======= +version = "1.0.116" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "itoa", "ryu", @@ -3444,9 +3607,15 @@ dependencies = [ [[package]] name = "serial_test" +<<<<<<< HEAD version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" +======= +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb86f9315df5df6a70eae0cc22395a44e544a0d8897586820770a35ede74449" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "futures", "log", @@ -3458,9 +3627,15 @@ dependencies = [ [[package]] name = "serial_test_derive" +<<<<<<< HEAD version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" +======= +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9bb72430492e9549b0c4596725c0f82729bff861c45aa8099c0a8e67fc3b721" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "proc-macro2", "quote", @@ -3836,18 +4011,30 @@ dependencies = [ [[package]] name = "thiserror" +<<<<<<< HEAD version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +======= +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" +<<<<<<< HEAD version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +======= +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "proc-macro2", "quote", @@ -4473,9 +4660,15 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-common" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a50088539152d419200c1558482c23b7033b9c5e0c751e97d4338050669ff9f1" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce5d3e7e6f0fabe518a9bea9c803081544ef38d986f04d7f86737faed32d2ae" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "anyhow", "bitflags 2.5.0", @@ -4590,6 +4783,18 @@ checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" name = "wasm-encoder" version = "0.202.0" source = "registry+https://github.com/rust-lang/crates.io-index" +<<<<<<< HEAD +======= +checksum = "972f97a5d8318f908dded23594188a90bcd09365986b1163e66d70170e5287ae" +dependencies = [ + "leb128", +] + +[[package]] +name = "wasm-encoder" +version = "0.202.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +>>>>>>> 1123b433 (Update nix to 0.28.0) checksum = "bfd106365a7f5f7aa3c1916a98cbb3ad477f5ff96ddb130285a91c6e7429e67a" dependencies = [ "leb128", @@ -4919,9 +5124,15 @@ dependencies = [ [[package]] name = "wasmtime" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4af5cb32045daee8476711eb12b8b71275c2dd1fc7a58cc2a11b33ce9205f6a2" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69472708b96ee90579a482bdbb908ce97e53a9e5ebbcab59cc29c3977bcab512" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "addr2line", "anyhow", @@ -4965,18 +5176,30 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7515c4d24c8b55c0feab67e3d52a42f999fda8b9cfafbd69a82ed6bcf299d26e" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86292d6a9bf30c669582a40c4a4b8e0b8640e951f3635ee8e0acf7f87809961e" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3aa2de7189ea6b3270727d0027790494aec5e7101ca50da3f9549a86628cae4" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a180017db1233c902b992fea9484640d265f2fedf03db60eed57894cb2effcc" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "anyhow", "base64", @@ -4994,9 +5217,15 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "794839a710a39a12677c67ff43fec54ef00d0ca6c6f631209a7c5524522221d3" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6aca484581f9651886dca45f9dea893e105713b58623d14b06c56d8fe3f3f1" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "anyhow", "proc-macro2", @@ -5009,6 +5238,7 @@ dependencies = [ [[package]] name = "wasmtime-component-util" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7839a1b9e15d17be1cb2a105f18be8e0bbf52bdec7a7cd6eb5d80d4c2cdf74f0" @@ -5025,6 +5255,24 @@ dependencies = [ "cranelift-control", "cranelift-entity 0.107.2", "cranelift-frontend 0.107.2", +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aa907cc97ad039c43f98525d772f4841c2ce69a0c11eeec2a3a9c77fc730e87" + +[[package]] +name = "wasmtime-cranelift" +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b57d58e220ae223855c5d030ef20753377bc716d0c81b34c1fe74c9f44268774" +dependencies = [ + "anyhow", + "cfg-if", + "cranelift-codegen 0.105.4", + "cranelift-control", + "cranelift-entity 0.105.4", + "cranelift-frontend 0.105.4", +>>>>>>> 1123b433 (Update nix to 0.28.0) "cranelift-native", "cranelift-wasm", "gimli 0.28.1", @@ -5038,15 +5286,42 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD name = "wasmtime-environ" version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad72e2e3f7ea5b50fedf66dd36ba24634e4f445c370644683b433d45d88f6126" +======= +name = "wasmtime-cranelift-shared" +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba2cfdfdbde42f0f3baeddb62f3555524dee9f836c96da8d466e299f75f5eee" +dependencies = [ + "anyhow", + "cranelift-codegen 0.105.4", + "cranelift-control", + "cranelift-native", + "gimli 0.28.1", + "object", + "target-lexicon", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-environ" +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abbf3075d9ee7eb1263dc67949aced64d0f0bf27be8098d34d8e5826cf0ff0f2" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "anyhow", "bincode", "cpp_demangle", +<<<<<<< HEAD "cranelift-entity 0.107.2", +======= + "cranelift-entity 0.105.4", +>>>>>>> 1123b433 (Update nix to 0.28.0) "gimli 0.28.1", "indexmap 2.2.6", "log", @@ -5065,9 +5340,15 @@ dependencies = [ [[package]] name = "wasmtime-fiber" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dbdf3053e7e7ced0cd4ed76579995b62169a1a43696890584eae2de2e33bf54" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3174f71c8fbd9d2cb1233ad9f912f106bdd2a1a6d11a1b7707974ba3ad5f304a" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "anyhow", "cc", @@ -5080,9 +5361,15 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "983ca409f2cd66385ce49486c022da0128acb7910c055beb5230998b49c6084c" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0462a46b80d2352ee553b17d626b6468e9cec2220cc58ac31754fd7b58245e" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "object 0.33.0", "once_cell", @@ -5092,9 +5379,15 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ede45379f3b4d395d8947006de8043801806099a240a26db553919b68e96ab15" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dacd2aa30fb20fd8cd0eb4e664024a1ab28a02958529fa05bf52117532a098fc" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "cfg-if", "libc", @@ -5103,9 +5396,15 @@ dependencies = [ [[package]] name = "wasmtime-runtime" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65019d29d175c567b84173f2adf3b7a3af6d5592f8fe510dccae55d2569ec0d2" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d14e97c4bb36d91bcdd194745446d595e67ce8b89916806270fdbee640c747fd" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "anyhow", "cc", @@ -5132,6 +5431,7 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD name = "wasmtime-slab" version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -5144,6 +5444,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84d5381ff174faded38c7b2085fbe430dff59489c87a91403354d710075750fb" dependencies = [ "cranelift-entity 0.107.2", +======= +name = "wasmtime-types" +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "530b94c627a454d24f520173d3145112d1b807c44c82697a57e1d8e28390cde4" +dependencies = [ + "cranelift-entity 0.105.4", +>>>>>>> 1123b433 (Update nix to 0.28.0) "serde", "serde_derive", "thiserror", @@ -5152,23 +5460,74 @@ dependencies = [ [[package]] name = "wasmtime-versioned-export-macros" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d3b70422fdfa915c903f003b8b42554a8ae1aa0c6208429d8314ebf5721f3ac" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5399c175ddba4a471b9da45105dea3493059d52b2d54860eadb0df04c813948d" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "proc-macro2", "quote", "syn 2.0.58", +<<<<<<< HEAD +======= +] + +[[package]] +name = "wasmtime-wasi" +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa0c9371a5270bc5e043f4eff80c572bc35585ab68d0a218d0ec3d3225085347" +dependencies = [ + "anyhow", + "async-trait", + "bitflags 2.5.0", + "bytes", + "cap-fs-ext", + "cap-net-ext", + "cap-rand", + "cap-std", + "cap-time-ext", + "fs-set-times", + "futures", + "io-extras", + "io-lifetimes", + "log", + "once_cell", + "rustix", + "system-interface", + "thiserror", + "tokio", + "tracing", + "url", + "wasi-common", + "wasmtime", + "wiggle", + "windows-sys 0.52.0", +>>>>>>> 1123b433 (Update nix to 0.28.0) ] [[package]] name = "wasmtime-winch" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "996360967b5196dec20ddcfce499ce4dc80cc925c088b0f2b376d29b96833a6a" dependencies = [ "anyhow", "cranelift-codegen 0.107.2", +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "729dff119cfd2e2333504b52db6661e49278314c83276a01d15a2a86e566e614" +dependencies = [ + "anyhow", + "cranelift-codegen 0.105.4", +>>>>>>> 1123b433 (Update nix to 0.28.0) "gimli 0.28.1", "object 0.33.0", "target-lexicon", @@ -5180,9 +5539,15 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01840c0cfbbb01664c796e3f4edbd656e58f9d76db083c7e7c6bba59ea657a96" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6945fc6cfee04ba81016e9723bea77a2b913108e03904a4d901daedf208365f5" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "anyhow", "heck 0.4.1", @@ -5191,6 +5556,15 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD +======= +name = "wasmtime-wmemcheck" +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1711f429111e782fac0537e0b3eb2ab6f821613cf1ec3013f2a0ff3fde41745" + +[[package]] +>>>>>>> 1123b433 (Update nix to 0.28.0) name = "wast" version = "35.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -5209,7 +5583,11 @@ dependencies = [ "leb128", "memchr", "unicode-width", +<<<<<<< HEAD "wasm-encoder", +======= + "wasm-encoder 0.202.0", +>>>>>>> 1123b433 (Update nix to 0.28.0) ] [[package]] @@ -5301,9 +5679,15 @@ dependencies = [ [[package]] name = "wiggle" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93fc3510978a905f931d74784ed8685bd6453e18ad8f92809e793d48827e3cd" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186f82e079c09d2b7215ecaeacc97cac09631522016ba500ccc788749e882439" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "anyhow", "async-trait", @@ -5316,9 +5700,15 @@ dependencies = [ [[package]] name = "wiggle-generate" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec3909e70f36066526ad3b2abb4855ab836f8a6b293449582563ac50d651083" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "def372d639555c826c4f287a7bdde673da127ecb95a3cd5453d53d8f3c0c07e4" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "anyhow", "heck 0.4.1", @@ -5331,9 +5721,15 @@ dependencies = [ [[package]] name = "wiggle-macro" +<<<<<<< HEAD version = "20.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c31124572ab16401c491c0d4fb5fe5d17dab65fcfcc56d7d8efb1c1e56a3db" +======= +version = "18.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93e43fc332703d1ec3aa86a5ce8bb49e6b95b6c617b90e726d3e70a0f70f48a5" +>>>>>>> 1123b433 (Update nix to 0.28.0) dependencies = [ "proc-macro2", "quote", @@ -5374,12 +5770,21 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" +<<<<<<< HEAD version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cefeb84a0f39227cf2eb665cf348e6150ebf3372d08adff03264064ab590fdf4" dependencies = [ "anyhow", "cranelift-codegen 0.107.2", +======= +version = "0.16.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "433cafb378ad01cd839974846204f56257ec34fc9d7db309ce1e34f24923fa6a" +dependencies = [ + "anyhow", + "cranelift-codegen 0.105.4", +>>>>>>> 1123b433 (Update nix to 0.28.0) "gimli 0.28.1", "regalloc2 0.9.3", "smallvec", @@ -5688,7 +6093,11 @@ dependencies = [ "libcgroups", "libcontainer", "liboci-cli", +<<<<<<< HEAD "nix 0.27.1", +======= + "nix 0.28.0", +>>>>>>> 1123b433 (Update nix to 0.28.0) "once_cell", "pentacle", "procfs", diff --git a/crates/libcgroups/Cargo.toml b/crates/libcgroups/Cargo.toml index c0109389b..8d253c191 100644 --- a/crates/libcgroups/Cargo.toml +++ b/crates/libcgroups/Cargo.toml @@ -20,7 +20,7 @@ systemd = ["v2", "nix/socket", "nix/uio"] cgroupsv2_devices = ["rbpf", "libbpf-sys", "errno", "libc", "nix/dir"] [dependencies] -nix = { version = "0.27.1", features = ["signal", "user", "fs"] } +nix = { version = "0.28.0", features = ["signal", "user", "fs"] } procfs = "0.16.0" oci-spec = { version = "~0.6.4", features = ["runtime"] } fixedbitset = "0.5.7" diff --git a/crates/libcgroups/src/v1/memory.rs b/crates/libcgroups/src/v1/memory.rs index 2d6d644f0..a55e3fe81 100644 --- a/crates/libcgroups/src/v1/memory.rs +++ b/crates/libcgroups/src/v1/memory.rs @@ -331,7 +331,7 @@ impl Memory { Err(e) => { // we need to look into the raw OS error for an EBUSY status match e.inner().raw_os_error() { - Some(code) => match Errno::from_i32(code) { + Some(code) => match Errno::from_raw(code) { Errno::EBUSY => { let usage = Self::get_memory_usage(cgroup_root)?; let max_usage = Self::get_memory_max_usage(cgroup_root)?; diff --git a/crates/libcontainer/Cargo.toml b/crates/libcontainer/Cargo.toml index 5e6c3b29f..3b32a1c3b 100644 --- a/crates/libcontainer/Cargo.toml +++ b/crates/libcontainer/Cargo.toml @@ -29,7 +29,7 @@ chrono = { version = "0.4", default-features = false, features = [ fastrand = "^2.1.0" futures = { version = "0.3", features = ["thread-pool"] } libc = "0.2.154" -nix = { version = "0.27.1", features = [ +nix = { version = "0.28.0", features = [ "socket", "sched", "mount", diff --git a/crates/libcontainer/src/container/builder_impl.rs b/crates/libcontainer/src/container/builder_impl.rs index 7eeb58d43..4de503910 100644 --- a/crates/libcontainer/src/container/builder_impl.rs +++ b/crates/libcontainer/src/container/builder_impl.rs @@ -133,7 +133,7 @@ impl ContainerBuilderImpl { prctl::set_dumpable(false).map_err(|e| { LibcontainerError::Other(format!( "error in setting dumpable to false : {}", - nix::errno::from_i32(e) + nix::errno::Errno::from_raw(e) )) })?; } diff --git a/crates/libcontainer/src/container/tenant_builder.rs b/crates/libcontainer/src/container/tenant_builder.rs index 11cc59e15..38ab745b2 100644 --- a/crates/libcontainer/src/container/tenant_builder.rs +++ b/crates/libcontainer/src/container/tenant_builder.rs @@ -10,7 +10,7 @@ use std::str::FromStr; use caps::Capability; use nix::fcntl::OFlag; -use nix::unistd::{close, pipe2, read, Pid}; +use nix::unistd::{self, pipe2, read, Pid}; use oci_spec::runtime::{ Capabilities as SpecCapabilities, Capability as SpecCapability, LinuxBuilder, LinuxCapabilities, LinuxCapabilitiesBuilder, LinuxNamespace, LinuxNamespaceBuilder, @@ -22,6 +22,19 @@ use super::builder::ContainerBuilder; use super::Container; use crate::capabilities::CapabilityExt; use crate::container::builder_impl::ContainerBuilderImpl; +use std::os::fd::AsRawFd; +use std::rc::Rc; +use std::{ + collections::HashMap, + convert::TryFrom, + ffi::{OsStr, OsString}, + fs, + io::BufReader, + os::unix::prelude::RawFd, + path::{Path, PathBuf}, + str::FromStr, +}; + use crate::error::{ErrInvalidSpec, LibcontainerError, MissingSpecError}; use crate::notify_socket::NotifySocket; use crate::process::args::ContainerType; @@ -126,7 +139,7 @@ impl TenantContainerBuilder { let mut builder_impl = ContainerBuilderImpl { container_type: ContainerType::TenantContainer { - exec_notify_fd: write_end, + exec_notify_fd: write_end.as_raw_fd(), }, syscall: self.base.syscall, container_id: self.base.container_id, @@ -148,13 +161,16 @@ impl TenantContainerBuilder { let mut notify_socket = NotifySocket::new(notify_path); notify_socket.notify_container_start()?; - close(write_end).map_err(LibcontainerError::OtherSyscall)?; + // write_end is of type Owned_Fd and the fd is automatically closed when the variable is dropped(end of scope). + // Explicitly calling drop at the moment to make it clear the fd is indeed being closed. + // Info: https://github.com/containers/youki/pull/2728#issuecomment-2068639411 + drop(write_end); let mut err_str_buf = Vec::new(); loop { let mut buf = [0; 3]; - match read(read_end, &mut buf).map_err(LibcontainerError::OtherSyscall)? { + match read(read_end.as_raw_fd(), &mut buf).map_err(LibcontainerError::OtherSyscall)? { 0 => { if err_str_buf.is_empty() { return Ok(pid); diff --git a/crates/libcontainer/src/process/container_intermediate_process.rs b/crates/libcontainer/src/process/container_intermediate_process.rs index 306fd76bd..0c2dc0e64 100644 --- a/crates/libcontainer/src/process/container_intermediate_process.rs +++ b/crates/libcontainer/src/process/container_intermediate_process.rs @@ -1,3 +1,7 @@ +use std::os::fd::FromRawFd; + +use crate::error::MissingSpecError; +use crate::{namespaces::Namespaces, process::channel, process::fork}; use libcgroups::common::CgroupManager; use nix::unistd::{close, write, Gid, Pid, Uid}; use oci_spec::runtime::{LinuxNamespace, LinuxNamespaceType, LinuxResources}; @@ -130,12 +134,16 @@ pub fn container_intermediate_process( } if let ContainerType::TenantContainer { exec_notify_fd } = args.container_type { let buf = format!("{e}"); - if let Err(err) = write(exec_notify_fd, buf.as_bytes()) { + let exec_notify_fd = + unsafe { std::os::fd::OwnedFd::from_raw_fd(exec_notify_fd) }; + if let Err(err) = write(&exec_notify_fd, buf.as_bytes()) { tracing::error!(?err, "failed to write to exec notify fd"); } - if let Err(err) = close(exec_notify_fd) { - tracing::error!(?err, "failed to close exec notify fd"); - } + + // exec_notify_fd is of type Owned_Fd and the fd is automatically closed when the variable is dropped(end of scope). + // Explicitly calling drop at the moment to make it clear the fd is indeed being closed. + // Info: https://github.com/containers/youki/pull/2728#issuecomment-2068639411 + drop(exec_notify_fd); } -1 } @@ -206,7 +214,7 @@ fn setup_userns( prctl::set_dumpable(true).map_err(|e| { IntermediateProcessError::Other(format!( "error in setting dumpable to true : {}", - nix::errno::from_i32(e) + nix::errno::Errno::from_raw(e) )) })?; sender.identifier_mapping_request().map_err(|err| { @@ -220,7 +228,7 @@ fn setup_userns( prctl::set_dumpable(false).map_err(|e| { IntermediateProcessError::Other(format!( "error in setting dumplable to false : {}", - nix::errno::from_i32(e) + nix::errno::Errno::from_raw(e) )) })?; Ok(()) diff --git a/crates/libcontainer/src/process/fork.rs b/crates/libcontainer/src/process/fork.rs index 5f06e3f5a..f2747fa4f 100644 --- a/crates/libcontainer/src/process/fork.rs +++ b/crates/libcontainer/src/process/fork.rs @@ -1,6 +1,5 @@ -use std::ffi::c_int; +use std::{ffi::c_int, num::NonZeroUsize}; use std::fs::File; -use std::num::NonZeroUsize; use libc::SIGCHLD; use nix::sys::{mman, resource}; @@ -164,15 +163,11 @@ fn clone(cb: CloneCb, flags: u64, exit_signal: Option) -> Result` doesn't have any meaning because we won't use it. - mman::mmap::( + mman::mmap_anonymous( None, NonZeroUsize::new(default_stack_size).ok_or(CloneError::ZeroStackSize)?, mman::ProtFlags::PROT_READ | mman::ProtFlags::PROT_WRITE, - mman::MapFlags::MAP_PRIVATE | mman::MapFlags::MAP_ANONYMOUS | mman::MapFlags::MAP_STACK, - None, - 0, + mman::MapFlags::MAP_PRIVATE | mman::MapFlags::MAP_STACK, ) .map_err(CloneError::StackAllocation)? }; @@ -187,7 +182,7 @@ fn clone(cb: CloneCb, flags: u64, exit_signal: Option) -> Result Result<()> { prctl::set_keep_capabilities(true).map_err(|errno| { tracing::error!(?errno, "failed to set keep capabilities to true"); - nix::errno::from_i32(errno) + nix::errno::Errno::from_raw(errno) })?; // args : real *id, effective *id, saved set *id respectively @@ -350,7 +350,7 @@ impl Syscall for LinuxSyscall { } prctl::set_keep_capabilities(false).map_err(|errno| { tracing::error!(?errno, "failed to set keep capabilities to false"); - nix::errno::from_i32(errno) + nix::errno::Errno::from_raw(errno) })?; Ok(()) } diff --git a/crates/youki/Cargo.toml b/crates/youki/Cargo.toml index 862d0c027..776307b31 100644 --- a/crates/youki/Cargo.toml +++ b/crates/youki/Cargo.toml @@ -32,7 +32,7 @@ chrono = { version = "0.4", default-features = false, features = ["clock", "serd libcgroups = { path = "../libcgroups", default-features = false, version = "0.3.2" } # MARK: Version libcontainer = { path = "../libcontainer", default-features = false, version = "0.3.2" } # MARK: Version liboci-cli = { path = "../liboci-cli", version = "0.3.2" } # MARK: Version -nix = "0.27.1" +nix = "0.28.0" once_cell = "1.19.0" pentacle = "1.0.0" procfs = "0.16.0" diff --git a/tests/contest/contest/Cargo.toml b/tests/contest/contest/Cargo.toml index 252fef009..81d90cca6 100644 --- a/tests/contest/contest/Cargo.toml +++ b/tests/contest/contest/Cargo.toml @@ -9,7 +9,7 @@ chrono = { version = "0.4", default-features = false, features = ["clock"] } flate2 = "1.0" libcgroups = { path = "../../../crates/libcgroups" } libcontainer = { path = "../../../crates/libcontainer" } -nix = "0.27.1" +nix = "0.28.0" num_cpus = "1.16" oci-spec = { version = "0.6.4", features = ["runtime"] } once_cell = "1.19.0" diff --git a/tests/contest/contest/src/tests/seccomp_notify/seccomp_agent.rs b/tests/contest/contest/src/tests/seccomp_notify/seccomp_agent.rs index 5a2030c5b..f91782e0b 100644 --- a/tests/contest/contest/src/tests/seccomp_notify/seccomp_agent.rs +++ b/tests/contest/contest/src/tests/seccomp_notify/seccomp_agent.rs @@ -7,6 +7,18 @@ use anyhow::{bail, Context, Result}; use libcontainer::container::ContainerProcessState; use nix::sys::socket::{self, UnixAddr}; use nix::unistd; +use nix::{ + sys::socket::{self, Backlog, UnixAddr}, + unistd, +}; +use std::{ + io::IoSliceMut, + os::{ + fd::{AsFd, AsRawFd}, + unix::prelude::RawFd, + }, + path::Path, +}; const DEFAULT_BUFFER_SIZE: usize = 4096; @@ -30,7 +42,8 @@ pub fn recv_seccomp_listener(seccomp_listener: &Path) -> SeccompAgentResult { socket::bind(socket.as_raw_fd(), &addr).context("failed to bind to seccomp listener socket")?; // Force the backlog to be 1 so in the case of an error, only one connection // from clients will be waiting. - socket::listen(&socket.as_fd(), 1).context("failed to listen on seccomp listener")?; + socket::listen(&socket.as_fd(), Backlog::new(1)?) + .context("failed to listen on seccomp listener")?; let conn = match socket::accept(socket.as_raw_fd()) { Ok(conn) => conn, Err(e) => { diff --git a/tests/contest/runtimetest/Cargo.toml b/tests/contest/runtimetest/Cargo.toml index 921fdcce3..1f9f6966e 100644 --- a/tests/contest/runtimetest/Cargo.toml +++ b/tests/contest/runtimetest/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" [dependencies] oci-spec = { version = "0.6.4", features = ["runtime"] } -nix = "0.27.1" +nix = "0.28.0" anyhow = "1.0" libc = "0.2.154" # TODO (YJDoc2) upgrade to latest nc = "0.8.20" diff --git a/tests/contest/runtimetest/src/tests.rs b/tests/contest/runtimetest/src/tests.rs index 2861df1ad..f2b9aa61a 100644 --- a/tests/contest/runtimetest/src/tests.rs +++ b/tests/contest/runtimetest/src/tests.rs @@ -38,7 +38,7 @@ pub fn validate_readonly_paths(spec: &Spec) { // change manual matching of i32 to e.kind() and match statement for path in ro_paths { if let std::io::Result::Err(e) = test_read_access(path) { - let errno = Errno::from_i32(e.raw_os_error().unwrap()); + let errno = Errno::from_raw(e.raw_os_error().unwrap()); // In the integration tests we test for both existing and non-existing readonly paths // to be specified in the spec, so we allow ENOENT here if errno == Errno::ENOENT { @@ -54,7 +54,7 @@ pub fn validate_readonly_paths(spec: &Spec) { } if let std::io::Result::Err(e) = test_write_access(path) { - let errno = Errno::from_i32(e.raw_os_error().unwrap()); + let errno = Errno::from_raw(e.raw_os_error().unwrap()); // In the integration tests we test for both existing and non-existing readonly paths // being specified in the spec, so we allow ENOENT, and we expect EROFS as the paths // should be read-only