Skip to content

BLE EDTT GATT tests fail with python >= 3.11 #77669

@aescolar

Description

@aescolar

Describe the bug
When running with python 3.11 or newer, the EDTT GATT tests fail.
Ubuntu 24.04 comes with python 3.12.
The errors are a bunch of python exceptions like

  File "edtt/src/components/attdata.py", line 374, in __str__
    result = self.__opcodeName( opcode );
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "edtt/src/components/attdata.py", line 349, in __opcodeName
    result = result.split('.')[1];
             ~~~~~~~~~~~~~~~~~^^^

This is due to python having changed the behaviour of str() for IntEnum
https://docs.python.org/3/library/enum.html#enum.IntEnum

To Reproduce
Steps to reproduce the behavior:
Have python >= 3.11
In ZEPHYR_BASE, run

  1. tests/bsim/bluetooth/ll/compile.sh
  2. tests/bsim/bluetooth/ll/edtt/tests_scripts/gatt.llcp.sh
  3. See errors

Expected behavior
All tests pass

Impact
Cannot run this tests with newish python versions, or newish distros.
Cannot update CI to ubuntu 24.04

Environment (please complete the following information):

  • OS: Ubuntu 24.04
  • Toolchain (e.g Zephyr SDK, ...): N/A
  • Commit SHA or Version used: Any for last few years.

Additional context
Fix in Zephyr (update manifest) in #77649
Fixed in EDTT upstream in EDTTool/EDTT#86

Metadata

Metadata

Assignees

Labels

area: BluetoothbugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions