nixos/tests/keymap: improve keymap tests#39400
Conversation
simplify tests, prevent timeouts and non-deterministic failures
|
@GrahamcOfBorg test keymap.colemak |
|
Success on x86_64-linux (full log) Attempted: tests.keymap.colemak Partial log (click to expand)
|
|
Works great here even under quite extreme load (load average 18) on my laptop using a https://ark.intel.com/products/95451. Great work! 😃 |
|
Looks excellent! Thanks! |
|
Failure on aarch64-linux (full log) Attempted: tests.keymap.colemak Partial log (click to expand)
|
|
People of the future, this is the first Hydra evaluation of nixos:release-18.03 with this commit: |
|
https://hydra.nixos.org/build/73238407/nixlog/13 Unfortunately, no dice. Shall I revert? |
|
Oops. Please revert on 18.03 while I check it out. Looks like an issue with xdotool and the window manager, will probably have to modify a little for 18.03. |
|
Thanks @srhb for catching this. Strangely, the same test succeeded in the same eval for i686: https://hydra.nixos.org/build/73238415 |
|
The tests are quite often impure. And uh, did someone rerun the tests or did I completely misread that there was an error? My old look shows it's fine now. Am I dreaming? |
|
And I'm not sure it looked to me like a deterministic error. Could it be that the property in question does not exist if we ask too fast? |
|
You're not dreaming, I saw the error too ... But I doubt someone restarted that job. No idea what happened.
Maybe. The only thing I found in xdotool doc is that |
|
@xeji OK, good! And yes, I saw that too, and I think what's going on is that it doesn't work yet during whatever startup is happening. I can't imagine that the VM would be different between our systems and Hydras on that point. |
|
Since I do |
|
If |
|
(But if we can find a step to actually |
|
Well the manpage says about
|
|
That should be testable in the by spawning another window with focus and switching, right? |
|
Good idea, I'll do that. I haven't seen any case where the old test failed because of losing focus after the second xterm window was removed. Now there's only one fullscreen window. So I wonder if the |
|
Oh, good point. I forgot about that. In that case, feel free to nuke it! :-) I thought it would help us find a safe spot to start the test, but that may indeed not be the case at all. |
|
Let's wait and see how the tests work run on master. I'll do some more experiments and then make an updated version. |
|
Thanks again for your help! |
Motivation for this change
Fix #39330. Simplify tests, prevent timeouts and non-deterministic hydra failures.
Hopefully this will stabilize the tests on hydra - let's try and see.
Please backport to 18.03 because failing keymap tests have delayed the channels there as well.
Things done
waitForWindow())xdotoolto make sure xterm has focus (from nixos/tests/keymap: Workaround xterm not in focus #33719, thanks @srhb)Things that could be done later