Bug Description
The resolution_before_suspend test should record the resolution before suspend. However, due to it being a xrandr + grep invocation, most likely the test is failing to identify the currently active mode creating an empty file which is later compared to the output of xrandr after suspend.
Submission: https://certification.canonical.com/hardware/202008-28167/submission/504265/
Cert-blocker Test Case
To Reproduce
- Launch a test plan that contains both resolution tests
- suspend/1_resolution_before_suspend_TU104M__GeForce_RTX_2070_SUPER_Mobile___Max_Q__auto is run
- Suspend is made
- After suspend, the suspend/1_resolution_after_suspend_TU104M__GeForce_RTX_2070_SUPER_Mobile___Max_Q__auto runs
Expected Result
Resolution before and after should be the same and both test should pass
Actual Result
- Before suspend test passed but the file is empty, given its just a shell command it doesn't verify the grep found a match and that the file is not empty
- After suspend test failed, only the resolution after suspend is present
Environment
- OS: 22.04.5
- Checkbox type: Snap
- Checkbox version: 7.4.0.dev111
Relevant log output
Before suspend test log:
++ DRIVER=nvidia
++ INDEX=1
+++ echo ''
+++ rev
+++ cut -d / -f 1
+++ rev
++ PCIBUS=
++ PCIBUS_OFFLOAD_FORMAT=pci-
+++ udev_resource.py -l VIDEO
+++ grep -oP -m1 '\d+'
++ NB_GPU=1
++ [[ 1 -gt 1 ]]
++ unset DRI_PRIME
++ ensure_xdg_session_type
++ local max_attempts=5
++ local attempt=0
++ '[' -z x11 ']'
++ export XDG_SESSION_TYPE
+ xrandr -q
+ grep '[*]'
+ awk '{print $1}'
After suspend test log:
++ DRIVER=nvidia
++ INDEX=1
+++ echo ''
+++ rev
+++ cut -d / -f 1
+++ rev
++ PCIBUS=
++ PCIBUS_OFFLOAD_FORMAT=pci-
+++ udev_resource.py -l VIDEO
+++ grep -oP -m1 '\d+'
++ NB_GPU=1
++ [[ 1 -gt 1 ]]
++ unset DRI_PRIME
++ ensure_xdg_session_type
++ local max_attempts=5
++ local attempt=0
++ '[' -z x11 ']'
++ export XDG_SESSION_TYPE
+ xrandr -q
+ grep '[*]'
+ awk '{print $1}'
+ diff /var/tmp/checkbox-ng/sessions/session_title-2026-08-16T20.11.59.446122.session/session-share/1_resolution_before_suspend.txt -
0a1
> 1280x1024
Additional context
No response
Bug Description
The resolution_before_suspend test should record the resolution before suspend. However, due to it being a xrandr + grep invocation, most likely the test is failing to identify the currently active mode creating an empty file which is later compared to the output of xrandr after suspend.
Submission: https://certification.canonical.com/hardware/202008-28167/submission/504265/
Cert-blocker Test Case
To Reproduce
Expected Result
Resolution before and after should be the same and both test should pass
Actual Result
Environment
Relevant log output
Before suspend test log:
After suspend test log:
Additional context
No response