"suspend/audio_before_suspend" will always fail when run all suspend tests together

Bug #1980375 reported by Kent Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Expired
Critical
Pierre Equoy

Bug Description

[Summary]
"suspend/audio_before_suspend" will always fail when run all suspend tests together
[Steps to reproduce]
1. Execute checkbox-cli
2. De-select all the test plan.
3. Select "Suspend tests" Plan
4. Run the test.
[Expected result]
"suspend/audio_before_suspend" test should pass.
[Actual result]
"suspend/audio_before suspend" test fail
[Failure rate]
100%
[Checkbox job `com.canonical.certification::suspend/audio_before_suspend` output]

stderr
------
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
Traceback (most recent call last):
  File "/tmp/nest-_fdq8pin.3361f09f54625130ca8353599d2d0b04ec843608119aba04070f3a0948f151e7/audio_settings.py", line 9, in <module>
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/checkbox_support/scripts/audio_settings.py", line 388, in main
    store_audio_settings(settings_file)
  File "/usr/lib/python3/dist-packages/checkbox_support/scripts/audio_settings.py", line 247, in store_audio_settings
    audio_settings = get_audio_settings(type)
  File "/usr/lib/python3/dist-packages/checkbox_support/scripts/audio_settings.py", line 207, in get_audio_settings
    pactl_status = check_output(["pactl", "info"],
  File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['pactl', 'info']' returned non-zero exit status 1.

[Additional information]
CID:
SKU:
Image: canonical-oem-somerville-jammy-amd64-20220504-33+jellyfish+X19
system-manufacturer: Dell Inc.
system-product-name: Inspiron 16 5620
bios-version: 0.2.12
CPU: 12th Gen Intel(R) Core(TM) i7-1280P (20x)
GPU: 0000:00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:46a6] (rev 08)
0000:01:00.0 3D controller [0302]: NVIDIA Corporation Device [10de:25a6] (rev a1)
kernel-version: 5.17.0-1011-oem

[Stage]
Issue reported and logs collected at a later stage

[Checkbox Version]
checkbox-ng: 1.18.0rc1
checkbox-support: 0.55.0rc2
certification-client: 0.50.0rc1
plainbox-provider-checkbox: 0.65.0rc2
plainbox-provider-resource-generic: 0.51.0rc2
plainbox-provider-tpm2: 1.18.0rc1

Revision history for this message
Kent Lin (kent-jclin) wrote :

Automatically attached

Revision history for this message
Kent Lin (kent-jclin) wrote :

Automatically attached

Revision history for this message
Kent Lin (kent-jclin) wrote :

Automatically attached

Revision history for this message
Kent Lin (kent-jclin) wrote :

Automatically attached

Changed in plainbox-provider-checkbox:
importance: Undecided → Critical
assignee: nobody → Pierre Equoy (pieq)
description: updated
Revision history for this message
Kent Lin (kent-jclin) wrote :

If only run the following 3 test cases together, the test will pass.
suspend/audio_before_suspend
suspend/audio_after_suspend_auto
suspend/suspend_advanced_auto

Revision history for this message
Kent Lin (kent-jclin) wrote :

This issue only happened on the hybrid graphic laptop machine. UMA system does not have this issue.

Revision history for this message
Pierre Equoy (pieq) wrote :

In the suspend tests, there is one reboot or poweroff test. This test triggers the pm_test.py script, which respawns Checkbox as root. This is problematic for a number of things, including the tests you highlighted, because pactl must be run as the current user, not root.

Changed in plainbox-provider-checkbox:
status: New → Confirmed
Revision history for this message
Pierre Equoy (pieq) wrote :

When checking env, the following are available in the Terminal window that is respawned after the poweroff/reboot test:

SUDO_COMMAND=/usr/bin/bash -c source /var/tmp/checkbox-ng/sessions/session_title-2022-07-01T09.18.33.session/session-share/__respawn_checkbox; exec bash
SUDO_GID=0
SUDO_UID=0
SUDO_USER=root

these env variables are not available in a Terminal opened with Ctrl+Alt+T.

Scott Hu (huntu207)
tags: added: ce-qa-concern
Revision history for this message
Maksim Beliaev (beliaev-maksim) wrote :

Bug was migrated to GitHub: https://github.com/canonical/checkbox/issues/55.
Bug is no more monitored here.

Changed in plainbox-provider-checkbox:
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.