Skip to content

tests: pass when a realtime host reports a late servo period - #4751

Merged
grandixximo merged 2 commits into
LinuxCNC:masterfrom
grandixximo:tests-rt-probe-queue
Nov 5, 2026
Merged

grandixximo merged 2 commits into
LinuxCNC:masterfrom
grandixximo:tests-rt-probe-queue

Conversation

@grandixximo

@grandixximo grandixximo commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #4749. On a realtime host rtapi_app reports a late servo period once per session ("Unexpected realtime delay on task 0 with period 1000000 ..."), and motion passes that report on to the error channel. On the bookworm rtpreempt buildbot it happens in 12 to 24 tests per run, at a random point, so any test that fails on an extra error channel message fails now and then. Since #4749 that was probe-queue-not-empty in 4423, 4424 and 4426, linuxcncrsh in 4425 and axis-type in 4428; jog-speed-change, workplane-preview and tp/helix-motion failed the same way in October.

I went through every test that reads the error channel. These leave the report out now, like stale-motion-status and workplane-retain since #4749:

  • probe-queue-not-empty, axis-type, jog-speed-change, kins-switchkins-core, m62-m68-range, workplane-preview, tp/helix-motion: failed on any message, or wrote every message into the result.
  • kins-switch, tlo: expected a specific message next.
  • linuxcncrsh: a get error returns the report in place of ERROR OK, so checkresult turns it back into ERROR OK before the diff. The report is returned once and then cleared, so a real error still shows at the next get error.

The other tests that read the error channel need no change: they wait for one specific message or base their verdict on other checks, and this PR does not change what they check. kins-switch-unsolved needs the same change, but #4758 rewrites that test, so I put it there.

To check it I made a local rtapi_app report one late period after a set number of cycles and ran these tests under SCHED_FIFO with the report at 1.5 s, 4 s and 9 s: master's tests failed 7, 4 and 2 of 10, these pass 10 of 10 each time. They also pass without realtime.

servo_delay busy waits inside the servo period, so on a realtime host a
late period sends "Unexpected realtime delay" to the error channel, and
the test counted it as a failure. Leave that message out, as
stale-motion-status already does.
On a realtime host rtapi_app reports a late servo period once per
session, and motion passes the report on to the error channel. On the
rtpreempt buildbot that happens in a dozen or more tests per run, at a
random point. These tests failed on any extra message on the error
channel, or expected a specific one next, so leave that report out:
axis-type, jog-speed-change, kins-switch, kins-switchkins-core,
m62-m68-range, tlo, tp/helix-motion and workplane-preview. linuxcncrsh
gets it back from a 'get error' in place of OK, so checkresult turns it
back into OK before the diff.
@grandixximo grandixximo changed the title tests: probe-queue-not-empty: pass on a realtime host tests: pass when a realtime host reports a late servo period Nov 2, 2026
@grandixximo
grandixximo merged commit 0f7a279 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