Repository navigation
0.29.0: a program looked for by the system's conventions, link and linkat, the arrangement stated, openkal 0.25 - #88
Merged
Merged
Conversation
…nkat, the arrangement stated, openkal 0.25 - execvp, execvpe, execlp and posix_spawnp search the PATH through one function that takes the list separator and the program suffixes from kal_env_system (openkal clause 11 entry 30): on Windows a semicolon and each PATHEXT suffix after the name as given; POSIX's colon elsewhere. musl's execvp.c is excluded so both ways of searching agree. - link and linkat (flags 0) over kal_fs_hard_link: a directory is EPERM, two volumes EXDEV, a volume without second names ENOTSUP, a taken name EEXIST, any flag EINVAL. The posix probe observes each. - requires = ["mcpp:kernel-abi=openkal"]: the arrangement is stated, so an engine that checks for a circle of layer requirements refuses a kernel-abi written above a C library placed beneath this one. - Requirements: openkal ^0.25, linux ^0.26, macos ^0.23, windows ^0.21, opensbi ^0.9.
The step installed mcpp unpinned and received 2026.10.24.1, which openkal-run 0.5.4 refuses (requires mcpp >= 2026.11.9.1).
…rts them tests/mtest_protocol.h is a header-only writer of the mtest protocol, version 1, in C (a translation of openkal's conformance writer): the handshake through MTEST_PROTOCOL and MTEST_REPORT, MTEST_MODE=list, MTEST_SELECT with missing lines reported, one event per write, a serial resource. Each probe tools/run-probe.sh runs is one case of kind cts and each of its observations a part; a probe without a check helper states one observation, its count of failures. The bench reports each measured primitive as a case of kind bench holding one metric. A copy a probe starts does not inherit the runner's variables. They are protocol programs and not mtest UTest or Bench objects because of the layering: mtest's library is C++ importing std, and the only C++ runtime over this C library is built above it. CI: tools/run-probe.sh runs each probe a second time under mtest when MTEST is set (the text verdict is kept); the bench runs once under mtest; the job writes mtest's report to its summary and keeps the store; a report job joins every job's runs.
3 tasks done
…of the source the image jobs compile finds it
…it only with the suffixes As Windows' command interpreter searches. Trying the bare name first let a file foo that is not a program, in an earlier PATH entry, answer ENOEXEC and end the search before foo.exe. POSIX is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
execvp,execvpe,execlpandposix_spawnpsearch the PATH through one function (port/src/okm_spawn.c). It takes the list separator and the program suffixes fromkal_env_system(openkal clause 11 entry 30). Where the system iswindows: PATH is split on;, a name holding a backslash or a volume is not searched for, and in each entry a name that carries a suffix is tried as given and one without it only with eachPATHEXTsuffix in order (.COM;.EXE;.BAT;.CMDwhere unset), as Windows' command interpreter searches. Other systems keep POSIX's colon and no suffix. musl'sexecvp.cis excluded, so both ways of searching agree. The macOS cross-build scripts skip it too.linkandlinkatwith flags 0 run overkal_fs_hard_link. The errors: a directory →EPERM; two volumes →EXDEV; a volume withoutKAL_FS_PROP_HARD_LINKS→ENOTSUP; a taken name →EEXIST; any flag →EINVAL. The function is weak, so an image run by an older loader answers as before.requires = ["mcpp:kernel-abi=openkal"]states the arrangement.Tests: the probes and the bench speak the mtest protocol
tests/mtest_protocol.his a header-only C writer of the mtest protocol, version 1, translated from openkal's conformance writer:mtest-protocol=1;marker.missing.benchcase per measured primitive.A copy a probe starts does not inherit the runner's variables.
They are protocol programs and not mtest UTest/Bench objects because of layering, not preference. mtest's library is C++ that imports
std. The only C++ runtime over this C library is openkal-llvm-runtime's libc++, which is built above it. A spike in this package's own graph fails: "std module precompile failed: … fatal error: features.h: No such file or directory", with c++-abi "—". The UTest form of what runs above this library is in openkal-llvm-runtime's tests (mcpplibs/openkal-llvm-runtime#70). That is also where the Windows PATH/PATHEXT observation ofhostnameruns: this repository's CI has no Windows row.The C writer is a candidate for mtest itself, as a C adapter for any C project.
CI: tools/run-probe.sh keeps its text verdict and runs each probe a second time under
mtest runwhen MTEST is set. The bench runs once under mtest. Each job writesmtest report --format mdto its summary and keeps the store as an artifact, and a report job joins every job's runs.Test plan
tests (report)job joins them.