fix(v4.0.0): POST leaves nothing, as v3 really does; and what the review of step 6b found
Captain Bob was told that v3 leaves the words POST's cases define in the
dictionary, and ruled that v4 should. That was false: v3's run_test_suite
puts the dictionary back after each word's cases (test_common.c:333,
:365). Shown that, he ruled that POST leaves nothing. The boot now
seals the system, runs POST, and has the node do COLD, whose printing is
not shown; PARITY:V4_SYSTEM is the system as sealed.
A case the node does not come back from ends POST there, named, with how
many were not run: it would have stalled the boot for hours, where the
capsule had ended it. The runner's test of it now uses a word that
really never ends.
hosted-check also requires that RS1 and T{ are unknown after boot, and
boots a program whose POST has failing cases (tests/post_cases_fail.c):
PARITY:FAIL, POST: FAILED, no prompt, none of a case's printing shown.
Comments and documents that still named the POST capsule or its two
hooks are brought up to date; NUCLEUS.md 6.3 says what v3 does, with the
lines, and how the wrong ruling came about.
make -C v4 test, sanitize and hosted-check pass; amd64, aarch64 and
riscv64 boot, POST 538 of 538, word_count=314, dict_hash
0x220ab283a504a3b3 on all six: logs/20261007-112638, -112901, -113220.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
eda6577a53
commit
18adf59091
@@ -7,8 +7,8 @@
|
||||
*
|
||||
* PARITY:V4_NUCLEUS name=v4:nucleus-64.f18 capsule_id=0x... capsule_hash=0x... words=N
|
||||
* PARITY:V4_CAPSULE name=v4:forth79.4th capsule_id=0x... capsule_hash=0x... dict_hash=0x...
|
||||
* PARITY:V4_POST tests=N pass=N fail=N (printed by the POST capsule)
|
||||
* PARITY:V4_CAPSULE name=v4:post79.4th capsule_id=0x... capsule_hash=0x... dict_hash=0x...
|
||||
* PARITY:V4_POST tests=N pass=N fail=N (POST is the kernel's: v4/post.h)
|
||||
* PARITY:V4_SYSTEM word_count=N dict_hash=0x... (the system as sealed, after POST)
|
||||
* PARITY:OK
|
||||
* POST: PASSED
|
||||
*
|
||||
|
||||
+10
-3
@@ -37,7 +37,14 @@ extern const unsigned v4_post_case_count;
|
||||
* of it; and judges. A case passes when it ended in an error exactly if
|
||||
* one was expected and, if none was, its stack and its printing are what
|
||||
* the table has. It has ended in an error if any of its lines did. What
|
||||
* the cases define stays in the node's dictionary, as in v3. */
|
||||
* the cases define is still in the node's dictionary when the runner
|
||||
* returns: whoever runs POST puts the dictionary back afterwards, as v3
|
||||
* does after each of its suites (v3/src/test_runner/test_common.c,
|
||||
* run_test_suite: "to remove test-created words").
|
||||
*
|
||||
* If the node does not come back from a line -- it has stopped, or runs for
|
||||
* ever -- that case fails and POST ends there: the runner says which case
|
||||
* it was and how many were not run. */
|
||||
#define V4_POST_OUT 1024u /* the most of a case's printing that is kept */
|
||||
|
||||
typedef struct {
|
||||
@@ -54,8 +61,8 @@ typedef struct {
|
||||
typedef struct { unsigned tests, pass, fail; } v4_post_tally;
|
||||
|
||||
/* Run the cases. Prints "POST FAIL: name out<...> stack<...>" for each
|
||||
* failing case and then "PARITY:V4_POST tests=N pass=N fail=N". Returns 1
|
||||
* if none failed. */
|
||||
* failing case and then "PARITY:V4_POST tests=N pass=N fail=N", where tests
|
||||
* is how many were run. Returns 1 if every case was run and none failed. */
|
||||
int v4_post_run(const v4_post_host *h, const v4_post_case *cases, unsigned count, v4_post_tally *tally);
|
||||
|
||||
#endif /* V4_POST_H */
|
||||
|
||||
Reference in New Issue
Block a user