interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / native / kernel / tests / fixtures / pipe

8b664a5 feat(kernel): native bounded byte pipe primitive (AIENOS-NATIVE-PIPE-1, #428) (#433) Drake Stapleton committed 2026-10-31
..
README.md2920
p001_nul_payload.vec326
p002_capacity_partial.vec441
p003_zero_length.vec282
p004_broken_pipe.vec191
p005_eof_after_drain.vec225
p006_rights.vec535
p007_handle_reuse.vec378
p008_revoke_blocked_read.vec359
p009_revoke_blocked_write.vec360
p010_close_reader_race.vec265
p011_close_writer_race.vec230
p012_both_closed.vec179
p013_cancel_blocked_read.vec333
p014_cancel_pending_write.vec357
p015_stalled_consumer.vec359
p016_blocked_read_progress.vec317
p017_malformed_frames.vec986
p018_limits.vec405
p019_dup_refs.vec284
p020_transfer.vec340

README.md

Pipe primitive vectors (aienos-mv#428)

Machine-checkable cases for the native pipe primitive (native/kernel/core/pipe.c), one file per case, read by native/kernel/tests/test_pipe.c. Contract: OSH_PLATFORM_ABI v1 DRAFT (aien-protocols-mv specs/osh-platform/, read at fb5fca98e667), sections 4.4, 8.1, 8.5, 8.6 and 9. Authored from that text and this kernel's choices; the choices the draft leaves open are marked UNVERIFIED in core/pipe.h. Plain text so the corpus can later move to specs/osh-platform/vectors/ next to the shell-core vectors (same quoted-byte escapes as their expected.txt).

File pNNN_<name>.vec

  • case <name> and kind positive|negative are required.
  • # starts a comment. Tokens are separated by spaces.
  • <q> is a double-quoted byte string: \xHH any byte, \" and \\ themselves. NUL and bytes >= 0x80 are allowed.
  • Two capability tables exist, A and B (two principals), both empty at the start; the pool has 4 pipes of 65536 bytes.
  • Every step line is <command> => <ERROR> [n=<N>] [data=<q>]. <ERROR> is a section 8.6 name (OK, DENIED, REVOKED, STALE, INVALID_ARG, LIMIT, INTERRUPTED, BROKEN_PIPE, NOT_SUPPORTED, WOULD_BLOCK, ...). n= is the byte count moved (or, for release, the capabilities closed); data= the exact bytes read.
commandmeaning
create <R> <W> <T>PIPE_CREATE in table T; names the read and write end
write <H> <q>non-blocking STREAM_WRITE
fill <H> <count> <hex byte>non-blocking STREAM_WRITE of count copies of one byte
read <H> <max>non-blocking STREAM_READ
bread <H> <max> <action> / bwrite <H> <q> <action>blocking read / write; the first time it parks, the peer runs <action> (none, or one write, read, close, revoke, cancel command, which must return OK); a second park gives up INTERRUPTED (a stalled peer)
close <H>STREAM_CLOSE
dup <H> <NEW> <T> <rights>STREAM_DUP into table T; rights letters r READ, w WRITE, m MAP, g GRANT, d DERIVE, v REVOKE
revoke <H> / cancel <H>revoke the pipe / interrupt that end
release <T>close every pipe capability in table T (section 12 cleanup)
frame <T> <slice> <cell>...raw platform call through the versioned op table; <slice> is - or <q>; cells are hex, or $<H> for a handle in register form; the peer table is the other one
check <item>...empty (both tables and the pool hold nothing), or <counter>=<N> over the pool totals: bytes_written bytes_read writes reads max_resident would_block waits wakeups cancellations revocations broken_pipe eof refused, and pipes (live pipes)

A handle name keeps its value after close, so a later use of it tests a stale handle. Each case must end with every capability released: the runner fails a case whose tables or pool are not empty at the end of the file.