action #32587
closedmouse_hide(1) does not seems to work on non-qemu backends
0%
Description
After mouse_hide(1)
on Xen HVM, the pointer is still there: https://openqa.suse.de/tests/1317182#step/consoletest_finish/18. It seems that mouse_hide(1)
on non-qemu backends is bogus, and mouse_hide
works instead.
So far we have a workaround needle (https://gitlab.suse.de/openqa/os-autoinst-needles-sles/blob/master/desktop-runner-gnome_vanilla_theme-xen-20180221.json) and undesirable fix in test code on review: https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/4061/.
Updated by coolo over 6 years ago
https://github.com/os-autoinst/os-autoinst/blob/master/backend/driver.pm#L146 says:
# TODO: come up with a better solution - this is qemu specific.
Updated by coolo over 6 years ago
- Priority changed from Normal to Urgent
- Target version set to Ready
I don't even see the problem. mouse_hide is always bounced to the vnc console and the only difference the 1 has, is that instead of mouse_move(1023,767) it does mouse_move(1022,766).
And what is qemu specific is that mouse_hide is repeated if qemu's vnc is in relative mode (which means it doesn't accept mouse_moves at all, i.e. in text mode)
So I think your mouse_hide fails because xen just refused mouse_moves at that point
Updated by coolo over 6 years ago
So my road to action would be to remove this qemu specific repeating from the backend and fix the tests to only mouse_hide if the SUT actually accepts mouse_hides
Updated by coolo over 6 years ago
- Priority changed from Urgent to High
didn't mean to set this as urgent
Updated by michalnowak over 6 years ago
Tried mouse_hide
in installation/welcome.pm and mouse_hide
as well as mouse_hide(N)
work there as expected. The problem is probably in Xen, but I don't have enough data to produce meaningful bug report. I think we should go with some iteration of https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/4061/files#diff-141f4b5a48eaecb0c631a0de23e41a51R382.
Updated by coolo over 6 years ago
what you are doing there is basically retrying - and this is what the backend does in the qemu case. So this is what consoletest_finish should do natively - retry until the mouse is gone. And do this on all backends.
Updated by coolo over 6 years ago
- Target version changed from Ready to Current Sprint
this means for this ticket: remove the retrying from os-autoinst and fix the openSUSE tests not to rely on it. CCing Adam so he's aware
Updated by AdamWill over 6 years ago
Thanks for the heads up...so basically anywhere that's using mouse_hide where it might not work first time needs to do retrying for itself and not rely on the backend to do it? Not sure we have any of those, but I'll keep it in mind.
Updated by dasantiago over 6 years ago
- Assignee deleted (
dasantiago)
AdamWill wrote:
it might not work first time needs to do retrying for itself
How are we supposed to check if the mouse hide worked? Currently the mouse_hide just moves the cursor to the bottom right corner.
Unfortunately there's no direct way to hide the mouse or to verify if the mouse is hidden.
At the moment, i believe, that the best way to check if the mouse is present or not, would be to have a mouse needle and search for it around the screen.
Example of current behaviour:
If we are at the display manager and we hide the mouse by invoking mouse_hide. The mouse will be moved to bottom right corner and our internal state will be modified to have that change reflected. However when we login into gnome the mouse automatically jumps to the middle of the screen, so our internal object state is not correct anymore :-(
So with needles it would be something like:
while(check_screen("mouse", 10)) {
mouse_hide()
}
die "Mouse not hidden" if !check_screen("mouse")
Updated by AdamWill over 6 years ago
FWIW, I actually filed that (GDM cursor thing) as a bug a while back:
https://bugzilla.gnome.org/show_bug.cgi?id=781294
I don't have a great answer to your question, though, sorry :/ personally I tend to treat cursor stuff as one of the unfortunate implementation details of this kind of testing, and just kinda tailor solutions to fit individual circumstances...
Updated by coolo over 6 years ago
How much the tests have to be adopted is something case by case - but we'll make sure mouse_hide is just syntactic sugar for mouse_move(far low right). If that's not good enough to hide the mouse, it's up to the tests to cope with that. So far qemu tests had built retry - which is just not helping to write portable tests
Updated by dasantiago over 6 years ago
Updated by szarate over 6 years ago
- Target version changed from Current Sprint to Done