Skip to content

Reset HID before running the keyboard test (BugFix)#1322

Merged
fernando79513 merged 2 commits intomainfrom
reset-hid-keyboard-test
Jul 24, 2024
Merged

Reset HID before running the keyboard test (BugFix)#1322
fernando79513 merged 2 commits intomainfrom
reset-hid-keyboard-test

Conversation

@p-gentili
Copy link
Copy Markdown
Collaborator

@p-gentili p-gentili commented Jul 4, 2024

Description

Zapper HID Keyboard test might be affected by the current state of the keyboard, especially if a modifier is for some reason kept pressed. This PR runs first the "reset hid" API so that we start from a clean environment.

Resolved issues

Resolves ZAP-858

Documentation

N/A

Tests

Tested running from source on https://certification.canonical.com/hardware/202203-30003 with

ZAPPER_HOST=<ZAPPER-IP> checkbox-cli run com.canonical.certification::input/zapper-keyboard

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.18%. Comparing base (d62c028) to head (10ea341).
Report is 147 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1322   +/-   ##
=======================================
  Coverage   44.18%   44.18%           
=======================================
  Files         359      359           
  Lines       38813    38814    +1     
  Branches     6581     6581           
=======================================
+ Hits        17148    17149    +1     
  Misses      21003    21003           
  Partials      662      662           
Flag Coverage Δ
provider-base 18.57% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rmartin013
Copy link
Copy Markdown
Contributor

I did try with nvidia-jetson-agx-orin-c31646 (classic 22.04 server image), I am getting a different result...

$PROVIDERPATH is defined, so following provider sources are ignored ['/snap/checkbox-riverside-classic/57/providers/checkbox-provider-riverside', '/home/ubuntu/.local/share/plainbox-providers-1', '/var/tmp/checkbox-providers-develop'] 
Using sideloaded provider: checkbox-provider-base, version 4.0.0.dev333 from /var/tmp/checkbox-providers/base
Skipped file: /var/tmp/checkbox-providers/base/units/stress/suspend_cycles_reboot.md
===========================[ Running Selected Jobs ]============================
=========[ Running job 1 / 2. Estimated time left (at least): 0:00:10 ]=========
----------------------[ Get Zapper's setup capabilities ]-----------------------
ID: com.canonical.certification::zapper_capabilities
Category: com.canonical.plainbox::info
... 8< -------------------------------------------------------------------------
capability: USB hotplug
port_alias: 1
usb_version: 3

capability: hdmi-capture
edid_cycling: True

capability: hid
keyboard: True
mouse: True

capability: bluetooth
profiles: ['a2dp']
------------------------------------------------------------------------- >8 ---
Outcome: job passed
=========[ Running job 2 / 2. Estimated time left (at least): 0:00:10 ]=========
---------[ Check if the system recognizes keyboard events from Zapper ]---------
ID: com.canonical.certification::input/zapper-keyboard
Category: com.canonical.plainbox::input
... 8< -------------------------------------------------------------------------
Mismatch in received keyboard events.
------------------------------------------------------------------------- >8 ---
Outcome: job failed
Finalizing session that hasn't been submitted anywhere: checkbox-run-2024-07-04T16.26.12
==================================[ Results ]===================================
 ☑ : Get Zapper's setup capabilities
 ☒ : Check if the system recognizes keyboard events from Zapper

@p-gentili
Copy link
Copy Markdown
Collaborator Author

I did try with nvidia-jetson-agx-orin-c31646 (classic 22.04 server image), I am getting a different result...

Thanks for reporting this, it's caused by a version mismatch and it'll be fixed on the other side of this API.


This PR still makes sense since it avoid problems, especially with modifiers kept pressed.

@p-gentili p-gentili requested a review from a team July 9, 2024 15:14
@fernando79513 fernando79513 self-assigned this Jul 16, 2024
Copy link
Copy Markdown
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

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

LGTM +1!

@fernando79513 fernando79513 merged commit 0bfbd28 into main Jul 24, 2024
@fernando79513 fernando79513 deleted the reset-hid-keyboard-test branch July 24, 2024 13:54
pedro-avalos pushed a commit that referenced this pull request Jul 29, 2024
* Change: reset HID before running zapper keyboard test

* Fix: tests
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.

3 participants