aien-protocols-mv
Canonical specifications, wire protocols, and schemas for the AIEN sovereign ecosystem
Brought by drakestapleton
aien-protocols-mv / specs / osh-platform / vectors / t001_task_stream_binding.vec
| 1 | case task_stream_binding |
| 2 | kind positive |
| 3 | exec native-qemu |
| 4 | domain 2 |
| 5 | needs streams tasks test-authority |
| 6 | # a task gets its own duplicate of its stream; the caller closing its copy is what lets end of stream arrive; |
| 7 | # a reaped task id is released (ST6.1, ST6.2) |
| 8 | cap C => OK |
| 9 | bind B cap=C => OK |
| 10 | create R W A => OK |
| 11 | spawn T emit "hi" out=W bind=B => OK |
| 12 | run => OK |
| 13 | read R 8 => OK n=2 data="hi" |
| 14 | read R 8 => WOULD_BLOCK |
| 15 | close W => OK |
| 16 | read R 8 => OK n=0 |
| 17 | state T => OK state=ENDED |
| 18 | wait T => OK status=0 outcome=COMPLETED |
| 19 | wait T => STALE |
| 20 | state T => STALE |
| 21 | close R => OK |
| 22 | check empty |