Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the keyboard mouse random executable (New) #1582

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GabrielChenCC
Copy link
Contributor

Description

We discovered this problem during last year's testing: https://bugs.launchpad.net/sutton/+bug/2045249 . We found this bug by manually coordinating the random use of the mouse and keyboard during screen rotation. Now I use this C code to implement the random automatic behavior of the mouse and keyboard. It can be used in conjunction with another PR #1576 submitted by my colleague Hanhsuan to complete the random movement of the mouse and keyboard at different resolutions while rotating the screen.

Note: The keyboard and mouse random C code needs to execute via 'sudo'. We have also tried to use Python's uinput to avoid using sudo permissions, but by looking up the document https://python-evdev.readthedocs.io/en/latest/tutorial.html#injecting-input, Python cannot avoid sudo either, and C code is available for the rotation test case without introducing external dependence. So I choose C code, it is more suitable for the rotation test case.

Resolved issues

https://warthogs.atlassian.net/browse/OEMQA-5102
https://bugs.launchpad.net/sutton/+bug/2045249

Documentation

Tests

$ gcc keyboard-mouse_test.c -o demo
$ sudo ./demo
The demo file works as design

Add keyboard-mouse_test.c to Makefile and compile without any errors

@GabrielChenCC GabrielChenCC changed the title Keyboard mouse random Add the keyboard mouse random executable (New) Nov 7, 2024
@pieqq
Copy link
Collaborator

pieqq commented Nov 7, 2024

I think your PR is missing the C code files?

Copy link
Collaborator

@pieqq pieqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed there is an EXECUTABLES file in src/ that contains the name of the binaries that are built by the base provider.

I'm not sure what this does exactly, but I know Checkbox uses the content of this file somehow.

Could you add the name of the generated binary (keyboard-mouse_test) to it?

Otherwise, I've successfully ran the ./manage.py build command, and the binary is available in build/bin/, and I could run it without sudo (on Noble), so it's good to land once this change is made.

@GabrielChenCC GabrielChenCC requested a review from pieqq December 26, 2024 03:54
@GabrielChenCC
Copy link
Contributor Author

I noticed there is an EXECUTABLES file in src/ that contains the name of the binaries that are built by the base provider.

I'm not sure what this does exactly, but I know Checkbox uses the content of this file somehow.

Could you add the name of the generated binary (keyboard-mouse_test) to it?

Otherwise, I've successfully ran the ./manage.py build command, and the binary is available in build/bin/, and I could run it without sudo (on Noble), so it's good to land once this change is made.

Thank you for your suggestion. This file is indeed something I didn't notice. I have added the corresponding fields to this file. Please try again for me. Thank you.

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