From 0bf31d4e3f6db01805b1d56d3bc25875903b7737 Mon Sep 17 00:00:00 2001 From: utam0k Date: Sun, 29 Oct 2023 21:57:57 +0900 Subject: [PATCH 1/5] Name the test tools `contest` Signed-off-by: utam0k --- .github/workflows/{main.yml => basic.yml} | 0 .github/workflows/e2e.yaml | 4 +- .gitignore | 7 +- .gitmodules | 4 +- Cargo.lock | 408 ++++++++++-------- Cargo.toml | 2 +- justfile | 18 +- scripts/build.sh | 20 +- .../{rust_integration_tests.sh => contest.sh} | 4 +- .../contest}/.gitignore | 0 .../contest}/Cargo.toml | 8 +- .../contest}/README.md | 0 .../contest}/bundle.tar.gz | Bin .../contest}/src/lib.rs | 0 .../contest}/src/logger.rs | 0 .../contest}/src/main.rs | 2 +- .../contest}/src/tests/cgroups/blkio.rs | 0 .../contest}/src/tests/cgroups/cpu/mod.rs | 0 .../contest}/src/tests/cgroups/cpu/v1.rs | 0 .../contest}/src/tests/cgroups/cpu/v2.rs | 0 .../contest}/src/tests/cgroups/memory.rs | 0 .../contest}/src/tests/cgroups/mod.rs | 0 .../contest}/src/tests/cgroups/network.rs | 0 .../contest}/src/tests/cgroups/pids.rs | 0 .../contest}/src/tests/example/hello_world.rs | 0 .../contest}/src/tests/example/mod.rs | 0 .../contest}/src/tests/hooks/invoke.rs | 0 .../contest}/src/tests/hooks/mod.rs | 0 .../contest}/src/tests/hostname/mod.rs | 0 .../src/tests/intel_rdt/intel_rdt_test.rs | 0 .../contest}/src/tests/intel_rdt/mod.rs | 0 .../src/tests/lifecycle/checkpoint.rs | 0 .../src/tests/lifecycle/container_create.rs | 0 .../tests/lifecycle/container_lifecycle.rs | 0 .../contest}/src/tests/lifecycle/create.rs | 0 .../contest}/src/tests/lifecycle/delete.rs | 0 .../contest}/src/tests/lifecycle/exec.rs | 0 .../contest}/src/tests/lifecycle/kill.rs | 0 .../contest}/src/tests/lifecycle/mod.rs | 0 .../contest}/src/tests/lifecycle/start.rs | 0 .../contest}/src/tests/lifecycle/state.rs | 0 .../contest}/src/tests/lifecycle/util.rs | 0 .../contest}/src/tests/linux_ns_itype/mod.rs | 0 .../src/tests/linux_ns_itype/ns_itype_test.rs | 0 .../contest}/src/tests/mod.rs | 0 .../src/tests/mounts_recursive/mod.rs | 0 .../contest}/src/tests/pidfile/mod.rs | 0 .../src/tests/pidfile/pidfile_test.rs | 0 .../contest}/src/tests/readonly_paths/mod.rs | 0 .../readonly_paths/readonly_paths_tests.rs | 0 .../contest}/src/tests/seccomp/mod.rs | 0 .../contest}/src/tests/seccomp_notify/mod.rs | 0 .../src/tests/seccomp_notify/seccomp_agent.rs | 0 .../contest}/src/tests/sysctl/mod.rs | 0 .../contest}/src/tests/tlb/mod.rs | 0 .../contest}/src/tests/tlb/tlb_test.rs | 0 .../contest}/src/utils/mod.rs | 0 .../contest}/src/utils/support.rs | 0 .../contest}/src/utils/test_utils.rs | 0 .../runtimetest/.cargo/config.toml | 0 tests/{ => contest}/runtimetest/Cargo.toml | 2 +- tests/{ => contest}/runtimetest/README.md | 0 tests/{ => contest}/runtimetest/src/main.rs | 0 tests/{ => contest}/runtimetest/src/tests.rs | 0 tests/{ => contest}/runtimetest/src/utils.rs | 0 tests/{ => contest}/test_framework/Cargo.toml | 0 tests/{ => contest}/test_framework/README.md | 0 .../test_framework/src/conditional_test.rs | 0 tests/{ => contest}/test_framework/src/lib.rs | 0 .../{ => contest}/test_framework/src/test.rs | 0 .../test_framework/src/test_group.rs | 0 .../test_framework/src/test_manager.rs | 0 .../test_framework/src/testable.rs | 0 .../github.com/opencontainers/runtime-tools | 2 +- 74 files changed, 266 insertions(+), 215 deletions(-) rename .github/workflows/{main.yml => basic.yml} (100%) rename scripts/{rust_integration_tests.sh => contest.sh} (75%) rename tests/{integration_test => contest/contest}/.gitignore (100%) rename tests/{integration_test => contest/contest}/Cargo.toml (81%) rename tests/{integration_test => contest/contest}/README.md (100%) rename tests/{integration_test => contest/contest}/bundle.tar.gz (100%) rename tests/{integration_test => contest/contest}/src/lib.rs (100%) rename tests/{integration_test => contest/contest}/src/logger.rs (100%) rename tests/{integration_test => contest/contest}/src/main.rs (99%) rename tests/{integration_test => contest/contest}/src/tests/cgroups/blkio.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/cgroups/cpu/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/cgroups/cpu/v1.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/cgroups/cpu/v2.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/cgroups/memory.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/cgroups/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/cgroups/network.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/cgroups/pids.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/example/hello_world.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/example/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/hooks/invoke.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/hooks/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/hostname/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/intel_rdt/intel_rdt_test.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/intel_rdt/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/lifecycle/checkpoint.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/lifecycle/container_create.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/lifecycle/container_lifecycle.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/lifecycle/create.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/lifecycle/delete.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/lifecycle/exec.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/lifecycle/kill.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/lifecycle/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/lifecycle/start.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/lifecycle/state.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/lifecycle/util.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/linux_ns_itype/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/linux_ns_itype/ns_itype_test.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/mounts_recursive/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/pidfile/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/pidfile/pidfile_test.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/readonly_paths/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/readonly_paths/readonly_paths_tests.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/seccomp/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/seccomp_notify/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/seccomp_notify/seccomp_agent.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/sysctl/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/tlb/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/tests/tlb/tlb_test.rs (100%) rename tests/{integration_test => contest/contest}/src/utils/mod.rs (100%) rename tests/{integration_test => contest/contest}/src/utils/support.rs (100%) rename tests/{integration_test => contest/contest}/src/utils/test_utils.rs (100%) rename tests/{ => contest}/runtimetest/.cargo/config.toml (100%) rename tests/{ => contest}/runtimetest/Cargo.toml (66%) rename tests/{ => contest}/runtimetest/README.md (100%) rename tests/{ => contest}/runtimetest/src/main.rs (100%) rename tests/{ => contest}/runtimetest/src/tests.rs (100%) rename tests/{ => contest}/runtimetest/src/utils.rs (100%) rename tests/{ => contest}/test_framework/Cargo.toml (100%) rename tests/{ => contest}/test_framework/README.md (100%) rename tests/{ => contest}/test_framework/src/conditional_test.rs (100%) rename tests/{ => contest}/test_framework/src/lib.rs (100%) rename tests/{ => contest}/test_framework/src/test.rs (100%) rename tests/{ => contest}/test_framework/src/test_group.rs (100%) rename tests/{ => contest}/test_framework/src/test_manager.rs (100%) rename tests/{ => contest}/test_framework/src/testable.rs (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/basic.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/basic.yml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 687155738..2c5036528 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -133,10 +133,8 @@ jobs: name: youki - name: Add the permission to run run: chmod +x ./youki - - name: Build - run: just runtimetest rust-oci-tests-bin - name: Validate tests on youki - run: just rust-oci-tests + run: just run-contest rootless-podman-test: runs-on: ubuntu-22.04 diff --git a/.gitignore b/.gitignore index 5dc6a0717..9edad1cac 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ .idea/ **/target -/runtimetest-target +/contest-target /bin .vagrant/ @@ -11,8 +11,8 @@ tags.lock tags.temp /youki -/integration_test /runtimetest +/contest .vscode @@ -22,4 +22,5 @@ tags.temp /test.log /tests/k8s/_out/ -replace_content.txt \ No newline at end of file +replace_content.txt +/e2e/k8s/_out/ diff --git a/.gitmodules b/.gitmodules index 9856628ea..ac7ee77a3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,5 +1,3 @@ -[submodule "integration_tests/oci-runtime-tests"] +[submodule "tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools"] path = tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools url = https://github.com/opencontainers/runtime-tools.git - ignore = dirty - diff --git a/Cargo.lock b/Cargo.lock index d5f18b170..fce3b073e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli 0.27.2", + "gimli 0.27.3", ] [[package]] @@ -17,7 +17,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.28.0", + "gimli 0.28.1", ] [[package]] @@ -39,13 +39,14 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -80,16 +81,15 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] @@ -119,9 +119,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -165,7 +165,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -194,7 +194,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.32.0", + "object 0.32.1", "rustc-demangle", ] @@ -236,7 +236,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -346,9 +346,9 @@ dependencies = [ [[package]] name = "cap-rand" -version = "1.0.16" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "383800fa434a9e7a463fa35196bd93dcd84a6bdc5d9aeae4e60b554134e852a2" +checksum = "4d25555efacb0b5244cf1d35833d55d21abc916fff0eaad254b8e2453ea9b8ab" dependencies = [ "ambient-authority", "rand", @@ -390,10 +390,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.84" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f8e7c90afad890484a21653d08b6e209ae34770fb5ee298f9c699fcc1e5c856" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ + "jobserver", "libc", ] @@ -438,55 +439,52 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.0" +version = "4.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93aae7a4192245f70fe75dd9157fc7b4a5bf53e88d30bd4396f7d8f9284d5acc" +checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.0" +version = "4.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f423e341edefb78c9caba2d9c7f7687d0e72e89df3ce3394554754393ac3990" +checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" dependencies = [ "anstream", "anstyle", - "bitflags 1.3.2", "clap_lex", - "once_cell", "strsim", ] [[package]] name = "clap_complete" -version = "4.3.0" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a04ddfaacc3bc9e6ea67d024575fafc2a813027cf374b8f24f7bc233c6b6be12" +checksum = "bffe91f06a11b4b9420f62103854e90867812cd5d01557f853c5ee8e791b12ae" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.3.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "191d9573962933b4027f932c600cd252ce27a8ad5979418fe78e43c07996f27b" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "cmake" @@ -519,6 +517,36 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" +[[package]] +name = "contest" +version = "0.1.0" +dependencies = [ + "anyhow", + "chrono", + "clap", + "clap_derive", + "flate2", + "libcgroups", + "libcontainer", + "nix 0.27.1", + "num_cpus", + "oci-spec", + "once_cell", + "pnet_datalink", + "procfs", + "rand", + "scopeguard", + "serde", + "serde_json", + "tar", + "tempfile", + "test_framework", + "tracing", + "tracing-subscriber", + "uuid", + "which 5.0.0", +] + [[package]] name = "cooked-waker" version = "5.0.0" @@ -624,10 +652,10 @@ dependencies = [ "cranelift-control", "cranelift-entity 0.97.2", "cranelift-isle 0.97.2", - "gimli 0.27.2", + "gimli 0.27.3", "hashbrown 0.13.2", "log", - "regalloc2 0.9.1", + "regalloc2 0.9.3", "smallvec", "target-lexicon", ] @@ -867,12 +895,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core 0.20.1", - "darling_macro 0.20.1", + "darling_core 0.20.3", + "darling_macro 0.20.3", ] [[package]] @@ -891,15 +919,15 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -915,13 +943,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core 0.20.1", + "darling_core 0.20.3", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -931,7 +959,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "lock_api", "once_cell", "parking_lot_core", @@ -951,6 +979,9 @@ name = "deranged" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +dependencies = [ + "powerfmt", +] [[package]] name = "derivative" @@ -1113,10 +1144,10 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" dependencies = [ - "darling 0.20.1", + "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -1177,7 +1208,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b0377f1edc77dbd1118507bc7a66e4ab64d2b90c66f90726dc801e73a8c68f9" dependencies = [ "cfg-if", - "rustix 0.38.21", + "rustix 0.38.25", "windows-sys 0.48.0", ] @@ -1271,7 +1302,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d167b646a876ba8fda6b50ac645cfd96242553cbaf0ca4fccaa39afcbf0801f" dependencies = [ "io-lifetimes 1.0.11", - "rustix 0.38.21", + "rustix 0.38.25", "windows-sys 0.48.0", ] @@ -1344,7 +1375,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -1447,9 +1478,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", "indexmap 1.9.3", @@ -1458,9 +1489,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -1480,7 +1511,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.0.0", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -1517,14 +1548,14 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", ] [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heapless" @@ -1724,42 +1755,13 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.0", -] - -[[package]] -name = "integration_test" -version = "0.1.0" -dependencies = [ - "anyhow", - "chrono", - "clap", - "clap_derive", - "flate2", - "libcgroups", - "libcontainer", - "nix 0.27.1", - "num_cpus", - "oci-spec", - "once_cell", - "pnet_datalink", - "procfs", - "rand", - "scopeguard", + "hashbrown 0.14.3", "serde", - "serde_json", - "tar", - "tempfile", - "test_framework", - "tracing", - "tracing-subscriber", - "uuid", - "which 5.0.0", ] [[package]] @@ -1785,9 +1787,9 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c2355a5aef60b1c70b7001bd60ce60deebe6a98d95dff5a873519b125a3af51" +checksum = "bffb4def18c48926ccac55c1223e02865ce1a821751a95920448662696e7472c" [[package]] name = "ipnet" @@ -1811,7 +1813,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.21", + "rustix 0.38.25", "windows-sys 0.48.0", ] @@ -1850,6 +1852,15 @@ dependencies = [ "cc", ] +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.61" @@ -1893,7 +1904,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75adb4021282a72ca63ebbc0e4247750ad74ede68ff062d247691072d709ad8b" dependencies = [ "cc", - "nix 0.26.2", + "nix 0.26.4", "num_cpus", "pkg-config", ] @@ -2030,9 +2041,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "lock_api" @@ -2086,7 +2097,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.21", + "rustix 0.38.25", ] [[package]] @@ -2219,16 +2230,15 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", "pin-utils", - "static_assertions", ] [[package]] @@ -2349,9 +2359,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -2399,7 +2409,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -2490,7 +2500,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.0", + "indexmap 2.1.0", ] [[package]] @@ -2523,7 +2533,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -2552,7 +2562,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -2605,6 +2615,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2658,7 +2674,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", ] [[package]] @@ -2693,9 +2709,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -2712,7 +2728,7 @@ dependencies = [ "hex", "lazy_static", "procfs-core", - "rustix 0.38.21", + "rustix 0.38.25", ] [[package]] @@ -2948,9 +2964,9 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12513beb38dd35aab3ac5f5b89fd0330159a0dc21d5309d75073011bbc8032b0" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" dependencies = [ "hashbrown 0.13.2", "log", @@ -3164,7 +3180,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.20", ] [[package]] @@ -3185,14 +3201,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.21" +version = "0.38.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.10", + "linux-raw-sys 0.4.11", "windows-sys 0.48.0", ] @@ -3328,9 +3344,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] @@ -3379,7 +3395,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -3428,11 +3444,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.25" +version = "0.9.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -3461,7 +3477,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -3638,12 +3654,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "stdweb" version = "0.4.20" @@ -3712,9 +3722,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -3752,10 +3762,10 @@ dependencies = [ "cap-fs-ext", "cap-std", "fd-lock", - "io-lifetimes 2.0.1", - "rustix 0.38.21", + "io-lifetimes 2.0.2", + "rustix 0.38.25", "windows-sys 0.48.0", - "winx 0.36.1", + "winx 0.36.2", ] [[package]] @@ -3799,7 +3809,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall 0.4.1", - "rustix 0.38.21", + "rustix 0.38.25", "windows-sys 0.48.0", ] @@ -3862,7 +3872,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -3892,24 +3902,25 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", "libc", "num_threads", + "powerfmt", "serde", "time-core", - "time-macros 0.2.14", + "time-macros 0.2.15", ] [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" @@ -3923,9 +3934,9 @@ dependencies = [ [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -3984,7 +3995,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -4032,14 +4043,26 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.21.0", ] [[package]] @@ -4057,7 +4080,20 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.1.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -4090,7 +4126,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -4278,7 +4314,7 @@ checksum = "1290fd64cc4e7d3c9b07d7f333ce0ce0007253e32870e632624835cc80b83939" dependencies = [ "anyhow", "rustversion", - "time 0.3.28", + "time 0.3.30", ] [[package]] @@ -4625,7 +4661,7 @@ checksum = "dbe80d95a88e9ac87b6aaf7bc9acd1fdfcd92045db2bf41a2262f623e2406a92" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.39", ] [[package]] @@ -4765,19 +4801,20 @@ dependencies = [ [[package]] name = "wasmer-toml" -version = "0.6.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4232db0aff83ed6208d541ddcf1bf72730673528be8c4fe13c6369060f6e05a7" +checksum = "d21472954ee9443235ca32522b17fc8f0fe58e2174556266a0d9766db055cc52" dependencies = [ "anyhow", - "indexmap 1.9.3", - "semver 1.0.17", + "derive_builder", + "indexmap 2.1.0", + "semver 1.0.20", "serde", "serde_cbor", "serde_json", - "serde_yaml 0.9.25", + "serde_yaml 0.9.27", "thiserror", - "toml 0.5.11", + "toml 0.8.8", ] [[package]] @@ -4851,7 +4888,7 @@ dependencies = [ "pin-project", "rand", "reqwest", - "semver 1.0.17", + "semver 1.0.20", "serde", "serde_cbor", "serde_derive", @@ -4920,7 +4957,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" dependencies = [ "indexmap 1.9.3", - "semver 1.0.17", + "semver 1.0.20", ] [[package]] @@ -4929,8 +4966,8 @@ version = "0.118.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebbb91574de0011ded32b14db12777e7dd5e9ea2f9d7317a1ab51a9495c75924" dependencies = [ - "indexmap 2.0.0", - "semver 1.0.17", + "indexmap 2.1.0", + "semver 1.0.20", ] [[package]] @@ -5044,7 +5081,7 @@ dependencies = [ "cranelift-frontend 0.97.2", "cranelift-native", "cranelift-wasm", - "gimli 0.27.2", + "gimli 0.27.3", "log", "object 0.30.4", "target-lexicon", @@ -5064,7 +5101,7 @@ dependencies = [ "cranelift-codegen 0.97.2", "cranelift-control", "cranelift-native", - "gimli 0.27.2", + "gimli 0.27.3", "object 0.30.4", "target-lexicon", "wasmtime-environ", @@ -5078,7 +5115,7 @@ checksum = "32b60e4ae5c9ae81750d8bc59110bf25444aa1d9266c19999c3b64b801db3c73" dependencies = [ "anyhow", "cranelift-entity 0.97.2", - "gimli 0.27.2", + "gimli 0.27.3", "indexmap 1.9.3", "log", "object 0.30.4", @@ -5116,7 +5153,7 @@ dependencies = [ "bincode", "cfg-if", "cpp_demangle", - "gimli 0.27.2", + "gimli 0.27.3", "ittapi", "log", "object 0.30.4", @@ -5227,7 +5264,7 @@ checksum = "351c9d4e60658dd0cf616c12c5508f86cc2cefcc0cff307eed0a31b23d3c0b70" dependencies = [ "anyhow", "cranelift-codegen 0.97.2", - "gimli 0.27.2", + "gimli 0.27.3", "object 0.30.4", "target-lexicon", "wasmparser 0.107.0", @@ -5289,9 +5326,9 @@ dependencies = [ [[package]] name = "webc" -version = "5.1.1" +version = "5.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d8b985cecc5a364f746c7fcd6e5396986360a58550072f2f9147a07532f525c" +checksum = "973ca5a91b4fb3e4bb37cfebe03ef9364d0aff2765256abefdb7e79dc9188483" dependencies = [ "anyhow", "base64", @@ -5304,6 +5341,7 @@ dependencies = [ "once_cell", "path-clean", "rand", + "semver 1.0.20", "serde", "serde_cbor", "serde_json", @@ -5312,7 +5350,7 @@ dependencies = [ "tar", "tempfile", "thiserror", - "toml 0.7.6", + "toml 0.7.8", "url", "walkdir", "wasmer-toml", @@ -5339,7 +5377,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.21", + "rustix 0.38.25", ] [[package]] @@ -5351,7 +5389,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.21", + "rustix 0.38.25", "windows-sys 0.48.0", ] @@ -5436,8 +5474,8 @@ checksum = "b1bf2ac354be169bb201de7867b84f45d91d0ef812f67f11c33f74a7f5a24e56" dependencies = [ "anyhow", "cranelift-codegen 0.97.2", - "gimli 0.27.2", - "regalloc2 0.9.1", + "gimli 0.27.3", + "regalloc2 0.9.3", "smallvec", "target-lexicon", "wasmparser 0.107.0", @@ -5594,9 +5632,9 @@ dependencies = [ [[package]] name = "winx" -version = "0.36.1" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857cedf8371f690bb6782a3e2b065c54d1b6661be068aaf3eac8b45e813fdf8" +checksum = "357bb8e2932df531f83b052264b050b81ba0df90ee5a59b2d1d3949f344f81e5" dependencies = [ "bitflags 2.4.1", "windows-sys 0.48.0", @@ -5613,7 +5651,7 @@ dependencies = [ "indexmap 1.9.3", "log", "pulldown-cmark", - "semver 1.0.17", + "semver 1.0.20", "unicode-xid", "url", ] @@ -5690,6 +5728,26 @@ dependencies = [ "wasmtime-wasi", ] +[[package]] +name = "zerocopy" +version = "0.7.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "zstd" version = "0.11.2+zstd.1.5.2" diff --git a/Cargo.toml b/Cargo.toml index 842215cb0..0bfb83e0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "2" -members = ["tests/runtimetest/","tests/integration_test/","tests/test_framework/","crates/*", "tools/*"] +members = ["crates/*", "tests/contest/*", "tools/*"] [profile.release] lto = true diff --git a/justfile b/justfile index 321d580a6..547253893 100644 --- a/justfile +++ b/justfile @@ -8,7 +8,7 @@ cwd := justfile_directory() # build # build all binaries -build-all: youki-release rust-oci-tests-bin runtimetest +build-all: youki-release contest # build youki in dev mode youki-dev: @@ -22,14 +22,14 @@ youki-release: runtimetest: {{ cwd }}/scripts/build.sh -o {{ cwd }} -r -c runtimetest -a ${arch:-x86_64} -# build rust oci tests binary -rust-oci-tests-bin: - {{ cwd }}/scripts/build.sh -o {{ cwd }} -r -c integration-test -a ${arch:-x86_64} +# build contest +contest: + {{ cwd }}/scripts/build.sh -o {{ cwd }} -r -c contest -a ${arch:-x86_64} # Tests # run integration tests -test-integration: test-oci rust-oci-tests +test-integration: test-oci run-contest # run all tests except rust-oci test-all: test-basic test-features test-oci containerd-test # currently not doing rust-oci here @@ -58,11 +58,11 @@ test-oci: {{ cwd }}/scripts/oci_integration_tests.sh {{ cwd }} # run rust oci integration tests -rust-oci-tests: youki-release runtimetest rust-oci-tests-bin - {{ cwd }}/scripts/rust_integration_tests.sh {{ cwd }}/youki +run-contest: youki-release contest + {{ cwd }}/scripts/contest.sh {{ cwd }}/youki # validate rust oci integration tests on runc -validate-rust-oci-runc: runtimetest rust-oci-tests-bin +validate-contest-runc: contest {{ cwd }}/scripts/rust_integration_tests.sh runc # test podman rootless works with youki @@ -192,4 +192,4 @@ ci-musl-prepare: ci-prepare version-up version: git grep -l "^version = .* # MARK: Version" | xargs sed -i 's/version = "[0-9]\.[0-9]\.[0-9]" # MARK: Version/version = "{{version}}" # MARK: Version/g' git grep -l "} # MARK: Version" | grep -v justfile | xargs sed -i 's/version = "[0-9]\.[0-9]\.[0-9]" } # MARK: Version/version = "{{version}}" } # MARK: Version/g' - {{ cwd }}/scripts/release_tag.sh {{version}} \ No newline at end of file + {{ cwd }}/scripts/release_tag.sh {{version}} diff --git a/scripts/build.sh b/scripts/build.sh index de7c80434..d4f05e9db 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -10,7 +10,6 @@ usage_exit() { VERSION=debug CRATE="youki" -RUNTIMETEST_TARGET="$ROOT/runtimetest-target" features="" ARCH=$(uname -m) while getopts f:ro:c:ha: OPT; do @@ -64,16 +63,13 @@ if [ "$CRATE" == "youki" ]; then mv ${ROOT}/target/${TARGET}/${VERSION}/youki ${OUTPUT}/ fi -if [ "$CRATE" == "integration-test" ]; then - rm -f ${OUTPUT}/integration_test - cargo build --target ${TARGET} ${OPTION} ${FEATURES} --bin integration_test - mv ${ROOT}/target/${TARGET}/${VERSION}/integration_test ${OUTPUT}/ -fi +if [ "$CRATE" == "contest" ]; then + find ${OUTPUT} -maxdepth 1 -type f -name "contest" -exec rm -ifv {} \; + cargo build --target ${TARGET} ${OPTION} ${FEATURES} --bin contest + mv ${ROOT}/target/${TARGET}/${VERSION}/contest ${OUTPUT}/ -if [ "$CRATE" == "runtimetest" ]; then - rm -f ${OUTPUT}/runtimetest - CARGO_TARGET_DIR=${RUNTIMETEST_TARGET} RUSTFLAGS="-Ctarget-feature=+crt-static" cargo build --target ${TARGET} ${OPTION} ${FEATURES} --bin runtimetest - mv ${RUNTIMETEST_TARGET}/${TARGET}/${VERSION}/runtimetest ${OUTPUT}/ + find ${OUTPUT} -maxdepth 1 -type f -name "runtimetest" -exec rm -ifv {} \; + CONTEST_TARGET="$ROOT/contest-target" + CARGO_TARGET_DIR=${CONTEST_TARGET} RUSTFLAGS="-Ctarget-feature=+crt-static" cargo build --target ${TARGET} ${OPTION} ${FEATURES} --bin runtimetest + mv ${CONTEST_TARGET}/${TARGET}/${VERSION}/runtimetest ${OUTPUT}/ fi - -exit 0 diff --git a/scripts/rust_integration_tests.sh b/scripts/contest.sh similarity index 75% rename from scripts/rust_integration_tests.sh rename to scripts/contest.sh index 3886f12c3..235a21f63 100755 --- a/scripts/rust_integration_tests.sh +++ b/scripts/contest.sh @@ -20,11 +20,11 @@ ROOT=${2-$(git rev-parse --show-toplevel)} LOGFILE="${ROOT}/test.log" if [ ! -f ${ROOT}/bundle.tar.gz ]; then - cp ${ROOT}/tests/integration_test/bundle.tar.gz ${ROOT}/bundle.tar.gz + cp ${ROOT}/tests/contest/contest/bundle.tar.gz ${ROOT}/bundle.tar.gz fi touch ${LOGFILE} -sudo ${ROOT}/integration_test run --runtime "$RUNTIME" --runtimetest ${ROOT}/runtimetest > $LOGFILE +sudo ${ROOT}/contest run --runtime "$RUNTIME" --runtimetest ${ROOT}/runtimetest > $LOGFILE if [ 0 -ne $(grep "not ok" $LOGFILE | wc -l ) ]; then cat $LOGFILE diff --git a/tests/integration_test/.gitignore b/tests/contest/contest/.gitignore similarity index 100% rename from tests/integration_test/.gitignore rename to tests/contest/contest/.gitignore diff --git a/tests/integration_test/Cargo.toml b/tests/contest/contest/Cargo.toml similarity index 81% rename from tests/integration_test/Cargo.toml rename to tests/contest/contest/Cargo.toml index 76c43b456..dbed3dddd 100644 --- a/tests/integration_test/Cargo.toml +++ b/tests/contest/contest/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "integration_test" +name = "contest" version = "0.1.0" edition = "2021" @@ -7,11 +7,11 @@ edition = "2021" anyhow = "1.0" chrono = { version = "0.4", default-features = false, features = ["clock"] } flate2 = "1.0" -libcgroups = { path = "../../crates/libcgroups" } -libcontainer = { path = "../../crates/libcontainer" } +libcgroups = { path = "../../../crates/libcgroups" } +libcontainer = { path = "../../../crates/libcontainer" } nix = "0.27.1" num_cpus = "1.16" -oci-spec = { version = "0.6.4", features = ["runtime"] } +oci-spec = { version = "0.6.3", features = ["runtime"] } once_cell = "1.18.0" pnet_datalink = "0.34.0" procfs = "0.16.0" diff --git a/tests/integration_test/README.md b/tests/contest/contest/README.md similarity index 100% rename from tests/integration_test/README.md rename to tests/contest/contest/README.md diff --git a/tests/integration_test/bundle.tar.gz b/tests/contest/contest/bundle.tar.gz similarity index 100% rename from tests/integration_test/bundle.tar.gz rename to tests/contest/contest/bundle.tar.gz diff --git a/tests/integration_test/src/lib.rs b/tests/contest/contest/src/lib.rs similarity index 100% rename from tests/integration_test/src/lib.rs rename to tests/contest/contest/src/lib.rs diff --git a/tests/integration_test/src/logger.rs b/tests/contest/contest/src/logger.rs similarity index 100% rename from tests/integration_test/src/logger.rs rename to tests/contest/contest/src/logger.rs diff --git a/tests/integration_test/src/main.rs b/tests/contest/contest/src/main.rs similarity index 99% rename from tests/integration_test/src/main.rs rename to tests/contest/contest/src/main.rs index 351d09080..9cabe35ae 100644 --- a/tests/integration_test/src/main.rs +++ b/tests/contest/contest/src/main.rs @@ -17,7 +17,7 @@ use crate::tests::tlb::get_tlb_test; use crate::utils::support::{set_runtime_path, set_runtimetest_path}; use anyhow::{Context, Result}; use clap::Parser; -use integration_test::logger; +use contest::logger; use std::path::{Path, PathBuf}; use test_framework::TestManager; use tests::cgroups; diff --git a/tests/integration_test/src/tests/cgroups/blkio.rs b/tests/contest/contest/src/tests/cgroups/blkio.rs similarity index 100% rename from tests/integration_test/src/tests/cgroups/blkio.rs rename to tests/contest/contest/src/tests/cgroups/blkio.rs diff --git a/tests/integration_test/src/tests/cgroups/cpu/mod.rs b/tests/contest/contest/src/tests/cgroups/cpu/mod.rs similarity index 100% rename from tests/integration_test/src/tests/cgroups/cpu/mod.rs rename to tests/contest/contest/src/tests/cgroups/cpu/mod.rs diff --git a/tests/integration_test/src/tests/cgroups/cpu/v1.rs b/tests/contest/contest/src/tests/cgroups/cpu/v1.rs similarity index 100% rename from tests/integration_test/src/tests/cgroups/cpu/v1.rs rename to tests/contest/contest/src/tests/cgroups/cpu/v1.rs diff --git a/tests/integration_test/src/tests/cgroups/cpu/v2.rs b/tests/contest/contest/src/tests/cgroups/cpu/v2.rs similarity index 100% rename from tests/integration_test/src/tests/cgroups/cpu/v2.rs rename to tests/contest/contest/src/tests/cgroups/cpu/v2.rs diff --git a/tests/integration_test/src/tests/cgroups/memory.rs b/tests/contest/contest/src/tests/cgroups/memory.rs similarity index 100% rename from tests/integration_test/src/tests/cgroups/memory.rs rename to tests/contest/contest/src/tests/cgroups/memory.rs diff --git a/tests/integration_test/src/tests/cgroups/mod.rs b/tests/contest/contest/src/tests/cgroups/mod.rs similarity index 100% rename from tests/integration_test/src/tests/cgroups/mod.rs rename to tests/contest/contest/src/tests/cgroups/mod.rs diff --git a/tests/integration_test/src/tests/cgroups/network.rs b/tests/contest/contest/src/tests/cgroups/network.rs similarity index 100% rename from tests/integration_test/src/tests/cgroups/network.rs rename to tests/contest/contest/src/tests/cgroups/network.rs diff --git a/tests/integration_test/src/tests/cgroups/pids.rs b/tests/contest/contest/src/tests/cgroups/pids.rs similarity index 100% rename from tests/integration_test/src/tests/cgroups/pids.rs rename to tests/contest/contest/src/tests/cgroups/pids.rs diff --git a/tests/integration_test/src/tests/example/hello_world.rs b/tests/contest/contest/src/tests/example/hello_world.rs similarity index 100% rename from tests/integration_test/src/tests/example/hello_world.rs rename to tests/contest/contest/src/tests/example/hello_world.rs diff --git a/tests/integration_test/src/tests/example/mod.rs b/tests/contest/contest/src/tests/example/mod.rs similarity index 100% rename from tests/integration_test/src/tests/example/mod.rs rename to tests/contest/contest/src/tests/example/mod.rs diff --git a/tests/integration_test/src/tests/hooks/invoke.rs b/tests/contest/contest/src/tests/hooks/invoke.rs similarity index 100% rename from tests/integration_test/src/tests/hooks/invoke.rs rename to tests/contest/contest/src/tests/hooks/invoke.rs diff --git a/tests/integration_test/src/tests/hooks/mod.rs b/tests/contest/contest/src/tests/hooks/mod.rs similarity index 100% rename from tests/integration_test/src/tests/hooks/mod.rs rename to tests/contest/contest/src/tests/hooks/mod.rs diff --git a/tests/integration_test/src/tests/hostname/mod.rs b/tests/contest/contest/src/tests/hostname/mod.rs similarity index 100% rename from tests/integration_test/src/tests/hostname/mod.rs rename to tests/contest/contest/src/tests/hostname/mod.rs diff --git a/tests/integration_test/src/tests/intel_rdt/intel_rdt_test.rs b/tests/contest/contest/src/tests/intel_rdt/intel_rdt_test.rs similarity index 100% rename from tests/integration_test/src/tests/intel_rdt/intel_rdt_test.rs rename to tests/contest/contest/src/tests/intel_rdt/intel_rdt_test.rs diff --git a/tests/integration_test/src/tests/intel_rdt/mod.rs b/tests/contest/contest/src/tests/intel_rdt/mod.rs similarity index 100% rename from tests/integration_test/src/tests/intel_rdt/mod.rs rename to tests/contest/contest/src/tests/intel_rdt/mod.rs diff --git a/tests/integration_test/src/tests/lifecycle/checkpoint.rs b/tests/contest/contest/src/tests/lifecycle/checkpoint.rs similarity index 100% rename from tests/integration_test/src/tests/lifecycle/checkpoint.rs rename to tests/contest/contest/src/tests/lifecycle/checkpoint.rs diff --git a/tests/integration_test/src/tests/lifecycle/container_create.rs b/tests/contest/contest/src/tests/lifecycle/container_create.rs similarity index 100% rename from tests/integration_test/src/tests/lifecycle/container_create.rs rename to tests/contest/contest/src/tests/lifecycle/container_create.rs diff --git a/tests/integration_test/src/tests/lifecycle/container_lifecycle.rs b/tests/contest/contest/src/tests/lifecycle/container_lifecycle.rs similarity index 100% rename from tests/integration_test/src/tests/lifecycle/container_lifecycle.rs rename to tests/contest/contest/src/tests/lifecycle/container_lifecycle.rs diff --git a/tests/integration_test/src/tests/lifecycle/create.rs b/tests/contest/contest/src/tests/lifecycle/create.rs similarity index 100% rename from tests/integration_test/src/tests/lifecycle/create.rs rename to tests/contest/contest/src/tests/lifecycle/create.rs diff --git a/tests/integration_test/src/tests/lifecycle/delete.rs b/tests/contest/contest/src/tests/lifecycle/delete.rs similarity index 100% rename from tests/integration_test/src/tests/lifecycle/delete.rs rename to tests/contest/contest/src/tests/lifecycle/delete.rs diff --git a/tests/integration_test/src/tests/lifecycle/exec.rs b/tests/contest/contest/src/tests/lifecycle/exec.rs similarity index 100% rename from tests/integration_test/src/tests/lifecycle/exec.rs rename to tests/contest/contest/src/tests/lifecycle/exec.rs diff --git a/tests/integration_test/src/tests/lifecycle/kill.rs b/tests/contest/contest/src/tests/lifecycle/kill.rs similarity index 100% rename from tests/integration_test/src/tests/lifecycle/kill.rs rename to tests/contest/contest/src/tests/lifecycle/kill.rs diff --git a/tests/integration_test/src/tests/lifecycle/mod.rs b/tests/contest/contest/src/tests/lifecycle/mod.rs similarity index 100% rename from tests/integration_test/src/tests/lifecycle/mod.rs rename to tests/contest/contest/src/tests/lifecycle/mod.rs diff --git a/tests/integration_test/src/tests/lifecycle/start.rs b/tests/contest/contest/src/tests/lifecycle/start.rs similarity index 100% rename from tests/integration_test/src/tests/lifecycle/start.rs rename to tests/contest/contest/src/tests/lifecycle/start.rs diff --git a/tests/integration_test/src/tests/lifecycle/state.rs b/tests/contest/contest/src/tests/lifecycle/state.rs similarity index 100% rename from tests/integration_test/src/tests/lifecycle/state.rs rename to tests/contest/contest/src/tests/lifecycle/state.rs diff --git a/tests/integration_test/src/tests/lifecycle/util.rs b/tests/contest/contest/src/tests/lifecycle/util.rs similarity index 100% rename from tests/integration_test/src/tests/lifecycle/util.rs rename to tests/contest/contest/src/tests/lifecycle/util.rs diff --git a/tests/integration_test/src/tests/linux_ns_itype/mod.rs b/tests/contest/contest/src/tests/linux_ns_itype/mod.rs similarity index 100% rename from tests/integration_test/src/tests/linux_ns_itype/mod.rs rename to tests/contest/contest/src/tests/linux_ns_itype/mod.rs diff --git a/tests/integration_test/src/tests/linux_ns_itype/ns_itype_test.rs b/tests/contest/contest/src/tests/linux_ns_itype/ns_itype_test.rs similarity index 100% rename from tests/integration_test/src/tests/linux_ns_itype/ns_itype_test.rs rename to tests/contest/contest/src/tests/linux_ns_itype/ns_itype_test.rs diff --git a/tests/integration_test/src/tests/mod.rs b/tests/contest/contest/src/tests/mod.rs similarity index 100% rename from tests/integration_test/src/tests/mod.rs rename to tests/contest/contest/src/tests/mod.rs diff --git a/tests/integration_test/src/tests/mounts_recursive/mod.rs b/tests/contest/contest/src/tests/mounts_recursive/mod.rs similarity index 100% rename from tests/integration_test/src/tests/mounts_recursive/mod.rs rename to tests/contest/contest/src/tests/mounts_recursive/mod.rs diff --git a/tests/integration_test/src/tests/pidfile/mod.rs b/tests/contest/contest/src/tests/pidfile/mod.rs similarity index 100% rename from tests/integration_test/src/tests/pidfile/mod.rs rename to tests/contest/contest/src/tests/pidfile/mod.rs diff --git a/tests/integration_test/src/tests/pidfile/pidfile_test.rs b/tests/contest/contest/src/tests/pidfile/pidfile_test.rs similarity index 100% rename from tests/integration_test/src/tests/pidfile/pidfile_test.rs rename to tests/contest/contest/src/tests/pidfile/pidfile_test.rs diff --git a/tests/integration_test/src/tests/readonly_paths/mod.rs b/tests/contest/contest/src/tests/readonly_paths/mod.rs similarity index 100% rename from tests/integration_test/src/tests/readonly_paths/mod.rs rename to tests/contest/contest/src/tests/readonly_paths/mod.rs diff --git a/tests/integration_test/src/tests/readonly_paths/readonly_paths_tests.rs b/tests/contest/contest/src/tests/readonly_paths/readonly_paths_tests.rs similarity index 100% rename from tests/integration_test/src/tests/readonly_paths/readonly_paths_tests.rs rename to tests/contest/contest/src/tests/readonly_paths/readonly_paths_tests.rs diff --git a/tests/integration_test/src/tests/seccomp/mod.rs b/tests/contest/contest/src/tests/seccomp/mod.rs similarity index 100% rename from tests/integration_test/src/tests/seccomp/mod.rs rename to tests/contest/contest/src/tests/seccomp/mod.rs diff --git a/tests/integration_test/src/tests/seccomp_notify/mod.rs b/tests/contest/contest/src/tests/seccomp_notify/mod.rs similarity index 100% rename from tests/integration_test/src/tests/seccomp_notify/mod.rs rename to tests/contest/contest/src/tests/seccomp_notify/mod.rs diff --git a/tests/integration_test/src/tests/seccomp_notify/seccomp_agent.rs b/tests/contest/contest/src/tests/seccomp_notify/seccomp_agent.rs similarity index 100% rename from tests/integration_test/src/tests/seccomp_notify/seccomp_agent.rs rename to tests/contest/contest/src/tests/seccomp_notify/seccomp_agent.rs diff --git a/tests/integration_test/src/tests/sysctl/mod.rs b/tests/contest/contest/src/tests/sysctl/mod.rs similarity index 100% rename from tests/integration_test/src/tests/sysctl/mod.rs rename to tests/contest/contest/src/tests/sysctl/mod.rs diff --git a/tests/integration_test/src/tests/tlb/mod.rs b/tests/contest/contest/src/tests/tlb/mod.rs similarity index 100% rename from tests/integration_test/src/tests/tlb/mod.rs rename to tests/contest/contest/src/tests/tlb/mod.rs diff --git a/tests/integration_test/src/tests/tlb/tlb_test.rs b/tests/contest/contest/src/tests/tlb/tlb_test.rs similarity index 100% rename from tests/integration_test/src/tests/tlb/tlb_test.rs rename to tests/contest/contest/src/tests/tlb/tlb_test.rs diff --git a/tests/integration_test/src/utils/mod.rs b/tests/contest/contest/src/utils/mod.rs similarity index 100% rename from tests/integration_test/src/utils/mod.rs rename to tests/contest/contest/src/utils/mod.rs diff --git a/tests/integration_test/src/utils/support.rs b/tests/contest/contest/src/utils/support.rs similarity index 100% rename from tests/integration_test/src/utils/support.rs rename to tests/contest/contest/src/utils/support.rs diff --git a/tests/integration_test/src/utils/test_utils.rs b/tests/contest/contest/src/utils/test_utils.rs similarity index 100% rename from tests/integration_test/src/utils/test_utils.rs rename to tests/contest/contest/src/utils/test_utils.rs diff --git a/tests/runtimetest/.cargo/config.toml b/tests/contest/runtimetest/.cargo/config.toml similarity index 100% rename from tests/runtimetest/.cargo/config.toml rename to tests/contest/runtimetest/.cargo/config.toml diff --git a/tests/runtimetest/Cargo.toml b/tests/contest/runtimetest/Cargo.toml similarity index 66% rename from tests/runtimetest/Cargo.toml rename to tests/contest/runtimetest/Cargo.toml index f32550467..e57191da0 100644 --- a/tests/runtimetest/Cargo.toml +++ b/tests/contest/runtimetest/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" edition = "2021" [dependencies] -oci-spec = { version = "0.6.4", features = ["runtime"] } +oci-spec = { version = "0.6.3", features = ["runtime"] } nix = "0.27.1" anyhow = "1.0" diff --git a/tests/runtimetest/README.md b/tests/contest/runtimetest/README.md similarity index 100% rename from tests/runtimetest/README.md rename to tests/contest/runtimetest/README.md diff --git a/tests/runtimetest/src/main.rs b/tests/contest/runtimetest/src/main.rs similarity index 100% rename from tests/runtimetest/src/main.rs rename to tests/contest/runtimetest/src/main.rs diff --git a/tests/runtimetest/src/tests.rs b/tests/contest/runtimetest/src/tests.rs similarity index 100% rename from tests/runtimetest/src/tests.rs rename to tests/contest/runtimetest/src/tests.rs diff --git a/tests/runtimetest/src/utils.rs b/tests/contest/runtimetest/src/utils.rs similarity index 100% rename from tests/runtimetest/src/utils.rs rename to tests/contest/runtimetest/src/utils.rs diff --git a/tests/test_framework/Cargo.toml b/tests/contest/test_framework/Cargo.toml similarity index 100% rename from tests/test_framework/Cargo.toml rename to tests/contest/test_framework/Cargo.toml diff --git a/tests/test_framework/README.md b/tests/contest/test_framework/README.md similarity index 100% rename from tests/test_framework/README.md rename to tests/contest/test_framework/README.md diff --git a/tests/test_framework/src/conditional_test.rs b/tests/contest/test_framework/src/conditional_test.rs similarity index 100% rename from tests/test_framework/src/conditional_test.rs rename to tests/contest/test_framework/src/conditional_test.rs diff --git a/tests/test_framework/src/lib.rs b/tests/contest/test_framework/src/lib.rs similarity index 100% rename from tests/test_framework/src/lib.rs rename to tests/contest/test_framework/src/lib.rs diff --git a/tests/test_framework/src/test.rs b/tests/contest/test_framework/src/test.rs similarity index 100% rename from tests/test_framework/src/test.rs rename to tests/contest/test_framework/src/test.rs diff --git a/tests/test_framework/src/test_group.rs b/tests/contest/test_framework/src/test_group.rs similarity index 100% rename from tests/test_framework/src/test_group.rs rename to tests/contest/test_framework/src/test_group.rs diff --git a/tests/test_framework/src/test_manager.rs b/tests/contest/test_framework/src/test_manager.rs similarity index 100% rename from tests/test_framework/src/test_manager.rs rename to tests/contest/test_framework/src/test_manager.rs diff --git a/tests/test_framework/src/testable.rs b/tests/contest/test_framework/src/testable.rs similarity index 100% rename from tests/test_framework/src/testable.rs rename to tests/contest/test_framework/src/testable.rs diff --git a/tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools b/tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools index a6a073817..408c51e93 160000 --- a/tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools +++ b/tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools @@ -1 +1 @@ -Subproject commit a6a073817ab0311b14dadeb6491b968c5bc35d7e +Subproject commit 408c51e934dc558e90e13f63a808f1bd6b155fd2 From 8de8e88306b819138f08e32d34de5816f7add05b Mon Sep 17 00:00:00 2001 From: utam0k Date: Mon, 8 Jan 2024 15:28:54 +0900 Subject: [PATCH 2/5] Address the feedbacks Signed-off-by: utam0k --- .gitmodules | 1 + justfile | 7 +------ scripts/build.sh | 16 ---------------- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/.gitmodules b/.gitmodules index ac7ee77a3..63a5d76a9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools"] path = tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools url = https://github.com/opencontainers/runtime-tools.git + ignore = dirty diff --git a/justfile b/justfile index 3638013cd..0a17da041 100644 --- a/justfile +++ b/justfile @@ -25,11 +25,6 @@ runtimetest: # build contest contest: {{ cwd }}/scripts/build.sh -o {{ cwd }} -r -c contest -# ======= -# # build rust oci tests binary -# rust-oci-tests-bin: -# {{ cwd }}/scripts/build.sh -o {{ cwd }} -r -c integration-test -# >>>>>>> 6f3b5f544d6f4c07d17dd6d849aea2923a788ed3 # Tests @@ -59,7 +54,7 @@ test-oci: {{ cwd }}/scripts/oci_integration_tests.sh {{ cwd }} # run rust oci integration tests -run-contest: youki-release contest +test-contest: youki-release contest {{ cwd }}/scripts/contest.sh {{ cwd }}/youki # validate rust oci integration tests on runc diff --git a/scripts/build.sh b/scripts/build.sh index ea4e17e7b..8e2b61734 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -65,26 +65,10 @@ fi if [ "$CRATE" == "contest" ]; then find ${OUTPUT} -maxdepth 1 -type f -name "contest" -exec rm -ifv {} \; "$CARGO_SH" build ${OPTION} "${FEATURES[@]}" --bin contest - # "$CARGO_SH" build ${OPTION} "${FEATURES[@]}" --bin youki mv ${ROOT}/target/${TARGET}/${VERSION}/contest ${OUTPUT}/ find ${OUTPUT} -maxdepth 1 -type f -name "runtimetest" -exec rm -ifv {} \; CONTEST_TARGET="$ROOT/contest-target" - # CARGO_TARGET_DIR=${CONTEST_TARGET} RUSTFLAGS="-Ctarget-feature=+crt-static" cargo build --target ${TARGET} ${OPTION} ${FEATURES} --bin runtimetest CARGO_TARGET_DIR=${CONTEST_TARGET} RUSTFLAGS="-Ctarget-feature=+crt-static" "$CARGO_SH" build ${OPTION} "${FEATURES[@]}" --bin runtimetest mv ${CONTEST_TARGET}/${TARGET}/${VERSION}/runtimetest ${OUTPUT}/ fi - -# if [ "$CRATE" == "integration-test" ]; then -# rm -f "${OUTPUT}/integration_test" -# "$CARGO_SH" build ${OPTION} "${FEATURES[@]}" --bin integration_test -# mv "$("$CARGO_SH" --print-target-dir)/${TARGET}/${VERSION}/integration_test" "${OUTPUT}/" -# fi -# -# if [ "$CRATE" == "runtimetest" ]; then -# rm -f "${OUTPUT}/runtimetest" -# export CARGO_TARGET_DIR="$ROOT/runtimetest-target" -# export RUSTFLAGS="-Ctarget-feature=+crt-static" -# "$CARGO_SH" build ${OPTION} "${FEATURES[@]}" --bin runtimetest -# mv "$("$CARGO_SH" --print-target-dir)/${TARGET}/${VERSION}/runtimetest" "${OUTPUT}/" -# fi From 36854f511658acc723ad988e54cf3450657a6715 Mon Sep 17 00:00:00 2001 From: utam0k Date: Mon, 8 Jan 2024 15:31:43 +0900 Subject: [PATCH 3/5] Fix a build error Signed-off-by: utam0k --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index 0a17da041..fb0656d80 100644 --- a/justfile +++ b/justfile @@ -29,7 +29,7 @@ contest: # Tests # run integration tests -test-integration: test-oci run-contest +test-integration: test-oci test-contest # run all tests except rust-oci test-all: test-basic test-features test-oci containerd-test # currently not doing rust-oci here From ce96e7f0a5d1cae760b3fd89b4ad4f7f2758160f Mon Sep 17 00:00:00 2001 From: utam0k Date: Mon, 8 Jan 2024 15:37:35 +0900 Subject: [PATCH 4/5] Fix a workflow Signed-off-by: utam0k --- .github/workflows/e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index dde26addc..e732a2932 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -154,7 +154,7 @@ jobs: - name: Add the permission to run run: chmod +x ./youki - name: Validate tests on youki - run: just run-contest + run: just test-contest rootless-podman-test: runs-on: ubuntu-22.04 From 32d09dfac23576cd77af65f7e10aa83e51dee655 Mon Sep 17 00:00:00 2001 From: utam0k Date: Tue, 9 Jan 2024 20:08:14 +0900 Subject: [PATCH 5/5] Address the feedbacks Signed-off-by: utam0k --- tests/contest/runtimetest/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/contest/runtimetest/Cargo.toml b/tests/contest/runtimetest/Cargo.toml index e57191da0..f32550467 100644 --- a/tests/contest/runtimetest/Cargo.toml +++ b/tests/contest/runtimetest/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" edition = "2021" [dependencies] -oci-spec = { version = "0.6.3", features = ["runtime"] } +oci-spec = { version = "0.6.4", features = ["runtime"] } nix = "0.27.1" anyhow = "1.0"