Skip to content

0.29.0: a program looked for by the system's conventions, link and linkat, the arrangement stated, openkal 0.25 - #88

Merged
Sunrisepeak merged 6 commits into
mainfrom
feat/0.29.0
Nov 9, 2026
Merged

Sunrisepeak merged 6 commits into
mainfrom
feat/0.29.0

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Summary

  • K11. execvp, execvpe, execlp and posix_spawnp search the PATH through one function (port/src/okm_spawn.c). It takes the list separator and the program suffixes from kal_env_system (openkal clause 11 entry 30). Where the system is windows: 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 each PATHEXT suffix in order (.COM;.EXE;.BAT;.CMD where unset), as Windows' command interpreter searches. Other systems keep POSIX's colon and no suffix. musl's execvp.c is excluded, so both ways of searching agree. The macOS cross-build scripts skip it too.
  • K5. link and linkat with flags 0 run over kal_fs_hard_link. The errors: a directory → EPERM; two volumes → EXDEV; a volume without KAL_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.
  • E14. requires = ["mcpp:kernel-abi=openkal"] states the arrangement.
  • Requirements move to the 0.25 family: openkal ^0.25, linux ^0.26, macos ^0.23, windows ^0.21, opensbi ^0.9 (^0.8.2 requires openkal 0.16). Version 0.29.0. README and musl/PATCHES.md are updated.
  • CI: okrun is built with mcpp 2026.11.9.1, the floor openkal-run states. Unpinned, the step received 2026.10.24.1 and failed.

Tests: the probes and the bench speak the mtest protocol

tests/mtest_protocol.h is a header-only C writer of the mtest protocol, version 1, translated from openkal's conformance writer:

  • P2: the handshake through MTEST_PROTOCOL/MTEST_REPORT and MTEST_MODE=list, with the mtest-protocol=1; marker.
  • P3.4: one case per probe, one part per observation.
  • P4: MTEST_SELECT, with lines that name nothing reported as missing.
  • P5: one write per event.
  • P6: the bench reports one bench case per measured primitive.
  • P7.1: a serial resource.

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 of hostname runs: 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 run when MTEST is set. The bench runs once under mtest. Each job writes mtest report --format md to its summary and keeps the store as an artifact, and a report job joins every job's runs.

Test plan

  • Existing suite at the functional change: CI run 42709051859 green at dd35bef (the posix probe extended with link/linkat and with posix_spawnp past an absent PATH entry).
  • Protocol migration: CI run 42713947761 green at 0671d8f, all 11 checks. Each of the 19 probes run by tools/run-probe.sh also passes under the runner on the Linux gcc, Linux llvm and macOS jobs (posix: 82 passed). The bench under the runner reports 69 cases (68 on macOS). The tests (report) job joins them.
  • Windows suffix order (review): CI run 42717890519 green at b9e95e0, all 11 checks, both suites.

…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.
…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.
@Sunrisepeak
Sunrisepeak merged commit 5a61f67 into main Nov 9, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant