Skip to content

Conversation

@gsexton
Copy link
Contributor

@gsexton gsexton commented Apr 2, 2025

Partially resolves:

periph/devices#105

Specifically, the Invalid File Descriptor error messages coming from GPIO.In() or GPIO.Out(). The issue was that when the impression driver did a big memory allocation, the GC was closing the file descriptors required for the GPIO system to work. The problem was that NewFile() DOES close file descriptors when the *os.File is garbage collected.

Minor tweak to close the unused (duplicate) chip rather than letting it leak or wait until GC'd.

This does not totally resolve devices #105. It's still not drawing.

@codecov
Copy link

codecov bot commented Apr 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 27.2%. Comparing base (02c216f) to head (b189df3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
gpioioctl/gpio.go 0.0% 10 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.0%) is below the target coverage (60.0%). You can increase the patch coverage or adjust the target coverage.
❌ Your project status has failed because the head coverage (27.2%) is below the target coverage (60.0%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##            main     #68     +/-   ##
=======================================
- Coverage   27.2%   27.2%   -0.0%     
=======================================
  Files         96      96             
  Lines      11827   11834      +7     
=======================================
  Hits        3220    3220             
- Misses      8472    8479      +7     
  Partials     135     135             

☔ 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.

Copy link
Member

@maruel maruel left a comment

Choose a reason for hiding this comment

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

Thanks!

@maruel maruel merged commit 9cd28b7 into periph:main Apr 2, 2025
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants