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 / evidence / allen-omega-L694 / L725 / independent-review / lifecycle-review.om

118 lines · 2631 bytes Raw Blame History
1note Independent serialized lifecycle boundary probes; all assertions run in Omega.
2global SavedOut uchar 8192
3fn test ok bool to void
4n = get Outlen 0
5e = get Err 0
6for i ulong n
7put SavedOut i get Outb i
8end
9check ok add get Checks 0 1
10for i ulong n
11put Outb i get SavedOut i
12end
13put Outlen 0 n
14put Err 0 e
15end
16fn copyout to void
17put Inlen 0 get Outlen 0
18for i ulong get Outlen 0
19put In i get Outb i
20end
21end
22fn controlr kind ulong to void
23put Inlen 0 0
24b = packet kind get Q 1 0 0 0
25copyout
26end
27fn liner part ulong value ulong to void
28put Inlen 0 1
29put In 0 uchar value
30b = packet 2 get Q 1 part 0 0
31copyout
32end
33fn main to int
34test qstart 77 100
35test qnext 100 true
36test qsent 100 true
37test not qnext 2099 true
38test qnext 2100 true
39test qsent 2100 true
40controlr 6
41test eq qincoming 2101 1
42test qready 2101
43note First failed JOB must be immediately retryable; ACK while no send is outstanding then suppresses retries.
44put Inlen 0 3
45put In 0 65
46put In 1 66
47put In 2 67
48test qsubmit 2102
49test qnext 2102 true
50test eq get T 10 1
51test qsent 2102 false
52test eq get T 10 0
53test qnext 2102 true
54test qsent 2102 true
55controlr 4
56test eq qincoming 2103 1
57test eq get T 6 1
58test not qnext 4101 true
59note Send one line, fail its GOT, then accept duplicate and retry GOT until success.
60liner 1 65
61test eq qincoming 4102 1
62test qnext 4102 true
63test eq get T 10 3
64test qsent 4102 false
65test eq get T 13 1
66liner 1 65
67test eq qincoming 4103 2
68test qnext 4103 true
69test qsent 4103 true
70test eq get T 13 0
71test qtake
72test eq get In 0 65
73test not qtake
74note Pending GOT is discarded by cancel; cancelled sequence cannot later emit old receipt.
75liner 2 66
76test eq qincoming 4104 1
77test qnext 4104 true
78test eq get T 10 3
79qcancel
80test eq get T 10 0
81test eq get T 13 0
82test not qsent 4104 true
83test not qnext 4104 true
84test eq get Q 4 0
85note New submission after cancel uses new sequence; stale old ACK is rejected.
86put Inlen 0 1
87put In 0 90
88test qsubmit 4105
89test eq get Q 1 2
90put Inlen 0 0
91b = packet 4 1 0 0 0
92copyout
93test eq qincoming 4106 0
94test eq get T 6 0
95test qnext 4106 true
96test eq get T 10 1
97test qsent 4106 true
98controlr 4
99test eq qincoming 4107 1
100note Existing ready state expires at the strict 30000ms edge, then HELLO uses 2s.
101test qready 32100
102test qnext 32100 true
103test qsent 32100 true
104test not qready 32101
105test not qnext 32101 true
106test qnext 34100 true
107test eq get T 10 5
108test qsent 34106 true
109note Once any LINE is accepted, a later backward-clock packet cannot move clock/state.
110liner 1 82
111test eq qincoming 34107 1
112old = get T 0
113liner 2 83
114test eq qincoming 34106 0
115test eq get T 0 old
116test eq get Q 2 1
117ret int get Fails 0
118end