Skip to content

tests: pass on a realtime host - #4749

Merged
BsAtHome merged 1 commit into
LinuxCNC:masterfrom
grandixximo:tests-rt-runner
Oct 30, 2026
Merged

BsAtHome merged 1 commit into
LinuxCNC:masterfrom
grandixximo:tests-rt-runner

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

The bookworm rtpreempt buildbot runs rtapi_app with SCHED_FIFO, and three tests fail there that never fail on GitHub CI, where rtapi_app runs SCHED_OTHER (for example build 4412):

  • halmodule/halquery fails in every build: hal.query reports the thread priority, which is 98 under realtime and 0 without, and expected has 0. The test now masks the priority the same way it already masks the component IDs.
  • workplane-retain and stale-motion-status/slow-controller fail intermittently: a late servo period sends "Unexpected realtime delay" to the NML error channel, which only happens under SCHED_FIFO. workplane-retain printed every error channel message into its result, and slow-controller, whose kinematics deliberately busy wait most of a servo period, counted any message as a failure. Both now leave that message out.

I reproduced all of these locally with SCHED_FIFO (RLIMIT_RTPRIO raised and LINUXCNC_FORCE_REALTIME=1), and with this change the three tests pass both with and without realtime.

threads.0 also fails intermittently on that buildbot, but that one was a real problem rather than a test issue; it is fixed by #4735 (see #4734).

The rtpreempt buildbot runs rtapi_app setuid, so its threads run
SCHED_FIFO. Two things then differ from the non-realtime CI runners:

- hal.query reports the thread priority (98) instead of 0, which
  halmodule/halquery has failed on in every build. Mask it like the
  component IDs.
- A late servo period sends "Unexpected realtime delay" to the error
  channel. workplane-retain printed it into its result and
  stale-motion-status/slow-controller, whose kinematics busy wait most
  of a period, counted it as a failure. Both now leave it out.
@BsAtHome
BsAtHome merged commit 24e84c4 into LinuxCNC:master Oct 30, 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.

2 participants