Skip to content

tests/kins-switch-unsolved: wait for what each step needs, not for a time - #4758

Merged
grandixximo merged 2 commits into
LinuxCNC:masterfrom
grandixximo:kins-switch-unsolved-waits
Nov 5, 2026
Merged

grandixximo merged 2 commits into
LinuxCNC:masterfrom
grandixximo:kins-switch-unsolved-waits

Conversation

@grandixximo

@grandixximo grandixximo commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Tests run in parallel and under load, and several recent PRs fixed tests that relied on fixed sleeps. tests/kins-switch-unsolved homed right after the machine-on command without waiting for it, and gave the error channel and the status a fixed 0.2 s after each MDI command.

It now waits for what each step needs:

  • machine on, all joints homed, and the mode it asks for;
  • after each command, the interpreter idle with the machine in position;
  • the report of the failed switch itself;
  • before reading the position or checking that nothing else was reported, a status newer than the event: the motion heartbeat has changed and two task cycles have passed, since task passes motion's reports on to the error channel in its cycle.

It has not been seen failing, so this is prevention: six copies at once with four busy loops, twice, pass before and after the change.

A second commit leaves out the late servo period report that a realtime host passes on to the error channel, which the test took for an unexpected message after the switch; the other tests get the same change in #4751. With one such report injected at 1.5 s, 4 s and 9 s under SCHED_FIFO the test passes each time.

…time

Tests run in parallel and under load. The test homed right after the machine-on command without waiting for it, and gave the error channel and the status a fixed 0.2 s after each MDI command to catch up. It now waits for machine on, all joints homed and the mode it asks for; after each command for the interpreter idle with the machine in position; for the report of the failed switch itself; and, before reading the position or checking that nothing else was reported, for a status newer than the event: the motion heartbeat changed and two task cycles gone, since task passes motion's reports on to the error channel in its cycle.

It has not been seen failing; six copies at once with four busy loops, twice, pass before and after.
On a realtime host rtapi_app reports a late servo period once per
session, and motion passes the report on to the error channel, where
the test took it for an unexpected message after the switch.
@grandixximo
grandixximo merged commit 469f9dd into LinuxCNC:master Nov 5, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant