Skip to content

Remove file from epoll interest list when closed#1660

Merged
stevenengler merged 1 commit intoshadow:mainfrom
stevenengler:epoll-rm-interest
Sep 22, 2021
Merged

Remove file from epoll interest list when closed#1660
stevenengler merged 1 commit intoshadow:mainfrom
stevenengler:epoll-rm-interest

Conversation

@stevenengler
Copy link
Copy Markdown
Contributor

Closes #1101.

I don't see a good way to add an integration test for this, but once we have this in rust, a unit test would be easier.

@stevenengler stevenengler self-assigned this Sep 21, 2021
@github-actions github-actions bot added the Component: Main Composing the core Shadow executable label Sep 21, 2021
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 21, 2021

Codecov Report

Merging #1660 (761ee7e) into main (c9cbc63) will decrease coverage by 0.06%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1660      +/-   ##
==========================================
- Coverage   56.33%   56.27%   -0.07%     
==========================================
  Files         140      140              
  Lines       18547    18550       +3     
  Branches     4471     4473       +2     
==========================================
- Hits        10449    10439      -10     
- Misses       5385     5392       +7     
- Partials     2713     2719       +6     
Flag Coverage Δ
tests 56.27% <66.66%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
src/main/host/descriptor/epoll.c 75.16% <66.66%> (-2.37%) ⬇️
src/main/core/scheduler/scheduler.c 74.34% <0.00%> (-1.05%) ⬇️
src/main/host/syscall/mman.c 65.15% <0.00%> (-0.76%) ⬇️
src/main/host/network_interface.c 73.04% <0.00%> (-0.29%) ⬇️
src/main/host/syscall/socket.c 78.63% <0.00%> (-0.15%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9cbc63...761ee7e. Read the comment docs.

Copy link
Copy Markdown
Contributor Author

@stevenengler stevenengler left a comment

Choose a reason for hiding this comment

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

I noticed a bug after reviewing, so I fixed it as well:

Original:

g_hash_table_remove(epoll->watching, &key);

Fixed:

g_hash_table_remove(epoll->watching, key);

@stevenengler stevenengler merged commit 80c7d5f into shadow:main Sep 22, 2021
@stevenengler stevenengler deleted the epoll-rm-interest branch September 22, 2021 20:44
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.

Epoll doesn't remove closed descriptors/files from the interest list

2 participants