fix(v4.0.0): three defects -- a refused device write, a failed starting state, a case that QUITs
A block write the device refuses after the kernel has taken the node's copy: the node was told "Storage refused" while the kernel's cache kept the new data, to be read back and perhaps written later. The kernel now puts its own copy back as it was. Tested with a device whose writes can be made to fail; it failed first. POST's runner: a case whose starting state could not be set says so, with what the node said, where it showed nothing; and a case that ends with QUIT fails, as it did when the cases were a capsule, where the runner had taken it for a completed line. Both tests failed first. The v4 boot says "Artemis: virtio-blk attached" only when the attach worked. make -C v4 test, sanitize and hosted-check pass; amd64, aarch64 and riscv64 boot, POST 538 of 538, dict_hash 0x5f0a949a6fc8ef2b on all six: logs/20261007-135741, -140004, -140329. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bc6deab3f5
commit
193523d873
@@ -1250,9 +1250,17 @@ int main(void)
|
||||
CHECK(is(say("1 2 3 HEX\n"), " ok\nok> "), "the node is left in HEX with three values on its stack");
|
||||
CHECK(post_one("state", "10 .", 0, V4_POST_STACK, 0, 0, "10 ") == 1, "a case still starts in decimal with nothing on the stack");
|
||||
post_state_fails = 1;
|
||||
CHECK(post_one("state.bad", "1 2 +", 0, V4_POST_STACK, three, 1, "") == 0 && strstr(post_said, "POST FAIL: state.bad ") != NULL, "if the state cannot be set the case fails, by name");
|
||||
CHECK(post_one("state.bad", "1 2 +", 0, V4_POST_STACK, three, 1, "") == 0 && strstr(post_said, "POST FAIL: state.bad ") != NULL
|
||||
&& strstr(post_said, "could not be put in its starting state") != NULL && strstr(post_said, "NOSUCHWORD-FOR-STATE") != NULL,
|
||||
"if the state cannot be set the case fails, by name, and says that and what the node said: \"%s\"", post_said);
|
||||
post_state_fails = 0;
|
||||
|
||||
/* a case that ends with QUIT is not a case that completed */
|
||||
CHECK(post_one("quit.plain", "QUIT", 0, V4_POST_STACK, 0, 0, "\n") == 0 && strstr(post_said, "POST FAIL: quit.plain ") != NULL,
|
||||
"a case that ends with QUIT fails, though it left and printed what the table has: \"%s\"", post_said);
|
||||
CHECK(post_one("quit.err", "QUIT", 0, V4_POST_ERROR, 0, 0, "") == 0, "and it has not ended in an error either");
|
||||
CHECK(post_one("after.quit", "1 2 +", 0, V4_POST_STACK, three, 1, "") == 1, "the case after it is judged as usual");
|
||||
|
||||
/* a case that prints more than is kept */
|
||||
CHECK(is(say(": MANY 2000 0 DO 65 EMIT LOOP ;\n"), " ok\nok> "), "a word that prints 2,000 characters");
|
||||
memset(big, 'A', 2000); big[2000] = 0;
|
||||
|
||||
Reference in New Issue
Block a user