canonical / checkbox

Checkbox
https://checkbox.readthedocs.io
GNU General Public License v3.0
30 stars 47 forks source link

EDID test fails at maximum resolution (BugFix) #1393

Closed p-gentili closed 1 month ago

p-gentili commented 1 month ago

Description

Another PR dedicated to the EDID job. It turns out that the new implementation (https://github.com/canonical/checkbox/pull/1286) shed some light on the other related problem, where older machines could read the maximum allowed resolution.

In case where the HW doesn't support an available mode from the monitor EDID, no preferred mode is available (which makes sense). This PR takes care of such scenario, attempting to configure the monitor with the maximum available resolution.

  1. in case the maximum allowed resolution still matches what the test requested, the assertion over the actual configuration is performed as usual. Common example is with unsupported refresh rate.
  2. in case the maximum allowed resolution is lower than requested, the testcase can be skipped since we can assume the HW does not support it. Common example is 2K resolution with HDMI < 1.3

Resolved issues

Resolves ZAP-678

Documentation

N/A

Tests

Tested on some machines.

Previous behaviour:

Running from source:

Testing EDID cycling on HDMI-4
switching EDID to 1280x1024
PASS
switching EDID to 2560x1440
SKIP, max available was 2048x1152
switching EDID to 1920x1080
PASS
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 91.07143% with 5 lines in your changes missing coverage. Please review.

Project coverage is 45.18%. Comparing base (7ab7c0f) to head (8c08ee4). Report is 6 commits behind head on main.

Files Patch % Lines
...box-support/checkbox_support/dbus/gnome_monitor.py 76.92% 2 Missing and 1 partial :warning:
...heckbox-support/checkbox_support/monitor_config.py 81.81% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1393 +/- ## ========================================== + Coverage 45.12% 45.18% +0.05% ========================================== Files 366 366 Lines 39058 39102 +44 Branches 6607 6609 +2 ========================================== + Hits 17626 17669 +43 - Misses 20758 20760 +2 + Partials 674 673 -1 ``` | [Flag](https://app.codecov.io/gh/canonical/checkbox/pull/1393/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | Coverage Δ | | |---|---|---| | [checkbox-support](https://app.codecov.io/gh/canonical/checkbox/pull/1393/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | `59.69% <89.36%> (+0.25%)` | :arrow_up: | | [provider-base](https://app.codecov.io/gh/canonical/checkbox/pull/1393/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | `18.65% <100.00%> (+0.03%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.