From 68485cc6ed1584f40144a7e813034b0b9cad38e2 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Sun, 15 Nov 2026 04:50:08 +0900 Subject: [PATCH] 0.25.3: the suite is an mtest project of its own, so an engine runs its program and keeps its run in tests/cts Under 0.25.2 an engine run from tests/cts took the repository's mtest.toml above it: the run was kept in the repository's store, where the implementations' CI does not read it, and a program handed to a runner (node on the Web row) was named relative to the repository's root, so the Web row's suite failed to start. The README's dependency example names the released implementations. --- ...2026-11-15-tests-in-mtest-layout-design.md | 2 ++ README.md | 19 +++++++++++++------ SPEC.md | 2 +- examples/portable/mcpp.toml | 12 ++++++------ include/openkal/version.h | 2 +- mcpp.toml | 2 +- tests/cts/mcpp.toml | 4 ++-- tests/cts/mtest.toml | 9 +++++++++ tests/cts/src/protocol.cpp | 2 +- tests/cts/src/report.cpp | 2 +- tools/run-conformance.sh | 5 ++++- 11 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 tests/cts/mtest.toml diff --git a/.agents/docs/2026-11-15-tests-in-mtest-layout-design.md b/.agents/docs/2026-11-15-tests-in-mtest-layout-design.md index 44c593d..07ac2bd 100644 --- a/.agents/docs/2026-11-15-tests-in-mtest-layout-design.md +++ b/.agents/docs/2026-11-15-tests-in-mtest-layout-design.md @@ -21,6 +21,8 @@ - **CI 收敛。** `tests` 作业在 Linux(gcc、llvm)与 macOS(llvm)上执行 `mtest run --set full`; `declarations` 作业在五行上只构建模块形式。这些用例的对象是文本、头文件和工具,与消费者使用的工具链无关, 所以不必在每一行上运行。 +- **套件是独立的 mtest 项目(0.25.3)。** `tests/cts/mtest.toml` 使引擎在套件目录运行程序并把运行记录存入 `tests/cts/.mtest`。 + 0.25.2 缺少该文件,引擎向上取仓库根的 `mtest.toml`:记录写入根存储,交给运行器(Web 行的 `node`)的相对程序名按根目录解析而失败。 - **兼容。** `tools/run-conformance.sh` 的参数不变,实现仓库的调用方式不变。套件的存储变为 `tests/cts/.mtest`;读取该存储的实现仓库 CI(linux、macos、windows、posix、emscripten)和 freebsd 的 独立运行脚本在本版合入后同步路径。 diff --git a/README.md b/README.md index 4574805..8622504 100644 --- a/README.md +++ b/README.md @@ -94,8 +94,15 @@ it compares (entry 63), and reports each interface's measured cost as a `bench` case beside its `cts` case. The tests of this repository are written with mtest 0.8.5 in its layout (`mtest.toml`): `tests/unit` and `tests/e2e` hold the version, the headers through the tools, the 32-bit layout and substitution -(`mtest run --set checks`, `--set substitution`), `tests/cts` is the suite, and -openkal-kit's tests use the mtest library; each CI run reports them together. +(`mtest run --set full`), `tests/cts` is the suite, and openkal-kit's tests use +the mtest library; each CI run reports them together. + +0.25.3 changes no clause. The suite is an mtest project of its own +(`tests/cts/mtest.toml`): an engine that runs it keeps the run in +`tests/cts/.mtest` and starts its program from there, as under 0.25.1. Under +0.25.2 the engine took the repository's project above it, so the run was kept +in the repository's store, and a program handed to a runner (`node` on the Web) +was named relative to the wrong directory. ## How a program uses openkal @@ -105,16 +112,16 @@ conditional on the target. ```toml [dependencies] -openkal = "0.25.2" +openkal = "0.25.3" [target.'cfg(os = "linux")'.dependencies] -openkal-linux = "0.26.1" +openkal-linux = "0.26.3" [target.'cfg(os = "macos")'.dependencies] -openkal-macos = "0.23.1" +openkal-macos = "0.23.2" [target.'cfg(windows)'.dependencies] -openkal-windows = "0.21.1" +openkal-windows = "0.21.2" ``` The program imports the interface and names no implementation. diff --git a/SPEC.md b/SPEC.md index 361ea31..e41d397 100644 --- a/SPEC.md +++ b/SPEC.md @@ -1,4 +1,4 @@ -# openkal Specification, version 0.25.2 +# openkal Specification, version 0.25.3 ## 1. Scope diff --git a/examples/portable/mcpp.toml b/examples/portable/mcpp.toml index ecd77ae..0e05eee 100644 --- a/examples/portable/mcpp.toml +++ b/examples/portable/mcpp.toml @@ -9,7 +9,7 @@ name = "portable" version = "0.1.0" [dependencies] -openkal = "0.25.2" +openkal = "0.25.3" # AND THE VERSIONS HAVE TO FOLLOW THE SOURCE, which is the reason this example # is a criterion rather than an assumption. @@ -25,13 +25,13 @@ openkal = "0.25.2" # so no repository's continuous integration compiled it. The platform legs # below exist so that it cannot go stale silently again. [target.'cfg(os = "linux")'.dependencies] -openkal-linux = "0.26.1" +openkal-linux = "0.26.3" [target.'cfg(os = "macos")'.dependencies] -openkal-macos = "0.23.1" +openkal-macos = "0.23.2" [target.'cfg(windows)'.dependencies] -openkal-windows = "0.21.1" +openkal-windows = "0.21.2" # ANDROID IS NOT A LINE HERE, AND THAT IS THE POINT. # @@ -57,7 +57,7 @@ openkal-windows = "0.21.1" # All three iOS rows match: the device and both simulator arches carry # `os = "ios"`. [target.'cfg(os = "ios")'.dependencies] -openkal-macos = "0.23.1" +openkal-macos = "0.23.2" # THE WEB IS THE ONE PLATFORM THAT NEEDED NEW SOFTWARE. # @@ -82,4 +82,4 @@ openkal-macos = "0.23.1" # error would have produced a program that links, runs, and fails where a # reader cannot connect it to a missing facility. See the README. [target.'cfg(os = "emscripten")'.dependencies] -openkal-emscripten = "0.14.1" +openkal-emscripten = "0.14.2" diff --git a/include/openkal/version.h b/include/openkal/version.h index aff167c..ab19117 100644 --- a/include/openkal/version.h +++ b/include/openkal/version.h @@ -43,7 +43,7 @@ * consumer actually asks for was checked by nobody. */ #define KAL_VERSION_MAJOR 0u #define KAL_VERSION_MINOR 25u -#define KAL_VERSION_PATCH 2u +#define KAL_VERSION_PATCH 3u #define KAL_VERSION_MAKE(major, minor, patch) \ (((kal_u64)(major) << 32) | ((kal_u64)(minor) << 16) | \ diff --git a/mcpp.toml b/mcpp.toml index 44b8b01..afe4c2b 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -1,7 +1,7 @@ [package] namespace = "mcpplibs" name = "openkal" -version = "0.25.2" +version = "0.25.3" description = "openkal: a portable kernel ABI specification. This package carries the normative declarations; implementations are separate packages." license = "Apache-2.0" authors = ["mcpplibs"] diff --git a/tests/cts/mcpp.toml b/tests/cts/mcpp.toml index ea1924b..365da8d 100644 --- a/tests/cts/mcpp.toml +++ b/tests/cts/mcpp.toml @@ -1,7 +1,7 @@ [package] namespace = "mcpplibs" name = "openkal-conformance" -version = "0.10.0" +version = "0.10.1" description = "The behavioural half of clause 9: a suite an implementation of openkal runs against itself, selectable to the interfaces it provides." license = "Apache-2.0" authors = ["mcpplibs"] @@ -18,7 +18,7 @@ repo = "https://github.com/mcpplibs/openkal" # What it depends upon is therefore openkal and the language. The formatting in # okc.report is the price of that, and it is sixty lines. [dependencies] -openkal = "0.25.2" +openkal = "0.25.3" # The implementation under examination is not named here. # diff --git a/tests/cts/mtest.toml b/tests/cts/mtest.toml new file mode 100644 index 0000000..389c5ec --- /dev/null +++ b/tests/cts/mtest.toml @@ -0,0 +1,9 @@ +# The suite is a package of its own (tools/run-conformance.sh builds it against an +# implementation) and an mtest project of its own: an engine run here keeps its +# runs in tests/cts/.mtest and runs the suite's program from this directory, not +# from the repository's project above it (../../mtest.toml). +[project] +store = ".mtest" + +[report] +sections = ["summary", "kinds", "failures", "slowest", "metrics"] diff --git a/tests/cts/src/protocol.cpp b/tests/cts/src/protocol.cpp index 5ab3859..ad6d94e 100644 --- a/tests/cts/src/protocol.cpp +++ b/tests/cts/src/protocol.cpp @@ -243,7 +243,7 @@ bool begin() { line e; e.raw("{\"e\":\"program\",\"protocol\":1,\"level\":2,\"framework\":\"openkal-conformance\"," - "\"version\":\"0.10.0\",\"isolation\":[\"process\"]}"); + "\"version\":\"0.10.1\",\"isolation\":[\"process\"]}"); e.send(); return true; #else diff --git a/tests/cts/src/report.cpp b/tests/cts/src/report.cpp index 986733a..77dbac3 100644 --- a/tests/cts/src/report.cpp +++ b/tests/cts/src/report.cpp @@ -87,7 +87,7 @@ int failed_count() { return g_failed; } int unobserved_count() { return g_unobserved; } void write_inventory() { - line("openkal conformance suite, version 0.10.0"); + line("openkal conformance suite, version 0.10.1"); line(""); line("interface provision examined select with"); for (const auto& row : inventory) { diff --git a/tools/run-conformance.sh b/tools/run-conformance.sh index a073e55..3c6f3d9 100755 --- a/tools/run-conformance.sh +++ b/tools/run-conformance.sh @@ -301,7 +301,10 @@ fi # whose sections share the working directory's names, so its cases are not # divided among processes. The verdict is the engine's: 0 when every case # passed. Without MTEST the suite runs as it always has and its exit status is -# the verdict. +# the verdict. The suite is an mtest project of its own (tests/cts/mtest.toml), so +# the engine runs the program from here and keeps the run here; under the +# repository's project above it, a runner given `--run-under' was handed a name +# relative to the wrong directory (0.25.2 on the Web row). if [ -n "${MTEST:-}" ]; then # bash 3.2 (macOS) treats an empty array as unset under `set -u', hence the +form below. under=()