Skip to content

bluetooth4/beacon_eddystone_url_hci0 test failures #2334

@rene-oromtz

Description

@rene-oromtz

Bug Description

Recently the beacon_eddystone_url test has started failing on some linux 22.04 hwe kernel environments.
Example: https://certification.canonical.com/hardware/202302-31259/submission/472810/

This test has passed several times in the past and what is weird is that seems that the backend/linux.py hasn't been modified in 5 years.

The error is due to due to a breaking change in Python's C API for Python 3.10 (which I'm assuming was always used) as pointed in this issue: pybluez/pybluez#426

The patch seems that was never released as last released version was 0.23 in 2019 and the fix was published on 2022. If this is in fact the issue, maybe we would need to install from source.

Cert-blocker Test Case

  • cert-blocker

To Reproduce

Run the following testplan:
com.canonical.certification::-sru-desktop

Expected Result

bluetooth4/beacon_eddystone_url_hci0 to pass

Actual Result

bluetooth4/beacon_eddystone_url_hci0 failing on linux jammy hwe kernel

Environment

Checkbox: 7.0.0dev138ubuntu22.04.1
Kernel: 6.8.0-100-generic

Relevant log output

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3/dist-packages/checkbox_support/vendor/beacontools/scanner.py", line 147, in run
    self.socket = self.backend.open_dev(self.bt_device_id)
  File "/usr/lib/python3/dist-packages/checkbox_support/vendor/beacontools/backend/linux.py", line 10, in open_dev
    filtr = bluez.hci_filter_new()
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
Traceback (most recent call last):
  File "/usr/bin/checkbox-support-eddystone_scanner", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/checkbox_support/helpers/timeout.py", line 172, in _f
    return run_with_timeout(f, timeout_s, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/checkbox_support/helpers/timeout.py", line 147, in run_with_timeout
    raise exception_queue.get_nowait()
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions