Skip to content

get_stack_consumption fixture update#275

Open
mbrousset-ledger wants to merge 1 commit intomasterfrom
mbr/stack-apdu-no-failure
Open

get_stack_consumption fixture update#275
mbrousset-ledger wants to merge 1 commit intomasterfrom
mbr/stack-apdu-no-failure

Conversation

@mbrousset-ledger
Copy link
Copy Markdown
Contributor

When using get_stack_consumption fixture, only fail if retcode is 0x6e00 (SWO_INVALID_CLA).

This will prevent failures due to the test intentionally quitting speculos, at which point stack usage retrieval is not possible.

"Stack consumption not supported: app not built with DEBUG_OS_STACK_CONSUMPTION=1"
if e.status == StatusWords.SWO_INVALID_CLA else f"Unexpected SW: {e.status:04X}")
pytest.fail(msg)
except Exception:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually agree with Claude here.
Either we can add an explanatory comment here or maybe in a more thin way to catch exactly the connection error and ignore it as potentially possible, but to raise exception on others:

except ConnectionError: # To be check if this is the exact error when Speculos has died 
            pass

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 6, 2026

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.88%. Comparing base (3b5ca0d) to head (1cee628).

Files with missing lines Patch % Lines
src/ragger/conftest/base_conftest.py 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #275      +/-   ##
==========================================
- Coverage   75.98%   75.88%   -0.10%     
==========================================
  Files          38       38              
  Lines        2286     2289       +3     
==========================================
  Hits         1737     1737              
- Misses        549      552       +3     
Flag Coverage Δ
apex_p-py3.10 75.79% <0.00%> (-0.10%) ⬇️
apex_p-py3.11 75.79% <0.00%> (-0.10%) ⬇️
apex_p-py3.12 75.79% <0.00%> (-0.10%) ⬇️
apex_p-py3.13 75.79% <0.00%> (-0.10%) ⬇️
flex-py3.10 75.79% <0.00%> (-0.10%) ⬇️
flex-py3.11 75.79% <0.00%> (-0.10%) ⬇️
flex-py3.12 75.79% <0.00%> (-0.10%) ⬇️
flex-py3.13 75.79% <0.00%> (-0.10%) ⬇️
nanos-py3.10 74.22% <0.00%> (-0.10%) ⬇️
nanos-py3.11 74.22% <0.00%> (-0.10%) ⬇️
nanos-py3.12 74.22% <0.00%> (-0.10%) ⬇️
nanos-py3.13 74.22% <0.00%> (-0.10%) ⬇️
nanosp-py3.10 74.26% <0.00%> (-0.10%) ⬇️
nanosp-py3.11 74.26% <0.00%> (-0.10%) ⬇️
nanosp-py3.12 74.26% <0.00%> (-0.10%) ⬇️
nanosp-py3.13 74.26% <0.00%> (-0.10%) ⬇️
nanox-py3.10 74.22% <0.00%> (-0.10%) ⬇️
nanox-py3.11 74.22% <0.00%> (-0.10%) ⬇️
nanox-py3.12 74.22% <0.00%> (-0.10%) ⬇️
nanox-py3.13 74.22% <0.00%> (-0.10%) ⬇️
stax-py3.10 75.79% <0.00%> (-0.10%) ⬇️
stax-py3.11 75.79% <0.00%> (-0.10%) ⬇️
stax-py3.12 75.79% <0.00%> (-0.10%) ⬇️
stax-py3.13 75.79% <0.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mbrousset-ledger mbrousset-ledger force-pushed the mbr/stack-apdu-no-failure branch from 3a08f1c to 1cee628 Compare May 6, 2026 14:47
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants