Repository navigation
Faster ui-smoke and workplane-retain: wait on the GUI, and two shutdown waits that never ended - #4782
Draft
grandixximo wants to merge 6 commits into
Draft
grandixximo wants to merge 6 commits into
grandixximo wants to merge 6 commits into
Conversation
GStat emitted state-estop-reset only for ESTOP => ESTOP_RESET. A client that resets the estop and turns the machine on between two polls goes from ESTOP straight to ON, and qtdragon and gmoccapy kept showing the estop set on a machine that was on.
The status handlers set the estop and machine on buttons, whose toggled handlers then sent that state again. Once GStat reports the estop reset that comes with an ESTOP => ON change, gmoccapy sent an ESTOP_RESET to a machine already on, which aborts its motion. Block the toggled handler while showing the state; on machine on, also update the widgets as the toggled handler did.
halcmd unload sends SIGTERM, which hal turns into KeyboardInterrupt and gladevcp expects to come out of Gtk.main(). When it lands in a GLib callback, such as the status polls, PyGObject prints it and the main loop goes on, so the panel never left: touchy's touchy_test panel was still alive 5 seconds after an unload, 3 times in 3. Without a panel handler of its own, gladevcp now quits the main loop on SIGTERM, exits within 0.2 seconds and releases its component.
Cleanup waits for the components to leave before it stops realtime. A user component whose process exited without hal_exit() can never leave, so the wait ran its full 2 seconds. gmoccapy leaves its component on every exit, and touchy and any GUI killed by a signal do the same. Wait only for realtime components and for user components whose process is still alive.
The driver paused 3 seconds for the GUI to settle, half a second after every state and mode change to see whether a GUI undid it, 2 seconds after homing and 0.4 seconds after opening the program. - Wait for the GUI's HAL component to be ready (--gui-comp) and, for the X GUIs, for its main window to be viewable (--gui-window). gmoccapy reports ready early in its constructor and then sends its own startup commands; a jog stop among them aborts a homing begun meanwhile. - No stability pause: an attempt that a GUI undoes is retried, and gives up as soon as the machine leaves ON, homing is aborted or the mode leaves AUTO, instead of sitting out its timeout. If the machine goes off after homing, home again from unhomed; a run that a GUI aborts by leaving AUTO is run again. A mode request that a newer command undid (qtdragon switches to MANUAL once it sees all-homed) is repeated at once, not after 3 seconds. - Open the program after homing, when the GUIs have opened their own startup files (an earlier open collides with axis's). - The 2 second pause after homing stays for gmoccapy only (--post-home-settle): it offers AUTO only once it has processed all-homed and shows nothing to wait on. The pause also lets it see the program while the interp is idle. - Before the confirm shot, wait for the LinuxCNC splash to close itself, so it does not cover touchy. The note of the AXIS manual toolchanger stays in the axis shot: it is up at that point in every run, loaded or not, and the shot shows it if it ever goes. - Poll for linuxcnc's exit every 0.1 second, not every second. Unloaded at -j 4: axis 15.2 => 8.2, touchy 14.0 => 8.1, gmoccapy 18.9 => 13.2, qtdragon 13.7 => 8.3 seconds, the same in 15 runs out of 15. With 6 copies of each of axis, touchy and gmoccapy at -j 12 and 4 busy loops: axis 17.6 => 14.2, touchy 16.3 => 12.1, gmoccapy 38.0 => 21.3, 36 of 36 passing.
The test started linuxcnc twice, with RETAIN_WORK_PLANE and without, about 20 seconds in all. Each setting is now a test of its own, like abort/g64: retain/ and clear/ hold the [RS274NGC] section and include the shared settings in workplane.inc. The checks are the same.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #4778: the first two commits are that PR's, so this stays a draft until it merges. The ui-smoke driver resets the estop and turns the machine on back to back, and without #4778 qtdragon and gmoccapy then keep showing the estop set in the confirm shots.
Follow-up to #4770, for the tests on Bertho's list that are mine: ui-smoke axis, touchy and gmoccapy, and workplane-retain.
Two commits fix waits outside the tests that every shutdown paid:
halcmd unload. The SIGTERM becomes a KeyboardInterrupt, and PyGObject swallows it when it lands in a GLib callback. A panel was still alive 5 s after an unload, 3 times in 3; it now exits within 0.2 s and releases its component.The ui-smoke driver no longer pauses 3 s for the GUI, half a second after each state and mode change, or 0.4 s after opening the program:
The confirm-shot settle check is unchanged. The committed reference images were taken by the old driver, later in the run, so axis's lacks the toolchanger note and the others differ in small ways; I will add a commit with new references from this PR's CI artifacts.
workplane-retain is split into retain/ and clear/, like abort/g64.
Times in seconds; loaded is 6 copies of each at -j 12 with 4 busy loops, all passing twice:
Full suite 355/355 at -j 4 in 177 s. The slowest test left is mdi-while-queuebuster-waitflag, about 22 s here.