Skip to content

Commit 256ac28

Browse files
committed
Say which branch the stop-request observation took
Every check in this file is silent when it holds, and that convention cannot serve this one. Each observation is SKIPPED rather than failed when its precondition is absent --- no root directory, no word, no shell --- so a green run was consistent both with a trampoline that was entered and returned and with a block that never ran at all. Those are exactly the two outcomes the check exists to tell apart. Noticed from the run that first exercised it: the job reported `ok (0.52s)', which is consistent with the 0.3s sleep the check spawns and proves nothing on its own.
1 parent 4a34f24 commit 256ac28

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

tests/conformance_process_task.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ int main() {
240240
const kal_u32* word = kal_process_stop_requested();
241241
if (word == nullptr) {
242242
// Declined, which clause 6.2 permits and KAL_PROCESS_PROP_STOP_REQUESTED
243-
// states. Nothing below applies.
243+
// states. Nothing below applies --- and the log says which of the two
244+
// this run was, for the reason given at the observation further down.
245+
say(" stop-request: declined, and the position is not claimed\n");
244246
check((kal_process_props() & kal::macros::KAL_PROCESS_PROP_STOP_REQUESTED_M) == 0,
245247
"an implementation that answers no word does not claim the position");
246248
} else {
@@ -304,7 +306,16 @@ int main() {
304306
// ⭐ AND IT IS STILL RUNNING, which is the half a compiled
305307
// disposition cannot show. Reaching this line is the proof:
306308
// a program that died in the handler never gets here.
307-
check(true, "and it is still running, having survived delivery");
309+
//
310+
// ⚠️⚠️ SAID ALOUD, AND EVERY OTHER CHECK HERE IS SILENT WHEN
311+
// IT HOLDS. That convention cannot serve this one. Each
312+
// observation above is skipped rather than failed when its
313+
// precondition is absent --- no root, no word, no shell ---
314+
// so a green run is consistent BOTH with a trampoline that
315+
// was entered and returned and with a block that never ran.
316+
// Those are the two outcomes this check exists to tell
317+
// apart, and only a line in the log tells them apart.
318+
if (*word != 0) say(" stop-request: told, and still running\n");
308319

309320
int status = -1, terminated = -1;
310321
kal_process_wait(k, &status, &terminated);

0 commit comments

Comments
 (0)