diff options
| author | Kai-Chuan Hsieh <kaichuan.hsieh@canonical.com> | 2020-10-17 21:49:02 +0800 |
|---|---|---|
| committer | Kai-Chuan Hsieh <kaichuan.hsieh@canonical.com> | 2020-10-23 15:53:05 +0800 |
| commit | 75abb7e1d367cd8a8e619000a5a8a3b837f2b8a0 (patch) | |
| tree | 87e8ae0b956b7e5cb38dcaf6a6d4a1ee60a6c23d | |
| parent | 27531c39b348727e42005344c2c252e5014c2e7a (diff) | |
unit: Add test job to validate power button event filtering (LP: #1877084)
Current WinOS requires ODM vendor to report press and release events with one power button press, the power button release can be filtered if 5-button-array is supported. There is a timing issue that two consecutive and close power button event might trigger the system goes to shutdown directly wihtout endSessionDialog pop-up, which is not the expected behaviour. Create a job for knowing if the system will hit the issue.
| -rw-r--r-- | units/keys/jobs.pxu | 24 | ||||
| -rw-r--r-- | units/keys/test-plan.pxu | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/units/keys/jobs.pxu b/units/keys/jobs.pxu index 8cef3e7..3b42f3e 100644 --- a/units/keys/jobs.pxu +++ b/units/keys/jobs.pxu @@ -290,6 +290,30 @@ _steps: _verification: Did the power management prompt pop up when press power button? +plugin: user-interact +category_id: com.canonical.plainbox::keys +_summary: + Check power button event filtering +id: keys/power-button-event +estimated_duration: 15.0 +requires: + package.name == 'acpid' + package.name == 'libglib2.0-bin' +command: + action=$(gsettings get org.gnome.settings-daemon.plugins.power power-button-action) + gsettings set org.gnome.settings-daemon.plugins.power power-button-action nothing + acpi_listen -t 10 | tee "$PLAINBOX_SESSION_SHARE"/power-button-event.log + gsettings set org.gnome.settings-daemon.plugins.power power-button-action "$action" + [[ $(grep -c "PBTN.*00000080" "$PLAINBOX_SESSION_SHARE"/power-button-event.log) -eq 1 ]] || \ + [[ $(grep -c "PWRB.*00000080" "$PLAINBOX_SESSION_SHARE"/power-button-event.log) -eq 1 ]] +purpose: + This test will check if power button event has reported correctly, the listener will + wait for 10 seconds. +steps: + 1. Single press and release the power button in 10 seconds, some platforms might need long-press + to trigger the PBTN or PWRB event + 2. Check the number of output PBTN/PWRB event + plugin: manual category_id: com.canonical.plainbox::keys id: keys/fn-lock diff --git a/units/keys/test-plan.pxu b/units/keys/test-plan.pxu index d4d2fe2..ffc111c 100644 --- a/units/keys/test-plan.pxu +++ b/units/keys/test-plan.pxu @@ -25,6 +25,7 @@ include: keys/keyboard-backlight certification-status=blocker keys/microphone-mute certification-status=blocker keys/power-button certification-status=blocker + keys/power-button-event certification-status=blocker keys/fn-lock certification-status=non-blocker id: keys-cert-automated @@ -72,6 +73,7 @@ include: keys/keyboard-backlight certification-status=blocker keys/microphone-mute certification-status=blocker keys/power-button certification-status=blocker + keys/power-button-event certification-status=blocker id: after-suspend-keys-cert-blockers unit: test plan |
