Skip to content

Close the LegacyFile when the last LegacyFileCounter is dropped#2698

Merged
stevenengler merged 2 commits intoshadow:mainfrom
stevenengler:descriptor-result
Jan 25, 2023
Merged

Close the LegacyFile when the last LegacyFileCounter is dropped#2698
stevenengler merged 2 commits intoshadow:mainfrom
stevenengler:descriptor-result

Conversation

@stevenengler
Copy link
Copy Markdown
Contributor

@stevenengler stevenengler commented Jan 25, 2023

This makes LegacyFileCounter more closely match OpenFile, so that if a descriptor is dropped, it may run the file's close method.

See discussion in #2691 (comment).

@stevenengler stevenengler self-assigned this Jan 25, 2023
@github-actions github-actions bot added Component: Main Composing the core Shadow executable labels Jan 25, 2023
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 25, 2023

Codecov Report

Base: 68.15% // Head: 67.45% // Decreases project coverage by -0.70% ⚠️

Coverage data is based on head (1f7b756) compared to base (b18e1ef).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2698      +/-   ##
==========================================
- Coverage   68.15%   67.45%   -0.70%     
==========================================
  Files         202      202              
  Lines       30378    30388      +10     
  Branches     5928     5930       +2     
==========================================
- Hits        20703    20499     -204     
- Misses       4986     5227     +241     
+ Partials     4689     4662      -27     
Flag Coverage Δ
tests 67.45% <100.00%> (-0.70%) ⬇️

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

Impacted Files Coverage Δ
src/main/host/descriptor/mod.rs 67.47% <100.00%> (-0.37%) ⬇️
src/main/host/process.rs 78.20% <100.00%> (ø)
src/main/host/syscall/handler/eventfd.rs 0.00% <0.00%> (-65.79%) ⬇️
src/main/host/descriptor/eventfd.rs 0.00% <0.00%> (-65.66%) ⬇️
src/main/host/syscall/handler/fcntl.rs 47.29% <0.00%> (-17.57%) ⬇️
src/main/host/syscall/handler/ioctl.rs 40.00% <0.00%> (-17.15%) ⬇️
src/main/host/syscall/handler/unistd.rs 57.25% <0.00%> (-15.30%) ⬇️
src/main/utility/shm_cleanup.rs 59.09% <0.00%> (-5.69%) ⬇️
src/main/host/syscall/handler/mod.rs 76.06% <0.00%> (-4.28%) ⬇️
src/main/core/scheduler/pools/unbounded.rs 77.90% <0.00%> (-4.07%) ⬇️
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@stevenengler stevenengler merged commit 9021081 into shadow:main Jan 25, 2023
@stevenengler stevenengler deleted the descriptor-result branch January 25, 2023 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Main Composing the core Shadow executable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants