Skip to content

tests: split kins-params into one test per kinematics module - #4952

Open
grandixximo wants to merge 2 commits into
LinuxCNC:masterfrom
grandixximo:kins-params-split
Open

grandixximo wants to merge 2 commits into
LinuxCNC:masterfrom
grandixximo:kins-params-split

Conversation

@grandixximo

@grandixximo grandixximo commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

As Bertho suggested in #4942: kins-params ran every module one after another and grows by an entry or two with every module.

It is now one test per kinematics module, tests/kins-params/5axiskins and so on, sharing the run function, check.py and the realtime checker in tests/kins-params, so runtests -j runs them side by side and each module's entries sit together. Each test builds the checker under its own name (paritycheck_5axiskins and so on), so one test never installs over the module file another is loading. Each checkresult asks for its own entry count, so a dropped entry still fails.

The second commit builds userkins in tree the way halcompile builds it. The in-tree build linked the shared kinematics code into the module, so the same source gave a different module out of tree, and with kins_single_core loaded both exported the same symbols. userkins now runs behind kins_single_core, as switchkinscomp runs behind switchkins_core, and the tests load both stock templates instead of renamed copies. A bare loadrt userkins now fails with an undefined symbol; no shipped config loads it.

The entries are the same as before, less the userkins copy, which matched the stock userkins entry: 43. The split is not cheaper overall (26 checker compiles); no single test grows with every module any more. Deleting one entry from 5axiskins fails that test.

@BsAtHome

BsAtHome commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Hm, I had actually expected to see a split on basis of kinematics, not on tested parameter. Not every kinematics share all tested parameter, which makes it more difficult to se what belongs to what. Additionally, if you keep one type of kinematics, wouldn't you be able to run all tests in one go as you do not need to reload RT for each test?

@BsAtHome

BsAtHome commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

(maybe my mind lacks the right amount of degrees of freedom the kinematics provides to understand your choice of split)

@grandixximo

Copy link
Copy Markdown
Contributor Author

Your degrees of freedom were fine; my split was in a singularity. Now one test per module.

One load per module saves little: most entries differ in their loadrt parameters, so they reload anyway, at about 0.1 s each. The split is not cheaper overall (27 checker compiles), but no single test grows with every new module any more.

kins-params ran every module one after another in one test, and grows by
an entry or two with every module. It is now one test per module,
tests/kins-params/5axiskins and so on, sharing the run function,
check.py and the realtime checker from tests/kins-params, so runtests -j
runs them at the same time and each module's entries sit together.

Each test builds the checker under its own name, paritycheck_5axiskins
and so on, so one test never installs over the module file another is
loading. Each checkresult asks for its own entry count, so a dropped
entry still fails.

Same 44 entries as before. In the sandbox the old test takes 4.5 s; the
27 take 9.5 s one after another and 2.0 s at runtests -j 8. Deleting one
entry from 5axiskins fails it.
Comment thread tests/kins-params/oot_userkins/test.sh Resolved
The in-tree userkins linked kins_single and kins_util into the module,
where a halcompile build of the same file takes them from
kins_single_core.  The same source then gave two different modules, and
with kins_single_core loaded the in-tree one exported the same symbols
as the core.  Build it without them: like switchkinscomp on
switchkins_core, userkins now runs behind kins_single_core, and the
kins-params test loads the stock module instead of a renamed copy.
@grandixximo grandixximo changed the title tests: split kins-params into module families that run side by side tests: split kins-params into one test per kinematics module Dec 3, 2026
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