• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

blues / note-c / 14039873691
93%

Build:
DEFAULT BRANCH: master
Ran 24 Mar 2025 04:03PM UTC
Jobs 1
Files 9
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Mar 2025 03:56PM UTC coverage: 91.153% (+0.5%) from 90.606%
14039873691

push

github

web-flow
fix: do not wipe response structure on bad bin error AND lock I/O during bin transfer (#181)

* fix: do not wipe response structure on bad bin error

When there is a bad bin error in card.binary, the response looks something like this:
{"req":"card.binary","crc":"000A:21904900"}
{"err":"binary receive prematurely terminated (15062 more bytes expected) {bad-bin}{io}","connected":true,"max":130554,"crc":"000A:521E8DA7"}

In n_helpers.c NoteBinaryStoreTransmit(), this cound in fact be the case in the card.binary call made at L533.

However, as you can see, by following the flow, the c_badbinerr is ignored (as it should be) on L545, and we then extract the "max" and "length" fields from the response on L556.  You would think that everything would proceed just fine.

HOWEVER, because of a bug in n_request.c, this is not the case.  The way that it was coded, if there was a c_badbinerr, n_request.c would WIPE OUT the contents of the rsp and replace it with an errDoc(), thus losing the "max" and "length" and "connected" fields altogether.

This PR fixes that problem.

* lock i2c around chunk I/O during binary transfer
* add card.binary reset for robustness
* allow for concurrency when swapping hooks
* feat: NoteSetActiveInterface
* chore: Create test for new locking behavior
* chore: Cover n_hooks.c

---------

Co-authored-by: Zachary J. Fields <zachary_fields@yahoo.com>

1089 of 1299 branches covered (83.83%)

Branch coverage included in aggregate %.

97 of 106 new or added lines in 5 files covered. (91.51%)

2280 of 2397 relevant lines covered (95.12%)

82.06 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
9
71.95
-11.38% n_ua.c
Jobs
ID Job ID Ran Files Coverage
1 14039873691.1 24 Mar 2025 04:03PM UTC 9
91.15
GitHub Action Run
Source Files on build 14039873691
  • Tree
  • List 9
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • c35ba60e on github
  • Prev Build on master (#13314028771)
  • Next Build on master (#14756486709)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc